diff --git a/go.mod b/go.mod index 6db0ac501..9f9d386b4 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/smutel/terraform-provider-netbox/v4 go 1.18 require ( - github.com/go-openapi/runtime v0.24.2 + github.com/go-openapi/runtime v0.25.0 github.com/go-openapi/strfmt v0.21.3 github.com/hashicorp/terraform-plugin-docs v0.13.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 - github.com/smutel/go-netbox/v3 v3.2.3 + github.com/smutel/go-netbox/v3 v3.3.0 ) require ( @@ -22,10 +22,12 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/spec v0.20.7 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -37,9 +39,9 @@ require ( github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.3.1 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.6 // indirect + github.com/hashicorp/go-plugin v1.4.8 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hc-install v0.4.0 // indirect @@ -47,7 +49,7 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.17.3 // indirect github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect github.com/hashicorp/terraform-registry-address v0.1.0 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect @@ -57,7 +59,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mitchellh/cli v1.1.5 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -75,14 +77,16 @@ require ( github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/zclconf/go-cty v1.12.1 // indirect - go.mongodb.org/mongo-driver v1.11.0 // indirect - golang.org/x/crypto v0.2.0 // indirect - golang.org/x/net v0.2.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect + go.mongodb.org/mongo-driver v1.11.1 // indirect + go.opentelemetry.io/otel v1.11.2 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/net v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + google.golang.org/grpc v1.52.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index a61b2f8e2..dce7e9cd0 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,9 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= @@ -24,7 +22,6 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= -github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= @@ -59,6 +56,11 @@ github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= @@ -68,18 +70,19 @@ github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.24.1 h1:Sml5cgQKGYQHF+M7yYSHaH1eOjvTykrddTE/KtQVjqo= github.com/go-openapi/runtime v0.24.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= -github.com/go-openapi/runtime v0.24.2 h1:yX9HMGQbz32M87ECaAhGpJjBmErO3QLcgdZj9BzGx7c= -github.com/go-openapi/runtime v0.24.2/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= +github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= +github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= @@ -136,7 +139,6 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -155,17 +157,13 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M= -github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-hclog v1.3.1 h1:vDwF1DFNZhntP4DAjuTpOw3uEgMUpXh1pB5fW9DqHpo= -github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA= -github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= +github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -175,34 +173,22 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= -github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= -github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= github.com/hashicorp/hcl/v2 v2.15.0 h1:CPDXO6+uORPjKflkWCCwoWc9uRp+zSIPcCQ+BrxV7m8= github.com/hashicorp/hcl/v2 v2.15.0/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.17.2 h1:EU7i3Fh7vDUI9nNRdMATCEfnm9axzTnad8zszYZ73Go= -github.com/hashicorp/terraform-exec v0.17.2/go.mod h1:tuIbsL2l4MlwwIZx9HPM+LOV9vVyEfBYu2GsO1uH3/8= github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-docs v0.10.1 h1:jiVYfhJ/hVXDAQN2XjLK3WH1A/YHgFCrFXPpxibvmjc= -github.com/hashicorp/terraform-plugin-docs v0.10.1/go.mod h1:47ZcsxMUJxAjGzHf+dZ9q78oYf4PeJxO1N+i5XDtXBc= github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY= github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -github.com/hashicorp/terraform-plugin-go v0.14.1 h1:cwZzPYla82XwAqpLhSzdVsOMU+6H29tczAwrB0z9Zek= -github.com/hashicorp/terraform-plugin-go v0.14.1/go.mod h1:Bc/K6K26BQ2FHqIELPbpKtt2CzzbQou+0UQF3/0NsCQ= +github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= +github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0 h1:eIJjFlI4k6BMso6Wq/bq56U0RukXc4JbwJJ8Oze2/tg= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0/go.mod h1:mYPs/uchNcBq7AclQv9QUtSf9iNcfp1Ag21jqTlDf2M= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1/go.mod h1:+tNlb0wkfdsDJ7JEiERLz4HzM19HyiuIoGzTsM7rPpw= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c h1:D8aRO6+mTqHfLsK/BC3j5OAoogv1WLRWzY1AaTo3rBg= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= @@ -210,7 +196,6 @@ github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -258,10 +243,9 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= -github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -283,7 +267,6 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -314,8 +297,8 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smutel/go-netbox/v3 v3.2.3 h1:kO8MfXFE+DlKI07miYoqZ+/2Mk3lJbBGsEz2T1sOfIw= -github.com/smutel/go-netbox/v3 v3.2.3/go.mod h1:JhFZZHyBu2ePquMEakDmlcCnPzHF4/Ji8wq6cwlCtio= +github.com/smutel/go-netbox/v3 v3.3.0 h1:GbneZT/hV1LL67H5zDwpUVW1zAJfx/hb0yPPKqc24eA= +github.com/smutel/go-netbox/v3 v3.3.0/go.mod h1:JhFZZHyBu2ePquMEakDmlcCnPzHF4/Ji8wq6cwlCtio= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -324,6 +307,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -332,8 +316,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -355,8 +340,6 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= -github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= @@ -364,10 +347,13 @@ go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R7 go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.10.1 h1:NujsPveKwHaWuKUer/ceo9DzEe7HIj1SlJ6uvXZG0S4= -go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8= -go.mongodb.org/mongo-driver v1.11.0 h1:FZKhBSTydeuffHj9CBjXlR8vQLee1cQyTWYPA6/tqiE= -go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= +go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= +go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -379,10 +365,9 @@ golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE= -golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -397,10 +382,8 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c h1:JVAXQ10yGGVbSyoer5VILysz6YKjdNT2bsvlayjqhes= -golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -434,24 +417,20 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 h1:UiNENfZ8gDvpiWw7IpOMQ27spWmThO1RwwdQVbJahJM= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -463,14 +442,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc h1:Nf+EdcTLHR8qDNN/KfkQL0u0ssxt9OhbaWCl5C0ucEI= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 h1:jCw9YRd2s40X9Vxi4zKsPRvSPlHWNqadVkpbMsCPzPQ= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= diff --git a/vendor/github.com/go-logr/logr/.golangci.yaml b/vendor/github.com/go-logr/logr/.golangci.yaml new file mode 100644 index 000000000..94ff801df --- /dev/null +++ b/vendor/github.com/go-logr/logr/.golangci.yaml @@ -0,0 +1,29 @@ +run: + timeout: 1m + tests: true + +linters: + disable-all: true + enable: + - asciicheck + - deadcode + - errcheck + - forcetypeassert + - gocritic + - gofmt + - goimports + - gosimple + - govet + - ineffassign + - misspell + - revive + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + +issues: + exclude-use-default: false + max-issues-per-linter: 0 + max-same-issues: 10 diff --git a/vendor/github.com/go-logr/logr/CHANGELOG.md b/vendor/github.com/go-logr/logr/CHANGELOG.md new file mode 100644 index 000000000..c35696004 --- /dev/null +++ b/vendor/github.com/go-logr/logr/CHANGELOG.md @@ -0,0 +1,6 @@ +# CHANGELOG + +## v1.0.0-rc1 + +This is the first logged release. Major changes (including breaking changes) +have occurred since earlier tags. diff --git a/vendor/github.com/go-logr/logr/CONTRIBUTING.md b/vendor/github.com/go-logr/logr/CONTRIBUTING.md new file mode 100644 index 000000000..5d37e294c --- /dev/null +++ b/vendor/github.com/go-logr/logr/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing + +Logr is open to pull-requests, provided they fit within the intended scope of +the project. Specifically, this library aims to be VERY small and minimalist, +with no external dependencies. + +## Compatibility + +This project intends to follow [semantic versioning](http://semver.org) and +is very strict about compatibility. Any proposed changes MUST follow those +rules. + +## Performance + +As a logging library, logr must be as light-weight as possible. Any proposed +code change must include results of running the [benchmark](./benchmark) +before and after the change. diff --git a/vendor/github.com/go-logr/logr/LICENSE b/vendor/github.com/go-logr/logr/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/vendor/github.com/go-logr/logr/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md new file mode 100644 index 000000000..ab5931181 --- /dev/null +++ b/vendor/github.com/go-logr/logr/README.md @@ -0,0 +1,282 @@ +# A minimal logging API for Go + +[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/logr.svg)](https://pkg.go.dev/github.com/go-logr/logr) + +logr offers an(other) opinion on how Go programs and libraries can do logging +without becoming coupled to a particular logging implementation. This is not +an implementation of logging - it is an API. In fact it is two APIs with two +different sets of users. + +The `Logger` type is intended for application and library authors. It provides +a relatively small API which can be used everywhere you want to emit logs. It +defers the actual act of writing logs (to files, to stdout, or whatever) to the +`LogSink` interface. + +The `LogSink` interface is intended for logging library implementers. It is a +pure interface which can be implemented by logging frameworks to provide the actual logging +functionality. + +This decoupling allows application and library developers to write code in +terms of `logr.Logger` (which has very low dependency fan-out) while the +implementation of logging is managed "up stack" (e.g. in or near `main()`.) +Application developers can then switch out implementations as necessary. + +Many people assert that libraries should not be logging, and as such efforts +like this are pointless. Those people are welcome to convince the authors of +the tens-of-thousands of libraries that *DO* write logs that they are all +wrong. In the meantime, logr takes a more practical approach. + +## Typical usage + +Somewhere, early in an application's life, it will make a decision about which +logging library (implementation) it actually wants to use. Something like: + +``` + func main() { + // ... other setup code ... + + // Create the "root" logger. We have chosen the "logimpl" implementation, + // which takes some initial parameters and returns a logr.Logger. + logger := logimpl.New(param1, param2) + + // ... other setup code ... +``` + +Most apps will call into other libraries, create structures to govern the flow, +etc. The `logr.Logger` object can be passed to these other libraries, stored +in structs, or even used as a package-global variable, if needed. For example: + +``` + app := createTheAppObject(logger) + app.Run() +``` + +Outside of this early setup, no other packages need to know about the choice of +implementation. They write logs in terms of the `logr.Logger` that they +received: + +``` + type appObject struct { + // ... other fields ... + logger logr.Logger + // ... other fields ... + } + + func (app *appObject) Run() { + app.logger.Info("starting up", "timestamp", time.Now()) + + // ... app code ... +``` + +## Background + +If the Go standard library had defined an interface for logging, this project +probably would not be needed. Alas, here we are. + +### Inspiration + +Before you consider this package, please read [this blog post by the +inimitable Dave Cheney][warning-makes-no-sense]. We really appreciate what +he has to say, and it largely aligns with our own experiences. + +### Differences from Dave's ideas + +The main differences are: + +1. Dave basically proposes doing away with the notion of a logging API in favor +of `fmt.Printf()`. We disagree, especially when you consider things like output +locations, timestamps, file and line decorations, and structured logging. This +package restricts the logging API to just 2 types of logs: info and error. + +Info logs are things you want to tell the user which are not errors. Error +logs are, well, errors. If your code receives an `error` from a subordinate +function call and is logging that `error` *and not returning it*, use error +logs. + +2. Verbosity-levels on info logs. This gives developers a chance to indicate +arbitrary grades of importance for info logs, without assigning names with +semantic meaning such as "warning", "trace", and "debug." Superficially this +may feel very similar, but the primary difference is the lack of semantics. +Because verbosity is a numerical value, it's safe to assume that an app running +with higher verbosity means more (and less important) logs will be generated. + +## Implementations (non-exhaustive) + +There are implementations for the following logging libraries: + +- **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr) +- **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr) +- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr) +- **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr) +- **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting) +- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr) +- **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr) +- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr) +- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend) +- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr) +- **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr) +- **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0) +- **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing) + +## FAQ + +### Conceptual + +#### Why structured logging? + +- **Structured logs are more easily queryable**: Since you've got + key-value pairs, it's much easier to query your structured logs for + particular values by filtering on the contents of a particular key -- + think searching request logs for error codes, Kubernetes reconcilers for + the name and namespace of the reconciled object, etc. + +- **Structured logging makes it easier to have cross-referenceable logs**: + Similarly to searchability, if you maintain conventions around your + keys, it becomes easy to gather all log lines related to a particular + concept. + +- **Structured logs allow better dimensions of filtering**: if you have + structure to your logs, you've got more precise control over how much + information is logged -- you might choose in a particular configuration + to log certain keys but not others, only log lines where a certain key + matches a certain value, etc., instead of just having v-levels and names + to key off of. + +- **Structured logs better represent structured data**: sometimes, the + data that you want to log is inherently structured (think tuple-link + objects.) Structured logs allow you to preserve that structure when + outputting. + +#### Why V-levels? + +**V-levels give operators an easy way to control the chattiness of log +operations**. V-levels provide a way for a given package to distinguish +the relative importance or verbosity of a given log message. Then, if +a particular logger or package is logging too many messages, the user +of the package can simply change the v-levels for that library. + +#### Why not named levels, like Info/Warning/Error? + +Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences +from Dave's ideas](#differences-from-daves-ideas). + +#### Why not allow format strings, too? + +**Format strings negate many of the benefits of structured logs**: + +- They're not easily searchable without resorting to fuzzy searching, + regular expressions, etc. + +- They don't store structured data well, since contents are flattened into + a string. + +- They're not cross-referenceable. + +- They don't compress easily, since the message is not constant. + +(Unless you turn positional parameters into key-value pairs with numerical +keys, at which point you've gotten key-value logging with meaningless +keys.) + +### Practical + +#### Why key-value pairs, and not a map? + +Key-value pairs are *much* easier to optimize, especially around +allocations. Zap (a structured logger that inspired logr's interface) has +[performance measurements](https://github.com/uber-go/zap#performance) +that show this quite nicely. + +While the interface ends up being a little less obvious, you get +potentially better performance, plus avoid making users type +`map[string]string{}` every time they want to log. + +#### What if my V-levels differ between libraries? + +That's fine. Control your V-levels on a per-logger basis, and use the +`WithName` method to pass different loggers to different libraries. + +Generally, you should take care to ensure that you have relatively +consistent V-levels within a given logger, however, as this makes deciding +on what verbosity of logs to request easier. + +#### But I really want to use a format string! + +That's not actually a question. Assuming your question is "how do +I convert my mental model of logging with format strings to logging with +constant messages": + +1. Figure out what the error actually is, as you'd write in a TL;DR style, + and use that as a message. + +2. For every place you'd write a format specifier, look to the word before + it, and add that as a key value pair. + +For instance, consider the following examples (all taken from spots in the +Kubernetes codebase): + +- `klog.V(4).Infof("Client is returning errors: code %v, error %v", + responseCode, err)` becomes `logger.Error(err, "client returned an + error", "code", responseCode)` + +- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v", + seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after + response when requesting url", "attempt", retries, "after + seconds", seconds, "url", url)` + +If you *really* must use a format string, use it in a key's value, and +call `fmt.Sprintf` yourself. For instance: `log.Printf("unable to +reflect over type %T")` becomes `logger.Info("unable to reflect over +type", "type", fmt.Sprintf("%T"))`. In general though, the cases where +this is necessary should be few and far between. + +#### How do I choose my V-levels? + +This is basically the only hard constraint: increase V-levels to denote +more verbose or more debug-y logs. + +Otherwise, you can start out with `0` as "you always want to see this", +`1` as "common logging that you might *possibly* want to turn off", and +`10` as "I would like to performance-test your log collection stack." + +Then gradually choose levels in between as you need them, working your way +down from 10 (for debug and trace style logs) and up from 1 (for chattier +info-type logs.) + +#### How do I choose my keys? + +Keys are fairly flexible, and can hold more or less any string +value. For best compatibility with implementations and consistency +with existing code in other projects, there are a few conventions you +should consider. + +- Make your keys human-readable. +- Constant keys are generally a good idea. +- Be consistent across your codebase. +- Keys should naturally match parts of the message string. +- Use lower case for simple keys and + [lowerCamelCase](https://en.wiktionary.org/wiki/lowerCamelCase) for + more complex ones. Kubernetes is one example of a project that has + [adopted that + convention](https://github.com/kubernetes/community/blob/HEAD/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments). + +While key names are mostly unrestricted (and spaces are acceptable), +it's generally a good idea to stick to printable ascii characters, or at +least match the general character set of your log lines. + +#### Why should keys be constant values? + +The point of structured logging is to make later log processing easier. Your +keys are, effectively, the schema of each log message. If you use different +keys across instances of the same log line, you will make your structured logs +much harder to use. `Sprintf()` is for values, not for keys! + +#### Why is this not a pure interface? + +The Logger type is implemented as a struct in order to allow the Go compiler to +optimize things like high-V `Info` logs that are not triggered. Not all of +these implementations are implemented yet, but this structure was suggested as +a way to ensure they *can* be implemented. All of the real work is behind the +`LogSink` interface. + +[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging diff --git a/vendor/github.com/go-logr/logr/discard.go b/vendor/github.com/go-logr/logr/discard.go new file mode 100644 index 000000000..9d92a38f1 --- /dev/null +++ b/vendor/github.com/go-logr/logr/discard.go @@ -0,0 +1,54 @@ +/* +Copyright 2020 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package logr + +// Discard returns a Logger that discards all messages logged to it. It can be +// used whenever the caller is not interested in the logs. Logger instances +// produced by this function always compare as equal. +func Discard() Logger { + return Logger{ + level: 0, + sink: discardLogSink{}, + } +} + +// discardLogSink is a LogSink that discards all messages. +type discardLogSink struct{} + +// Verify that it actually implements the interface +var _ LogSink = discardLogSink{} + +func (l discardLogSink) Init(RuntimeInfo) { +} + +func (l discardLogSink) Enabled(int) bool { + return false +} + +func (l discardLogSink) Info(int, string, ...interface{}) { +} + +func (l discardLogSink) Error(error, string, ...interface{}) { +} + +func (l discardLogSink) WithValues(...interface{}) LogSink { + return l +} + +func (l discardLogSink) WithName(string) LogSink { + return l +} diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go new file mode 100644 index 000000000..7accdb0c4 --- /dev/null +++ b/vendor/github.com/go-logr/logr/funcr/funcr.go @@ -0,0 +1,787 @@ +/* +Copyright 2021 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package funcr implements formatting of structured log messages and +// optionally captures the call site and timestamp. +// +// The simplest way to use it is via its implementation of a +// github.com/go-logr/logr.LogSink with output through an arbitrary +// "write" function. See New and NewJSON for details. +// +// Custom LogSinks +// +// For users who need more control, a funcr.Formatter can be embedded inside +// your own custom LogSink implementation. This is useful when the LogSink +// needs to implement additional methods, for example. +// +// Formatting +// +// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for +// values which are being logged. When rendering a struct, funcr will use Go's +// standard JSON tags (all except "string"). +package funcr + +import ( + "bytes" + "encoding" + "fmt" + "path/filepath" + "reflect" + "runtime" + "strconv" + "strings" + "time" + + "github.com/go-logr/logr" +) + +// New returns a logr.Logger which is implemented by an arbitrary function. +func New(fn func(prefix, args string), opts Options) logr.Logger { + return logr.New(newSink(fn, NewFormatter(opts))) +} + +// NewJSON returns a logr.Logger which is implemented by an arbitrary function +// and produces JSON output. +func NewJSON(fn func(obj string), opts Options) logr.Logger { + fnWrapper := func(_, obj string) { + fn(obj) + } + return logr.New(newSink(fnWrapper, NewFormatterJSON(opts))) +} + +// Underlier exposes access to the underlying logging function. Since +// callers only have a logr.Logger, they have to know which +// implementation is in use, so this interface is less of an +// abstraction and more of a way to test type conversion. +type Underlier interface { + GetUnderlying() func(prefix, args string) +} + +func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { + l := &fnlogger{ + Formatter: formatter, + write: fn, + } + // For skipping fnlogger.Info and fnlogger.Error. + l.Formatter.AddCallDepth(1) + return l +} + +// Options carries parameters which influence the way logs are generated. +type Options struct { + // LogCaller tells funcr to add a "caller" key to some or all log lines. + // This has some overhead, so some users might not want it. + LogCaller MessageClass + + // LogCallerFunc tells funcr to also log the calling function name. This + // has no effect if caller logging is not enabled (see Options.LogCaller). + LogCallerFunc bool + + // LogTimestamp tells funcr to add a "ts" key to log lines. This has some + // overhead, so some users might not want it. + LogTimestamp bool + + // TimestampFormat tells funcr how to render timestamps when LogTimestamp + // is enabled. If not specified, a default format will be used. For more + // details, see docs for Go's time.Layout. + TimestampFormat string + + // Verbosity tells funcr which V logs to produce. Higher values enable + // more logs. Info logs at or below this level will be written, while logs + // above this level will be discarded. + Verbosity int + + // RenderBuiltinsHook allows users to mutate the list of key-value pairs + // while a log line is being rendered. The kvList argument follows logr + // conventions - each pair of slice elements is comprised of a string key + // and an arbitrary value (verified and sanitized before calling this + // hook). The value returned must follow the same conventions. This hook + // can be used to audit or modify logged data. For example, you might want + // to prefix all of funcr's built-in keys with some string. This hook is + // only called for built-in (provided by funcr itself) key-value pairs. + // Equivalent hooks are offered for key-value pairs saved via + // logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and + // for user-provided pairs (see RenderArgsHook). + RenderBuiltinsHook func(kvList []interface{}) []interface{} + + // RenderValuesHook is the same as RenderBuiltinsHook, except that it is + // only called for key-value pairs saved via logr.Logger.WithValues. See + // RenderBuiltinsHook for more details. + RenderValuesHook func(kvList []interface{}) []interface{} + + // RenderArgsHook is the same as RenderBuiltinsHook, except that it is only + // called for key-value pairs passed directly to Info and Error. See + // RenderBuiltinsHook for more details. + RenderArgsHook func(kvList []interface{}) []interface{} + + // MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct + // that contains a struct, etc.) it may log. Every time it finds a struct, + // slice, array, or map the depth is increased by one. When the maximum is + // reached, the value will be converted to a string indicating that the max + // depth has been exceeded. If this field is not specified, a default + // value will be used. + MaxLogDepth int +} + +// MessageClass indicates which category or categories of messages to consider. +type MessageClass int + +const ( + // None ignores all message classes. + None MessageClass = iota + // All considers all message classes. + All + // Info only considers info messages. + Info + // Error only considers error messages. + Error +) + +// fnlogger inherits some of its LogSink implementation from Formatter +// and just needs to add some glue code. +type fnlogger struct { + Formatter + write func(prefix, args string) +} + +func (l fnlogger) WithName(name string) logr.LogSink { + l.Formatter.AddName(name) + return &l +} + +func (l fnlogger) WithValues(kvList ...interface{}) logr.LogSink { + l.Formatter.AddValues(kvList) + return &l +} + +func (l fnlogger) WithCallDepth(depth int) logr.LogSink { + l.Formatter.AddCallDepth(depth) + return &l +} + +func (l fnlogger) Info(level int, msg string, kvList ...interface{}) { + prefix, args := l.FormatInfo(level, msg, kvList) + l.write(prefix, args) +} + +func (l fnlogger) Error(err error, msg string, kvList ...interface{}) { + prefix, args := l.FormatError(err, msg, kvList) + l.write(prefix, args) +} + +func (l fnlogger) GetUnderlying() func(prefix, args string) { + return l.write +} + +// Assert conformance to the interfaces. +var _ logr.LogSink = &fnlogger{} +var _ logr.CallDepthLogSink = &fnlogger{} +var _ Underlier = &fnlogger{} + +// NewFormatter constructs a Formatter which emits a JSON-like key=value format. +func NewFormatter(opts Options) Formatter { + return newFormatter(opts, outputKeyValue) +} + +// NewFormatterJSON constructs a Formatter which emits strict JSON. +func NewFormatterJSON(opts Options) Formatter { + return newFormatter(opts, outputJSON) +} + +// Defaults for Options. +const defaultTimestampFormat = "2006-01-02 15:04:05.000000" +const defaultMaxLogDepth = 16 + +func newFormatter(opts Options, outfmt outputFormat) Formatter { + if opts.TimestampFormat == "" { + opts.TimestampFormat = defaultTimestampFormat + } + if opts.MaxLogDepth == 0 { + opts.MaxLogDepth = defaultMaxLogDepth + } + f := Formatter{ + outputFormat: outfmt, + prefix: "", + values: nil, + depth: 0, + opts: opts, + } + return f +} + +// Formatter is an opaque struct which can be embedded in a LogSink +// implementation. It should be constructed with NewFormatter. Some of +// its methods directly implement logr.LogSink. +type Formatter struct { + outputFormat outputFormat + prefix string + values []interface{} + valuesStr string + depth int + opts Options +} + +// outputFormat indicates which outputFormat to use. +type outputFormat int + +const ( + // outputKeyValue emits a JSON-like key=value format, but not strict JSON. + outputKeyValue outputFormat = iota + // outputJSON emits strict JSON. + outputJSON +) + +// PseudoStruct is a list of key-value pairs that gets logged as a struct. +type PseudoStruct []interface{} + +// render produces a log line, ready to use. +func (f Formatter) render(builtins, args []interface{}) string { + // Empirically bytes.Buffer is faster than strings.Builder for this. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + if f.outputFormat == outputJSON { + buf.WriteByte('{') + } + vals := builtins + if hook := f.opts.RenderBuiltinsHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + f.flatten(buf, vals, false, false) // keys are ours, no need to escape + continuing := len(builtins) > 0 + if len(f.valuesStr) > 0 { + if continuing { + if f.outputFormat == outputJSON { + buf.WriteByte(',') + } else { + buf.WriteByte(' ') + } + } + continuing = true + buf.WriteString(f.valuesStr) + } + vals = args + if hook := f.opts.RenderArgsHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + f.flatten(buf, vals, continuing, true) // escape user-provided keys + if f.outputFormat == outputJSON { + buf.WriteByte('}') + } + return buf.String() +} + +// flatten renders a list of key-value pairs into a buffer. If continuing is +// true, it assumes that the buffer has previous values and will emit a +// separator (which depends on the output format) before the first pair it +// writes. If escapeKeys is true, the keys are assumed to have +// non-JSON-compatible characters in them and must be evaluated for escapes. +// +// This function returns a potentially modified version of kvList, which +// ensures that there is a value for every key (adding a value if needed) and +// that each key is a string (substituting a key if needed). +func (f Formatter) flatten(buf *bytes.Buffer, kvList []interface{}, continuing bool, escapeKeys bool) []interface{} { + // This logic overlaps with sanitize() but saves one type-cast per key, + // which can be measurable. + if len(kvList)%2 != 0 { + kvList = append(kvList, noValue) + } + for i := 0; i < len(kvList); i += 2 { + k, ok := kvList[i].(string) + if !ok { + k = f.nonStringKey(kvList[i]) + kvList[i] = k + } + v := kvList[i+1] + + if i > 0 || continuing { + if f.outputFormat == outputJSON { + buf.WriteByte(',') + } else { + // In theory the format could be something we don't understand. In + // practice, we control it, so it won't be. + buf.WriteByte(' ') + } + } + + if escapeKeys { + buf.WriteString(prettyString(k)) + } else { + // this is faster + buf.WriteByte('"') + buf.WriteString(k) + buf.WriteByte('"') + } + if f.outputFormat == outputJSON { + buf.WriteByte(':') + } else { + buf.WriteByte('=') + } + buf.WriteString(f.pretty(v)) + } + return kvList +} + +func (f Formatter) pretty(value interface{}) string { + return f.prettyWithFlags(value, 0, 0) +} + +const ( + flagRawStruct = 0x1 // do not print braces on structs +) + +// TODO: This is not fast. Most of the overhead goes here. +func (f Formatter) prettyWithFlags(value interface{}, flags uint32, depth int) string { + if depth > f.opts.MaxLogDepth { + return `""` + } + + // Handle types that take full control of logging. + if v, ok := value.(logr.Marshaler); ok { + // Replace the value with what the type wants to get logged. + // That then gets handled below via reflection. + value = invokeMarshaler(v) + } + + // Handle types that want to format themselves. + switch v := value.(type) { + case fmt.Stringer: + value = invokeStringer(v) + case error: + value = invokeError(v) + } + + // Handling the most common types without reflect is a small perf win. + switch v := value.(type) { + case bool: + return strconv.FormatBool(v) + case string: + return prettyString(v) + case int: + return strconv.FormatInt(int64(v), 10) + case int8: + return strconv.FormatInt(int64(v), 10) + case int16: + return strconv.FormatInt(int64(v), 10) + case int32: + return strconv.FormatInt(int64(v), 10) + case int64: + return strconv.FormatInt(int64(v), 10) + case uint: + return strconv.FormatUint(uint64(v), 10) + case uint8: + return strconv.FormatUint(uint64(v), 10) + case uint16: + return strconv.FormatUint(uint64(v), 10) + case uint32: + return strconv.FormatUint(uint64(v), 10) + case uint64: + return strconv.FormatUint(v, 10) + case uintptr: + return strconv.FormatUint(uint64(v), 10) + case float32: + return strconv.FormatFloat(float64(v), 'f', -1, 32) + case float64: + return strconv.FormatFloat(v, 'f', -1, 64) + case complex64: + return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"` + case complex128: + return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"` + case PseudoStruct: + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + v = f.sanitize(v) + if flags&flagRawStruct == 0 { + buf.WriteByte('{') + } + for i := 0; i < len(v); i += 2 { + if i > 0 { + buf.WriteByte(',') + } + k, _ := v[i].(string) // sanitize() above means no need to check success + // arbitrary keys might need escaping + buf.WriteString(prettyString(k)) + buf.WriteByte(':') + buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1)) + } + if flags&flagRawStruct == 0 { + buf.WriteByte('}') + } + return buf.String() + } + + buf := bytes.NewBuffer(make([]byte, 0, 256)) + t := reflect.TypeOf(value) + if t == nil { + return "null" + } + v := reflect.ValueOf(value) + switch t.Kind() { + case reflect.Bool: + return strconv.FormatBool(v.Bool()) + case reflect.String: + return prettyString(v.String()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return strconv.FormatInt(int64(v.Int()), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return strconv.FormatUint(uint64(v.Uint()), 10) + case reflect.Float32: + return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32) + case reflect.Float64: + return strconv.FormatFloat(v.Float(), 'f', -1, 64) + case reflect.Complex64: + return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"` + case reflect.Complex128: + return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"` + case reflect.Struct: + if flags&flagRawStruct == 0 { + buf.WriteByte('{') + } + for i := 0; i < t.NumField(); i++ { + fld := t.Field(i) + if fld.PkgPath != "" { + // reflect says this field is only defined for non-exported fields. + continue + } + if !v.Field(i).CanInterface() { + // reflect isn't clear exactly what this means, but we can't use it. + continue + } + name := "" + omitempty := false + if tag, found := fld.Tag.Lookup("json"); found { + if tag == "-" { + continue + } + if comma := strings.Index(tag, ","); comma != -1 { + if n := tag[:comma]; n != "" { + name = n + } + rest := tag[comma:] + if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") { + omitempty = true + } + } else { + name = tag + } + } + if omitempty && isEmpty(v.Field(i)) { + continue + } + if i > 0 { + buf.WriteByte(',') + } + if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" { + buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1)) + continue + } + if name == "" { + name = fld.Name + } + // field names can't contain characters which need escaping + buf.WriteByte('"') + buf.WriteString(name) + buf.WriteByte('"') + buf.WriteByte(':') + buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1)) + } + if flags&flagRawStruct == 0 { + buf.WriteByte('}') + } + return buf.String() + case reflect.Slice, reflect.Array: + buf.WriteByte('[') + for i := 0; i < v.Len(); i++ { + if i > 0 { + buf.WriteByte(',') + } + e := v.Index(i) + buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1)) + } + buf.WriteByte(']') + return buf.String() + case reflect.Map: + buf.WriteByte('{') + // This does not sort the map keys, for best perf. + it := v.MapRange() + i := 0 + for it.Next() { + if i > 0 { + buf.WriteByte(',') + } + // If a map key supports TextMarshaler, use it. + keystr := "" + if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok { + txt, err := m.MarshalText() + if err != nil { + keystr = fmt.Sprintf("", err.Error()) + } else { + keystr = string(txt) + } + keystr = prettyString(keystr) + } else { + // prettyWithFlags will produce already-escaped values + keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1) + if t.Key().Kind() != reflect.String { + // JSON only does string keys. Unlike Go's standard JSON, we'll + // convert just about anything to a string. + keystr = prettyString(keystr) + } + } + buf.WriteString(keystr) + buf.WriteByte(':') + buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1)) + i++ + } + buf.WriteByte('}') + return buf.String() + case reflect.Ptr, reflect.Interface: + if v.IsNil() { + return "null" + } + return f.prettyWithFlags(v.Elem().Interface(), 0, depth) + } + return fmt.Sprintf(`""`, t.Kind().String()) +} + +func prettyString(s string) string { + // Avoid escaping (which does allocations) if we can. + if needsEscape(s) { + return strconv.Quote(s) + } + b := bytes.NewBuffer(make([]byte, 0, 1024)) + b.WriteByte('"') + b.WriteString(s) + b.WriteByte('"') + return b.String() +} + +// needsEscape determines whether the input string needs to be escaped or not, +// without doing any allocations. +func needsEscape(s string) bool { + for _, r := range s { + if !strconv.IsPrint(r) || r == '\\' || r == '"' { + return true + } + } + return false +} + +func isEmpty(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Complex64, reflect.Complex128: + return v.Complex() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + +func invokeMarshaler(m logr.Marshaler) (ret interface{}) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return m.MarshalLog() +} + +func invokeStringer(s fmt.Stringer) (ret string) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return s.String() +} + +func invokeError(e error) (ret string) { + defer func() { + if r := recover(); r != nil { + ret = fmt.Sprintf("", r) + } + }() + return e.Error() +} + +// Caller represents the original call site for a log line, after considering +// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and +// Line fields will always be provided, while the Func field is optional. +// Users can set the render hook fields in Options to examine logged key-value +// pairs, one of which will be {"caller", Caller} if the Options.LogCaller +// field is enabled for the given MessageClass. +type Caller struct { + // File is the basename of the file for this call site. + File string `json:"file"` + // Line is the line number in the file for this call site. + Line int `json:"line"` + // Func is the function name for this call site, or empty if + // Options.LogCallerFunc is not enabled. + Func string `json:"function,omitempty"` +} + +func (f Formatter) caller() Caller { + // +1 for this frame, +1 for Info/Error. + pc, file, line, ok := runtime.Caller(f.depth + 2) + if !ok { + return Caller{"", 0, ""} + } + fn := "" + if f.opts.LogCallerFunc { + if fp := runtime.FuncForPC(pc); fp != nil { + fn = fp.Name() + } + } + + return Caller{filepath.Base(file), line, fn} +} + +const noValue = "" + +func (f Formatter) nonStringKey(v interface{}) string { + return fmt.Sprintf("", f.snippet(v)) +} + +// snippet produces a short snippet string of an arbitrary value. +func (f Formatter) snippet(v interface{}) string { + const snipLen = 16 + + snip := f.pretty(v) + if len(snip) > snipLen { + snip = snip[:snipLen] + } + return snip +} + +// sanitize ensures that a list of key-value pairs has a value for every key +// (adding a value if needed) and that each key is a string (substituting a key +// if needed). +func (f Formatter) sanitize(kvList []interface{}) []interface{} { + if len(kvList)%2 != 0 { + kvList = append(kvList, noValue) + } + for i := 0; i < len(kvList); i += 2 { + _, ok := kvList[i].(string) + if !ok { + kvList[i] = f.nonStringKey(kvList[i]) + } + } + return kvList +} + +// Init configures this Formatter from runtime info, such as the call depth +// imposed by logr itself. +// Note that this receiver is a pointer, so depth can be saved. +func (f *Formatter) Init(info logr.RuntimeInfo) { + f.depth += info.CallDepth +} + +// Enabled checks whether an info message at the given level should be logged. +func (f Formatter) Enabled(level int) bool { + return level <= f.opts.Verbosity +} + +// GetDepth returns the current depth of this Formatter. This is useful for +// implementations which do their own caller attribution. +func (f Formatter) GetDepth() int { + return f.depth +} + +// FormatInfo renders an Info log message into strings. The prefix will be +// empty when no names were set (via AddNames), or when the output is +// configured for JSON. +func (f Formatter) FormatInfo(level int, msg string, kvList []interface{}) (prefix, argsStr string) { + args := make([]interface{}, 0, 64) // using a constant here impacts perf + prefix = f.prefix + if f.outputFormat == outputJSON { + args = append(args, "logger", prefix) + prefix = "" + } + if f.opts.LogTimestamp { + args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) + } + if policy := f.opts.LogCaller; policy == All || policy == Info { + args = append(args, "caller", f.caller()) + } + args = append(args, "level", level, "msg", msg) + return prefix, f.render(args, kvList) +} + +// FormatError renders an Error log message into strings. The prefix will be +// empty when no names were set (via AddNames), or when the output is +// configured for JSON. +func (f Formatter) FormatError(err error, msg string, kvList []interface{}) (prefix, argsStr string) { + args := make([]interface{}, 0, 64) // using a constant here impacts perf + prefix = f.prefix + if f.outputFormat == outputJSON { + args = append(args, "logger", prefix) + prefix = "" + } + if f.opts.LogTimestamp { + args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) + } + if policy := f.opts.LogCaller; policy == All || policy == Error { + args = append(args, "caller", f.caller()) + } + args = append(args, "msg", msg) + var loggableErr interface{} + if err != nil { + loggableErr = err.Error() + } + args = append(args, "error", loggableErr) + return f.prefix, f.render(args, kvList) +} + +// AddName appends the specified name. funcr uses '/' characters to separate +// name elements. Callers should not pass '/' in the provided name string, but +// this library does not actually enforce that. +func (f *Formatter) AddName(name string) { + if len(f.prefix) > 0 { + f.prefix += "/" + } + f.prefix += name +} + +// AddValues adds key-value pairs to the set of saved values to be logged with +// each log line. +func (f *Formatter) AddValues(kvList []interface{}) { + // Three slice args forces a copy. + n := len(f.values) + f.values = append(f.values[:n:n], kvList...) + + vals := f.values + if hook := f.opts.RenderValuesHook; hook != nil { + vals = hook(f.sanitize(vals)) + } + + // Pre-render values, so we don't have to do it on each Info/Error call. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + f.flatten(buf, vals, false, true) // escape user-provided keys + f.valuesStr = buf.String() +} + +// AddCallDepth increases the number of stack-frames to skip when attributing +// the log line to a file and line. +func (f *Formatter) AddCallDepth(depth int) { + f.depth += depth +} diff --git a/vendor/github.com/go-logr/logr/logr.go b/vendor/github.com/go-logr/logr/logr.go new file mode 100644 index 000000000..c3b56b3d2 --- /dev/null +++ b/vendor/github.com/go-logr/logr/logr.go @@ -0,0 +1,510 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This design derives from Dave Cheney's blog: +// http://dave.cheney.net/2015/11/05/lets-talk-about-logging + +// Package logr defines a general-purpose logging API and abstract interfaces +// to back that API. Packages in the Go ecosystem can depend on this package, +// while callers can implement logging with whatever backend is appropriate. +// +// Usage +// +// Logging is done using a Logger instance. Logger is a concrete type with +// methods, which defers the actual logging to a LogSink interface. The main +// methods of Logger are Info() and Error(). Arguments to Info() and Error() +// are key/value pairs rather than printf-style formatted strings, emphasizing +// "structured logging". +// +// With Go's standard log package, we might write: +// log.Printf("setting target value %s", targetValue) +// +// With logr's structured logging, we'd write: +// logger.Info("setting target", "value", targetValue) +// +// Errors are much the same. Instead of: +// log.Printf("failed to open the pod bay door for user %s: %v", user, err) +// +// We'd write: +// logger.Error(err, "failed to open the pod bay door", "user", user) +// +// Info() and Error() are very similar, but they are separate methods so that +// LogSink implementations can choose to do things like attach additional +// information (such as stack traces) on calls to Error(). Error() messages are +// always logged, regardless of the current verbosity. If there is no error +// instance available, passing nil is valid. +// +// Verbosity +// +// Often we want to log information only when the application in "verbose +// mode". To write log lines that are more verbose, Logger has a V() method. +// The higher the V-level of a log line, the less critical it is considered. +// Log-lines with V-levels that are not enabled (as per the LogSink) will not +// be written. Level V(0) is the default, and logger.V(0).Info() has the same +// meaning as logger.Info(). Negative V-levels have the same meaning as V(0). +// Error messages do not have a verbosity level and are always logged. +// +// Where we might have written: +// if flVerbose >= 2 { +// log.Printf("an unusual thing happened") +// } +// +// We can write: +// logger.V(2).Info("an unusual thing happened") +// +// Logger Names +// +// Logger instances can have name strings so that all messages logged through +// that instance have additional context. For example, you might want to add +// a subsystem name: +// +// logger.WithName("compactor").Info("started", "time", time.Now()) +// +// The WithName() method returns a new Logger, which can be passed to +// constructors or other functions for further use. Repeated use of WithName() +// will accumulate name "segments". These name segments will be joined in some +// way by the LogSink implementation. It is strongly recommended that name +// segments contain simple identifiers (letters, digits, and hyphen), and do +// not contain characters that could muddle the log output or confuse the +// joining operation (e.g. whitespace, commas, periods, slashes, brackets, +// quotes, etc). +// +// Saved Values +// +// Logger instances can store any number of key/value pairs, which will be +// logged alongside all messages logged through that instance. For example, +// you might want to create a Logger instance per managed object: +// +// With the standard log package, we might write: +// log.Printf("decided to set field foo to value %q for object %s/%s", +// targetValue, object.Namespace, object.Name) +// +// With logr we'd write: +// // Elsewhere: set up the logger to log the object name. +// obj.logger = mainLogger.WithValues( +// "name", obj.name, "namespace", obj.namespace) +// +// // later on... +// obj.logger.Info("setting foo", "value", targetValue) +// +// Best Practices +// +// Logger has very few hard rules, with the goal that LogSink implementations +// might have a lot of freedom to differentiate. There are, however, some +// things to consider. +// +// The log message consists of a constant message attached to the log line. +// This should generally be a simple description of what's occurring, and should +// never be a format string. Variable information can then be attached using +// named values. +// +// Keys are arbitrary strings, but should generally be constant values. Values +// may be any Go value, but how the value is formatted is determined by the +// LogSink implementation. +// +// Logger instances are meant to be passed around by value. Code that receives +// such a value can call its methods without having to check whether the +// instance is ready for use. +// +// Calling methods with the null logger (Logger{}) as instance will crash +// because it has no LogSink. Therefore this null logger should never be passed +// around. For cases where passing a logger is optional, a pointer to Logger +// should be used. +// +// Key Naming Conventions +// +// Keys are not strictly required to conform to any specification or regex, but +// it is recommended that they: +// * be human-readable and meaningful (not auto-generated or simple ordinals) +// * be constant (not dependent on input data) +// * contain only printable characters +// * not contain whitespace or punctuation +// * use lower case for simple keys and lowerCamelCase for more complex ones +// +// These guidelines help ensure that log data is processed properly regardless +// of the log implementation. For example, log implementations will try to +// output JSON data or will store data for later database (e.g. SQL) queries. +// +// While users are generally free to use key names of their choice, it's +// generally best to avoid using the following keys, as they're frequently used +// by implementations: +// * "caller": the calling information (file/line) of a particular log line +// * "error": the underlying error value in the `Error` method +// * "level": the log level +// * "logger": the name of the associated logger +// * "msg": the log message +// * "stacktrace": the stack trace associated with a particular log line or +// error (often from the `Error` message) +// * "ts": the timestamp for a log line +// +// Implementations are encouraged to make use of these keys to represent the +// above concepts, when necessary (for example, in a pure-JSON output form, it +// would be necessary to represent at least message and timestamp as ordinary +// named values). +// +// Break Glass +// +// Implementations may choose to give callers access to the underlying +// logging implementation. The recommended pattern for this is: +// // Underlier exposes access to the underlying logging implementation. +// // Since callers only have a logr.Logger, they have to know which +// // implementation is in use, so this interface is less of an abstraction +// // and more of way to test type conversion. +// type Underlier interface { +// GetUnderlying() +// } +// +// Logger grants access to the sink to enable type assertions like this: +// func DoSomethingWithImpl(log logr.Logger) { +// if underlier, ok := log.GetSink()(impl.Underlier) { +// implLogger := underlier.GetUnderlying() +// ... +// } +// } +// +// Custom `With*` functions can be implemented by copying the complete +// Logger struct and replacing the sink in the copy: +// // WithFooBar changes the foobar parameter in the log sink and returns a +// // new logger with that modified sink. It does nothing for loggers where +// // the sink doesn't support that parameter. +// func WithFoobar(log logr.Logger, foobar int) logr.Logger { +// if foobarLogSink, ok := log.GetSink()(FoobarSink); ok { +// log = log.WithSink(foobarLogSink.WithFooBar(foobar)) +// } +// return log +// } +// +// Don't use New to construct a new Logger with a LogSink retrieved from an +// existing Logger. Source code attribution might not work correctly and +// unexported fields in Logger get lost. +// +// Beware that the same LogSink instance may be shared by different logger +// instances. Calling functions that modify the LogSink will affect all of +// those. +package logr + +import ( + "context" +) + +// New returns a new Logger instance. This is primarily used by libraries +// implementing LogSink, rather than end users. +func New(sink LogSink) Logger { + logger := Logger{} + logger.setSink(sink) + sink.Init(runtimeInfo) + return logger +} + +// setSink stores the sink and updates any related fields. It mutates the +// logger and thus is only safe to use for loggers that are not currently being +// used concurrently. +func (l *Logger) setSink(sink LogSink) { + l.sink = sink +} + +// GetSink returns the stored sink. +func (l Logger) GetSink() LogSink { + return l.sink +} + +// WithSink returns a copy of the logger with the new sink. +func (l Logger) WithSink(sink LogSink) Logger { + l.setSink(sink) + return l +} + +// Logger is an interface to an abstract logging implementation. This is a +// concrete type for performance reasons, but all the real work is passed on to +// a LogSink. Implementations of LogSink should provide their own constructors +// that return Logger, not LogSink. +// +// The underlying sink can be accessed through GetSink and be modified through +// WithSink. This enables the implementation of custom extensions (see "Break +// Glass" in the package documentation). Normally the sink should be used only +// indirectly. +type Logger struct { + sink LogSink + level int +} + +// Enabled tests whether this Logger is enabled. For example, commandline +// flags might be used to set the logging verbosity and disable some info logs. +func (l Logger) Enabled() bool { + return l.sink.Enabled(l.level) +} + +// Info logs a non-error message with the given key/value pairs as context. +// +// The msg argument should be used to add some constant description to the log +// line. The key/value pairs can then be used to add additional variable +// information. The key/value pairs must alternate string keys and arbitrary +// values. +func (l Logger) Info(msg string, keysAndValues ...interface{}) { + if l.Enabled() { + if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { + withHelper.GetCallStackHelper()() + } + l.sink.Info(l.level, msg, keysAndValues...) + } +} + +// Error logs an error, with the given message and key/value pairs as context. +// It functions similarly to Info, but may have unique behavior, and should be +// preferred for logging errors (see the package documentations for more +// information). The log message will always be emitted, regardless of +// verbosity level. +// +// The msg argument should be used to add context to any underlying error, +// while the err argument should be used to attach the actual error that +// triggered this log line, if present. The err parameter is optional +// and nil may be passed instead of an error instance. +func (l Logger) Error(err error, msg string, keysAndValues ...interface{}) { + if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { + withHelper.GetCallStackHelper()() + } + l.sink.Error(err, msg, keysAndValues...) +} + +// V returns a new Logger instance for a specific verbosity level, relative to +// this Logger. In other words, V-levels are additive. A higher verbosity +// level means a log message is less important. Negative V-levels are treated +// as 0. +func (l Logger) V(level int) Logger { + if level < 0 { + level = 0 + } + l.level += level + return l +} + +// WithValues returns a new Logger instance with additional key/value pairs. +// See Info for documentation on how key/value pairs work. +func (l Logger) WithValues(keysAndValues ...interface{}) Logger { + l.setSink(l.sink.WithValues(keysAndValues...)) + return l +} + +// WithName returns a new Logger instance with the specified name element added +// to the Logger's name. Successive calls with WithName append additional +// suffixes to the Logger's name. It's strongly recommended that name segments +// contain only letters, digits, and hyphens (see the package documentation for +// more information). +func (l Logger) WithName(name string) Logger { + l.setSink(l.sink.WithName(name)) + return l +} + +// WithCallDepth returns a Logger instance that offsets the call stack by the +// specified number of frames when logging call site information, if possible. +// This is useful for users who have helper functions between the "real" call +// site and the actual calls to Logger methods. If depth is 0 the attribution +// should be to the direct caller of this function. If depth is 1 the +// attribution should skip 1 call frame, and so on. Successive calls to this +// are additive. +// +// If the underlying log implementation supports a WithCallDepth(int) method, +// it will be called and the result returned. If the implementation does not +// support CallDepthLogSink, the original Logger will be returned. +// +// To skip one level, WithCallStackHelper() should be used instead of +// WithCallDepth(1) because it works with implementions that support the +// CallDepthLogSink and/or CallStackHelperLogSink interfaces. +func (l Logger) WithCallDepth(depth int) Logger { + if withCallDepth, ok := l.sink.(CallDepthLogSink); ok { + l.setSink(withCallDepth.WithCallDepth(depth)) + } + return l +} + +// WithCallStackHelper returns a new Logger instance that skips the direct +// caller when logging call site information, if possible. This is useful for +// users who have helper functions between the "real" call site and the actual +// calls to Logger methods and want to support loggers which depend on marking +// each individual helper function, like loggers based on testing.T. +// +// In addition to using that new logger instance, callers also must call the +// returned function. +// +// If the underlying log implementation supports a WithCallDepth(int) method, +// WithCallDepth(1) will be called to produce a new logger. If it supports a +// WithCallStackHelper() method, that will be also called. If the +// implementation does not support either of these, the original Logger will be +// returned. +func (l Logger) WithCallStackHelper() (func(), Logger) { + var helper func() + if withCallDepth, ok := l.sink.(CallDepthLogSink); ok { + l.setSink(withCallDepth.WithCallDepth(1)) + } + if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { + helper = withHelper.GetCallStackHelper() + } else { + helper = func() {} + } + return helper, l +} + +// contextKey is how we find Loggers in a context.Context. +type contextKey struct{} + +// FromContext returns a Logger from ctx or an error if no Logger is found. +func FromContext(ctx context.Context) (Logger, error) { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v, nil + } + + return Logger{}, notFoundError{} +} + +// notFoundError exists to carry an IsNotFound method. +type notFoundError struct{} + +func (notFoundError) Error() string { + return "no logr.Logger was present" +} + +func (notFoundError) IsNotFound() bool { + return true +} + +// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this +// returns a Logger that discards all log messages. +func FromContextOrDiscard(ctx context.Context) Logger { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v + } + + return Discard() +} + +// NewContext returns a new Context, derived from ctx, which carries the +// provided Logger. +func NewContext(ctx context.Context, logger Logger) context.Context { + return context.WithValue(ctx, contextKey{}, logger) +} + +// RuntimeInfo holds information that the logr "core" library knows which +// LogSinks might want to know. +type RuntimeInfo struct { + // CallDepth is the number of call frames the logr library adds between the + // end-user and the LogSink. LogSink implementations which choose to print + // the original logging site (e.g. file & line) should climb this many + // additional frames to find it. + CallDepth int +} + +// runtimeInfo is a static global. It must not be changed at run time. +var runtimeInfo = RuntimeInfo{ + CallDepth: 1, +} + +// LogSink represents a logging implementation. End-users will generally not +// interact with this type. +type LogSink interface { + // Init receives optional information about the logr library for LogSink + // implementations that need it. + Init(info RuntimeInfo) + + // Enabled tests whether this LogSink is enabled at the specified V-level. + // For example, commandline flags might be used to set the logging + // verbosity and disable some info logs. + Enabled(level int) bool + + // Info logs a non-error message with the given key/value pairs as context. + // The level argument is provided for optional logging. This method will + // only be called when Enabled(level) is true. See Logger.Info for more + // details. + Info(level int, msg string, keysAndValues ...interface{}) + + // Error logs an error, with the given message and key/value pairs as + // context. See Logger.Error for more details. + Error(err error, msg string, keysAndValues ...interface{}) + + // WithValues returns a new LogSink with additional key/value pairs. See + // Logger.WithValues for more details. + WithValues(keysAndValues ...interface{}) LogSink + + // WithName returns a new LogSink with the specified name appended. See + // Logger.WithName for more details. + WithName(name string) LogSink +} + +// CallDepthLogSink represents a Logger that knows how to climb the call stack +// to identify the original call site and can offset the depth by a specified +// number of frames. This is useful for users who have helper functions +// between the "real" call site and the actual calls to Logger methods. +// Implementations that log information about the call site (such as file, +// function, or line) would otherwise log information about the intermediate +// helper functions. +// +// This is an optional interface and implementations are not required to +// support it. +type CallDepthLogSink interface { + // WithCallDepth returns a LogSink that will offset the call + // stack by the specified number of frames when logging call + // site information. + // + // If depth is 0, the LogSink should skip exactly the number + // of call frames defined in RuntimeInfo.CallDepth when Info + // or Error are called, i.e. the attribution should be to the + // direct caller of Logger.Info or Logger.Error. + // + // If depth is 1 the attribution should skip 1 call frame, and so on. + // Successive calls to this are additive. + WithCallDepth(depth int) LogSink +} + +// CallStackHelperLogSink represents a Logger that knows how to climb +// the call stack to identify the original call site and can skip +// intermediate helper functions if they mark themselves as +// helper. Go's testing package uses that approach. +// +// This is useful for users who have helper functions between the +// "real" call site and the actual calls to Logger methods. +// Implementations that log information about the call site (such as +// file, function, or line) would otherwise log information about the +// intermediate helper functions. +// +// This is an optional interface and implementations are not required +// to support it. Implementations that choose to support this must not +// simply implement it as WithCallDepth(1), because +// Logger.WithCallStackHelper will call both methods if they are +// present. This should only be implemented for LogSinks that actually +// need it, as with testing.T. +type CallStackHelperLogSink interface { + // GetCallStackHelper returns a function that must be called + // to mark the direct caller as helper function when logging + // call site information. + GetCallStackHelper() func() +} + +// Marshaler is an optional interface that logged values may choose to +// implement. Loggers with structured output, such as JSON, should +// log the object return by the MarshalLog method instead of the +// original value. +type Marshaler interface { + // MarshalLog can be used to: + // - ensure that structs are not logged as strings when the original + // value has a String method: return a different type without a + // String method + // - select which fields of a complex type should get logged: + // return a simpler struct with fewer fields + // - log unexported fields: return a different struct + // with exported fields + // + // It may return any value of any type. + MarshalLog() interface{} +} diff --git a/vendor/github.com/go-logr/stdr/LICENSE b/vendor/github.com/go-logr/stdr/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-logr/stdr/README.md b/vendor/github.com/go-logr/stdr/README.md new file mode 100644 index 000000000..515866789 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/README.md @@ -0,0 +1,6 @@ +# Minimal Go logging using logr and Go's standard library + +[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr) + +This package implements the [logr interface](https://github.com/go-logr/logr) +in terms of Go's standard log package(https://pkg.go.dev/log). diff --git a/vendor/github.com/go-logr/stdr/stdr.go b/vendor/github.com/go-logr/stdr/stdr.go new file mode 100644 index 000000000..93a8aab51 --- /dev/null +++ b/vendor/github.com/go-logr/stdr/stdr.go @@ -0,0 +1,170 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package stdr implements github.com/go-logr/logr.Logger in terms of +// Go's standard log package. +package stdr + +import ( + "log" + "os" + + "github.com/go-logr/logr" + "github.com/go-logr/logr/funcr" +) + +// The global verbosity level. See SetVerbosity(). +var globalVerbosity int + +// SetVerbosity sets the global level against which all info logs will be +// compared. If this is greater than or equal to the "V" of the logger, the +// message will be logged. A higher value here means more logs will be written. +// The previous verbosity value is returned. This is not concurrent-safe - +// callers must be sure to call it from only one goroutine. +func SetVerbosity(v int) int { + old := globalVerbosity + globalVerbosity = v + return old +} + +// New returns a logr.Logger which is implemented by Go's standard log package, +// or something like it. If std is nil, this will use a default logger +// instead. +// +// Example: stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))) +func New(std StdLogger) logr.Logger { + return NewWithOptions(std, Options{}) +} + +// NewWithOptions returns a logr.Logger which is implemented by Go's standard +// log package, or something like it. See New for details. +func NewWithOptions(std StdLogger, opts Options) logr.Logger { + if std == nil { + // Go's log.Default() is only available in 1.16 and higher. + std = log.New(os.Stderr, "", log.LstdFlags) + } + + if opts.Depth < 0 { + opts.Depth = 0 + } + + fopts := funcr.Options{ + LogCaller: funcr.MessageClass(opts.LogCaller), + } + + sl := &logger{ + Formatter: funcr.NewFormatter(fopts), + std: std, + } + + // For skipping our own logger.Info/Error. + sl.Formatter.AddCallDepth(1 + opts.Depth) + + return logr.New(sl) +} + +// Options carries parameters which influence the way logs are generated. +type Options struct { + // Depth biases the assumed number of call frames to the "true" caller. + // This is useful when the calling code calls a function which then calls + // stdr (e.g. a logging shim to another API). Values less than zero will + // be treated as zero. + Depth int + + // LogCaller tells stdr to add a "caller" key to some or all log lines. + // Go's log package has options to log this natively, too. + LogCaller MessageClass + + // TODO: add an option to log the date/time +} + +// MessageClass indicates which category or categories of messages to consider. +type MessageClass int + +const ( + // None ignores all message classes. + None MessageClass = iota + // All considers all message classes. + All + // Info only considers info messages. + Info + // Error only considers error messages. + Error +) + +// StdLogger is the subset of the Go stdlib log.Logger API that is needed for +// this adapter. +type StdLogger interface { + // Output is the same as log.Output and log.Logger.Output. + Output(calldepth int, logline string) error +} + +type logger struct { + funcr.Formatter + std StdLogger +} + +var _ logr.LogSink = &logger{} +var _ logr.CallDepthLogSink = &logger{} + +func (l logger) Enabled(level int) bool { + return globalVerbosity >= level +} + +func (l logger) Info(level int, msg string, kvList ...interface{}) { + prefix, args := l.FormatInfo(level, msg, kvList) + if prefix != "" { + args = prefix + ": " + args + } + _ = l.std.Output(l.Formatter.GetDepth()+1, args) +} + +func (l logger) Error(err error, msg string, kvList ...interface{}) { + prefix, args := l.FormatError(err, msg, kvList) + if prefix != "" { + args = prefix + ": " + args + } + _ = l.std.Output(l.Formatter.GetDepth()+1, args) +} + +func (l logger) WithName(name string) logr.LogSink { + l.Formatter.AddName(name) + return &l +} + +func (l logger) WithValues(kvList ...interface{}) logr.LogSink { + l.Formatter.AddValues(kvList) + return &l +} + +func (l logger) WithCallDepth(depth int) logr.LogSink { + l.Formatter.AddCallDepth(depth) + return &l +} + +// Underlier exposes access to the underlying logging implementation. Since +// callers only have a logr.Logger, they have to know which implementation is +// in use, so this interface is less of an abstraction and more of way to test +// type conversion. +type Underlier interface { + GetUnderlying() StdLogger +} + +// GetUnderlying returns the StdLogger underneath this logger. Since StdLogger +// is itself an interface, the result may or may not be a Go log.Logger. +func (l logger) GetUnderlying() StdLogger { + return l.std +} diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml deleted file mode 100644 index 03a22fe06..000000000 --- a/vendor/github.com/go-openapi/jsonpointer/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -after_success: -- bash <(curl -s https://codecov.io/bash) -go: -- 1.14.x -- 1.15.x -install: -- GO111MODULE=off go get -u gotest.tools/gotestsum -env: -- GO111MODULE=on -language: go -notifications: - slack: - secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw= -script: -- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/jsonreference/.golangci.yml b/vendor/github.com/go-openapi/jsonreference/.golangci.yml index f9381aee5..013fc1943 100644 --- a/vendor/github.com/go-openapi/jsonreference/.golangci.yml +++ b/vendor/github.com/go-openapi/jsonreference/.golangci.yml @@ -1,8 +1,6 @@ linters-settings: govet: check-shadowing: true - golint: - min-confidence: 0 gocyclo: min-complexity: 30 maligned: @@ -12,6 +10,8 @@ linters-settings: goconst: min-len: 2 min-occurrences: 4 + paralleltest: + ignore-missing: true linters: enable-all: true disable: @@ -39,3 +39,12 @@ linters: - nestif - godot - errorlint + - varcheck + - interfacer + - deadcode + - golint + - ifshort + - structcheck + - nosnakecase + - varnamelen + - exhaustruct diff --git a/vendor/github.com/go-openapi/jsonreference/.travis.yml b/vendor/github.com/go-openapi/jsonreference/.travis.yml deleted file mode 100644 index 05482f4b9..000000000 --- a/vendor/github.com/go-openapi/jsonreference/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -after_success: -- bash <(curl -s https://codecov.io/bash) -go: -- 1.14.x -- 1.x -install: -- go get gotest.tools/gotestsum -jobs: - include: - # include linting job, but only for latest go version and amd64 arch - - go: 1.x - arch: amd64 - install: - go get github.com/golangci/golangci-lint/cmd/golangci-lint - script: - - golangci-lint run --new-from-rev master -env: -- GO111MODULE=on -language: go -notifications: - slack: - secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ= -script: -- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go b/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go index 8956c3088..fb376fce2 100644 --- a/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go +++ b/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go @@ -7,8 +7,8 @@ import ( ) const ( - defaultHttpPort = ":80" - defaultHttpsPort = ":443" + defaultHTTPPort = ":80" + defaultHTTPSPort = ":443" ) // Regular expressions used by the normalizations @@ -18,13 +18,14 @@ var rxDupSlashes = regexp.MustCompile(`/{2,}`) // NormalizeURL will normalize the specified URL // This was added to replace a previous call to the no longer maintained purell library: // The call that was used looked like the following: -// url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes)) +// +// url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes)) // // To explain all that was included in the call above, purell.FlagsSafe was really just the following: -// - FlagLowercaseScheme -// - FlagLowercaseHost -// - FlagRemoveDefaultPort -// - FlagRemoveDuplicateSlashes (and this was mixed in with the |) +// - FlagLowercaseScheme +// - FlagLowercaseHost +// - FlagRemoveDefaultPort +// - FlagRemoveDuplicateSlashes (and this was mixed in with the |) func NormalizeURL(u *url.URL) { lowercaseScheme(u) lowercaseHost(u) @@ -48,7 +49,7 @@ func removeDefaultPort(u *url.URL) { if len(u.Host) > 0 { scheme := strings.ToLower(u.Scheme) u.Host = rxPort.ReplaceAllStringFunc(u.Host, func(val string) string { - if (scheme == "http" && val == defaultHttpPort) || (scheme == "https" && val == defaultHttpsPort) { + if (scheme == "http" && val == defaultHTTPPort) || (scheme == "https" && val == defaultHTTPSPort) { return "" } return val diff --git a/vendor/github.com/go-openapi/runtime/client/keepalive.go b/vendor/github.com/go-openapi/runtime/client/keepalive.go index e9c250d6a..bc7b7fa41 100644 --- a/vendor/github.com/go-openapi/runtime/client/keepalive.go +++ b/vendor/github.com/go-openapi/runtime/client/keepalive.go @@ -2,7 +2,6 @@ package client import ( "io" - "io/ioutil" "net/http" "sync/atomic" ) @@ -50,7 +49,7 @@ func (d *drainingReadCloser) Close() error { // some bytes, but the closer ignores them to keep the underling // connection open. //nolint:errcheck - io.Copy(ioutil.Discard, d.rdr) + io.Copy(io.Discard, d.rdr) } return d.rdr.Close() } diff --git a/vendor/github.com/go-openapi/runtime/client/opentelemetry.go b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go new file mode 100644 index 000000000..8a38ea3e9 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go @@ -0,0 +1,207 @@ +package client + +import ( + "fmt" + "net/http" + "strings" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/propagation" + semconv "go.opentelemetry.io/otel/semconv/v1.12.0" + "go.opentelemetry.io/otel/trace" +) + +const ( + instrumentationVersion = "1.0.0" + tracerName = "go-openapi" +) + +type config struct { + Tracer trace.Tracer + Propagator propagation.TextMapPropagator + SpanStartOptions []trace.SpanStartOption + SpanNameFormatter func(*runtime.ClientOperation) string + TracerProvider trace.TracerProvider +} + +type OpenTelemetryOpt interface { + apply(*config) +} + +type optionFunc func(*config) + +func (o optionFunc) apply(c *config) { + o(c) +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) OpenTelemetryOpt { + return optionFunc(func(c *config) { + if provider != nil { + c.TracerProvider = provider + } + }) +} + +// WithPropagators configures specific propagators. If this +// option isn't specified, then the global TextMapPropagator is used. +func WithPropagators(ps propagation.TextMapPropagator) OpenTelemetryOpt { + return optionFunc(func(c *config) { + if ps != nil { + c.Propagator = ps + } + }) +} + +// WithSpanOptions configures an additional set of +// trace.SpanOptions, which are applied to each new span. +func WithSpanOptions(opts ...trace.SpanStartOption) OpenTelemetryOpt { + return optionFunc(func(c *config) { + c.SpanStartOptions = append(c.SpanStartOptions, opts...) + }) +} + +// WithSpanNameFormatter takes a function that will be called on every +// request and the returned string will become the Span Name. +func WithSpanNameFormatter(f func(op *runtime.ClientOperation) string) OpenTelemetryOpt { + return optionFunc(func(c *config) { + c.SpanNameFormatter = f + }) +} + +func defaultTransportFormatter(op *runtime.ClientOperation) string { + if op.ID != "" { + return op.ID + } + + return fmt.Sprintf("%s_%s", strings.ToLower(op.Method), op.PathPattern) +} + +type openTelemetryTransport struct { + transport runtime.ClientTransport + host string + tracer trace.Tracer + config *config +} + +func newOpenTelemetryTransport(transport runtime.ClientTransport, host string, opts []OpenTelemetryOpt) *openTelemetryTransport { + tr := &openTelemetryTransport{ + transport: transport, + host: host, + } + + defaultOpts := []OpenTelemetryOpt{ + WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), + WithSpanNameFormatter(defaultTransportFormatter), + WithPropagators(otel.GetTextMapPropagator()), + WithTracerProvider(otel.GetTracerProvider()), + } + + c := newConfig(append(defaultOpts, opts...)...) + tr.config = c + + return tr +} + +func (t *openTelemetryTransport) Submit(op *runtime.ClientOperation) (interface{}, error) { + if op.Context == nil { + return t.transport.Submit(op) + } + + params := op.Params + reader := op.Reader + + var span trace.Span + defer func() { + if span != nil { + span.End() + } + }() + + op.Params = runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error { + span = t.newOpenTelemetrySpan(op, req.GetHeaderParams()) + return params.WriteToRequest(req, reg) + }) + + op.Reader = runtime.ClientResponseReaderFunc(func(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + if span != nil { + statusCode := response.Code() + span.SetAttributes(attribute.Int(string(semconv.HTTPStatusCodeKey), statusCode)) + span.SetStatus(semconv.SpanStatusFromHTTPStatusCodeAndSpanKind(statusCode, trace.SpanKindClient)) + } + + return reader.ReadResponse(response, consumer) + }) + + submit, err := t.transport.Submit(op) + if err != nil && span != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + } + + return submit, err +} + +func (t *openTelemetryTransport) newOpenTelemetrySpan(op *runtime.ClientOperation, header http.Header) trace.Span { + ctx := op.Context + + tracer := t.tracer + if tracer == nil { + if span := trace.SpanFromContext(ctx); span.SpanContext().IsValid() { + tracer = newTracer(span.TracerProvider()) + } else { + tracer = newTracer(otel.GetTracerProvider()) + } + } + + ctx, span := tracer.Start(ctx, t.config.SpanNameFormatter(op), t.config.SpanStartOptions...) + + var scheme string + if len(op.Schemes) > 0 { + scheme = op.Schemes[0] + } + + span.SetAttributes( + attribute.String("net.peer.name", t.host), + attribute.String(string(semconv.HTTPRouteKey), op.PathPattern), + attribute.String(string(semconv.HTTPMethodKey), op.Method), + attribute.String("span.kind", trace.SpanKindClient.String()), + attribute.String("http.scheme", scheme), + ) + + carrier := propagation.HeaderCarrier(header) + t.config.Propagator.Inject(ctx, carrier) + + return span +} + +func newTracer(tp trace.TracerProvider) trace.Tracer { + return tp.Tracer(tracerName, trace.WithInstrumentationVersion(version())) +} + +func newConfig(opts ...OpenTelemetryOpt) *config { + c := &config{ + Propagator: otel.GetTextMapPropagator(), + } + + for _, opt := range opts { + opt.apply(c) + } + + // Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context. + if c.TracerProvider != nil { + c.Tracer = newTracer(c.TracerProvider) + } + + return c +} + +// Version is the current release version of the go-runtime instrumentation. +func version() string { + return instrumentationVersion +} diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go index 611925aed..ccec04138 100644 --- a/vendor/github.com/go-openapi/runtime/client/runtime.go +++ b/vendor/github.com/go-openapi/runtime/client/runtime.go @@ -23,21 +23,21 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "io/ioutil" "mime" "net/http" "net/http/httputil" + "os" "strings" "sync" "time" - "github.com/go-openapi/strfmt" "github.com/opentracing/opentracing-go" "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/logger" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/yamlpc" + "github.com/go-openapi/strfmt" ) // TLSClientOptions to configure client authentication with mutual TLS @@ -164,7 +164,7 @@ func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { cfg.RootCAs = caCertPool } else if opts.CA != "" { // load ca cert - caCert, err := ioutil.ReadFile(opts.CA) + caCert, err := os.ReadFile(opts.CA) if err != nil { return nil, fmt.Errorf("tls client ca: %v", err) } @@ -181,8 +181,6 @@ func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { cfg.ServerName = opts.ServerName } - cfg.BuildNameToCertificate() - return cfg, nil } @@ -303,6 +301,14 @@ func (r *Runtime) WithOpenTracing(opts ...opentracing.StartSpanOption) runtime.C return newOpenTracingTransport(r, r.Host, opts) } +// WithOpenTelemetry adds opentelemetry support to the provided runtime. +// A new client span is created for each request. +// If the context of the client operation does not contain an active span, no span is created. +// The provided opts are applied to each spans - for example to add global tags. +func (r *Runtime) WithOpenTelemetry(opts ...OpenTelemetryOpt) runtime.ClientTransport { + return newOpenTelemetryTransport(r, r.Host, opts) +} + func (r *Runtime) pickScheme(schemes []string) string { if v := r.selectScheme(r.schemes); v != "" { return v diff --git a/vendor/github.com/go-openapi/runtime/client_request.go b/vendor/github.com/go-openapi/runtime/client_request.go index 3efda3482..d4d2b58f2 100644 --- a/vendor/github.com/go-openapi/runtime/client_request.go +++ b/vendor/github.com/go-openapi/runtime/client_request.go @@ -16,7 +16,6 @@ package runtime import ( "io" - "io/ioutil" "net/http" "net/url" "time" @@ -79,7 +78,7 @@ type NamedReadCloser interface { func NamedReader(name string, rdr io.Reader) NamedReadCloser { rc, ok := rdr.(io.ReadCloser) if !ok { - rc = ioutil.NopCloser(rdr) + rc = io.NopCloser(rdr) } return &namedReadCloser{ name: name, diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go index 0aa184c75..d21ae4e87 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/context.go +++ b/vendor/github.com/go-openapi/runtime/middleware/context.go @@ -195,6 +195,17 @@ func NewRoutableContext(spec *loads.Document, routableAPI RoutableAPI, routes Ro if spec != nil { an = analysis.New(spec.Spec()) } + + return NewRoutableContextWithAnalyzedSpec(spec, an, routableAPI, routes) +} + +// NewRoutableContextWithAnalyzedSpec is like NewRoutableContext but takes in input the analysed spec too +func NewRoutableContextWithAnalyzedSpec(spec *loads.Document, an *analysis.Spec, routableAPI RoutableAPI, routes Router) *Context { + // Either there are no spec doc and analysis, or both of them. + if !((spec == nil && an == nil) || (spec != nil && an != nil)) { + panic(errors.New(http.StatusInternalServerError, "routable context requires either both spec doc and analysis, or none of them")) + } + ctx := &Context{spec: spec, api: routableAPI, analyzer: an, router: routes} return ctx } diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go index bab523c51..b4dea29e4 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go @@ -16,6 +16,8 @@ type SwaggerUIOpts struct { Path string // SpecURL the url to find the spec for SpecURL string + // OAuthCallbackURL the url called after OAuth2 login + OAuthCallbackURL string // The three components needed to embed swagger-ui SwaggerURL string @@ -40,6 +42,9 @@ func (r *SwaggerUIOpts) EnsureDefaults() { if r.SpecURL == "" { r.SpecURL = "/swagger.json" } + if r.OAuthCallbackURL == "" { + r.OAuthCallbackURL = path.Join(r.BasePath, r.Path, "oauth2-callback") + } if r.SwaggerURL == "" { r.SwaggerURL = swaggerLatest } @@ -149,7 +154,8 @@ const ( plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "StandaloneLayout" + layout: "StandaloneLayout", + oauth2RedirectUrl: '{{ .OAuthCallbackURL }}' }) // End Swagger UI call region diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go new file mode 100644 index 000000000..576f6003f --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go @@ -0,0 +1,122 @@ +package middleware + +import ( + "bytes" + "fmt" + "net/http" + "path" + "text/template" +) + +func SwaggerUIOAuth2Callback(opts SwaggerUIOpts, next http.Handler) http.Handler { + opts.EnsureDefaults() + + pth := opts.OAuthCallbackURL + tmpl := template.Must(template.New("swaggeroauth").Parse(swaggerOAuthTemplate)) + + buf := bytes.NewBuffer(nil) + _ = tmpl.Execute(buf, &opts) + b := buf.Bytes() + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if path.Join(r.URL.Path) == pth { + rw.Header().Set("Content-Type", "text/html; charset=utf-8") + rw.WriteHeader(http.StatusOK) + + _, _ = rw.Write(b) + return + } + + if next == nil { + rw.Header().Set("Content-Type", "text/plain") + rw.WriteHeader(http.StatusNotFound) + _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) + return + } + next.ServeHTTP(rw, r) + }) +} + +const ( + swaggerOAuthTemplate = ` + + + + {{ .Title }} + + + + + +` +) diff --git a/vendor/github.com/hashicorp/go-hclog/intlogger.go b/vendor/github.com/hashicorp/go-hclog/intlogger.go index e4cd8eddc..89d26c9b0 100644 --- a/vendor/github.com/hashicorp/go-hclog/intlogger.go +++ b/vendor/github.com/hashicorp/go-hclog/intlogger.go @@ -261,7 +261,6 @@ func needsQuoting(str string) bool { // 2. Color the whole log line, based on the level. // 3. Color only the header (level) part of the log line. // 4. Color both the header and fields of the log line. -// func (l *intLogger) logPlain(t time.Time, name string, level Level, msg string, args ...interface{}) { if !l.disableTime { @@ -845,6 +844,11 @@ func (l *intLogger) SetLevel(level Level) { atomic.StoreInt32(l.level, int32(level)) } +// Returns the current level +func (l *intLogger) GetLevel() Level { + return Level(atomic.LoadInt32(l.level)) +} + // Create a *log.Logger that will send it's data through this Logger. This // allows packages that expect to be using the standard library log to actually // use this logger. diff --git a/vendor/github.com/hashicorp/go-hclog/logger.go b/vendor/github.com/hashicorp/go-hclog/logger.go index 50dee8220..3cdb2837d 100644 --- a/vendor/github.com/hashicorp/go-hclog/logger.go +++ b/vendor/github.com/hashicorp/go-hclog/logger.go @@ -198,6 +198,9 @@ type Logger interface { // implementation cannot update the level on the fly, it should no-op. SetLevel(level Level) + // Returns the current level + GetLevel() Level + // Return a value that conforms to the stdlib log.Logger interface StandardLogger(opts *StandardLoggerOptions) *log.Logger diff --git a/vendor/github.com/hashicorp/go-hclog/nulllogger.go b/vendor/github.com/hashicorp/go-hclog/nulllogger.go index bc14f7708..55e89dd31 100644 --- a/vendor/github.com/hashicorp/go-hclog/nulllogger.go +++ b/vendor/github.com/hashicorp/go-hclog/nulllogger.go @@ -49,6 +49,8 @@ func (l *nullLogger) ResetNamed(name string) Logger { return l } func (l *nullLogger) SetLevel(level Level) {} +func (l *nullLogger) GetLevel() Level { return NoLevel } + func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { return log.New(l.StandardWriter(opts), "", log.LstdFlags) } diff --git a/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md b/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md index 834196288..d40ad6136 100644 --- a/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md +++ b/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md @@ -1,3 +1,15 @@ +## v1.4.8 + +BUG FIXES: + +* Fix windows build: [[GH-227](https://github.com/hashicorp/go-plugin/pull/227)] + +## v1.4.7 + +ENHANCEMENTS: + +* More detailed error message on plugin start failure: [[GH-223](https://github.com/hashicorp/go-plugin/pull/223)] + ## v1.4.6 BUG FIXES: diff --git a/vendor/github.com/hashicorp/go-plugin/client.go b/vendor/github.com/hashicorp/go-plugin/client.go index 2e86f6213..d0baf7e8d 100644 --- a/vendor/github.com/hashicorp/go-plugin/client.go +++ b/vendor/github.com/hashicorp/go-plugin/client.go @@ -26,6 +26,14 @@ import ( "google.golang.org/grpc" ) +const unrecognizedRemotePluginMessage = `Unrecognized remote plugin message: %s +This usually means + the plugin was not compiled for this architecture, + the plugin is missing dynamic-link libraries necessary to run, + the plugin is not executable by this process due to file permissions, or + the plugin failed to negotiate the initial go-plugin protocol handshake +%s` + // If this is 1, then we've called CleanupClients. This can be used // by plugin RPC implementations to change error behavior since you // can expected network connection errors at this point. This should be @@ -473,7 +481,17 @@ func (c *Client) Kill() { c.l.Unlock() } -// Starts the underlying subprocess, communicating with it to negotiate +// peTypes is a list of Portable Executable (PE) machine types from https://learn.microsoft.com/en-us/windows/win32/debug/pe-format +// mapped to GOARCH types. It is not comprehensive, and only includes machine types that Go supports. +var peTypes = map[uint16]string{ + 0x14c: "386", + 0x1c0: "arm", + 0x6264: "loong64", + 0x8664: "amd64", + 0xaa64: "arm64", +} + +// Start the underlying subprocess, communicating with it to negotiate // a port for RPC connections, and returning the address to connect via RPC. // // This method is safe to call multiple times. Subsequent calls have no effect. @@ -697,10 +715,7 @@ func (c *Client) Start() (addr net.Addr, err error) { line = strings.TrimSpace(line) parts := strings.SplitN(line, "|", 6) if len(parts) < 4 { - err = fmt.Errorf( - "Unrecognized remote plugin message: %s\n\n"+ - "This usually means that the plugin is either invalid or simply\n"+ - "needs to be recompiled to support the latest protocol.", line) + err = fmt.Errorf(unrecognizedRemotePluginMessage, line, additionalNotesAboutCommand(cmd.Path)) return } diff --git a/vendor/github.com/hashicorp/go-plugin/notes_unix.go b/vendor/github.com/hashicorp/go-plugin/notes_unix.go new file mode 100644 index 000000000..dae1c411d --- /dev/null +++ b/vendor/github.com/hashicorp/go-plugin/notes_unix.go @@ -0,0 +1,64 @@ +//go:build !windows +// +build !windows + +package plugin + +import ( + "debug/elf" + "debug/macho" + "debug/pe" + "fmt" + "os" + "os/user" + "runtime" + "strconv" + "syscall" +) + +// additionalNotesAboutCommand tries to get additional information about a command that might help diagnose +// why it won't run correctly. It runs as a best effort only. +func additionalNotesAboutCommand(path string) string { + notes := "" + stat, err := os.Stat(path) + if err != nil { + return notes + } + + notes += "\nAdditional notes about plugin:\n" + notes += fmt.Sprintf(" Path: %s\n", path) + notes += fmt.Sprintf(" Mode: %s\n", stat.Mode()) + statT, ok := stat.Sys().(*syscall.Stat_t) + if ok { + currentUsername := "?" + if u, err := user.LookupId(strconv.FormatUint(uint64(os.Getuid()), 10)); err == nil { + currentUsername = u.Username + } + currentGroup := "?" + if g, err := user.LookupGroupId(strconv.FormatUint(uint64(os.Getgid()), 10)); err == nil { + currentGroup = g.Name + } + username := "?" + if u, err := user.LookupId(strconv.FormatUint(uint64(statT.Uid), 10)); err == nil { + username = u.Username + } + group := "?" + if g, err := user.LookupGroupId(strconv.FormatUint(uint64(statT.Gid), 10)); err == nil { + group = g.Name + } + notes += fmt.Sprintf(" Owner: %d [%s] (current: %d [%s])\n", statT.Uid, username, os.Getuid(), currentUsername) + notes += fmt.Sprintf(" Group: %d [%s] (current: %d [%s])\n", statT.Gid, group, os.Getgid(), currentGroup) + } + + if elfFile, err := elf.Open(path); err == nil { + notes += fmt.Sprintf(" ELF architecture: %s (current architecture: %s)\n", elfFile.Machine, runtime.GOARCH) + } else if machoFile, err := macho.Open(path); err == nil { + notes += fmt.Sprintf(" MachO architecture: %s (current architecture: %s)\n", machoFile.Cpu, runtime.GOARCH) + } else if peFile, err := pe.Open(path); err == nil { + machine, ok := peTypes[peFile.Machine] + if !ok { + machine = "unknown" + } + notes += fmt.Sprintf(" PE architecture: %s (current architecture: %s)\n", machine, runtime.GOARCH) + } + return notes +} diff --git a/vendor/github.com/hashicorp/go-plugin/notes_windows.go b/vendor/github.com/hashicorp/go-plugin/notes_windows.go new file mode 100644 index 000000000..900b93319 --- /dev/null +++ b/vendor/github.com/hashicorp/go-plugin/notes_windows.go @@ -0,0 +1,40 @@ +//go:build windows +// +build windows + +package plugin + +import ( + "debug/elf" + "debug/macho" + "debug/pe" + "fmt" + "os" + "runtime" +) + +// additionalNotesAboutCommand tries to get additional information about a command that might help diagnose +// why it won't run correctly. It runs as a best effort only. +func additionalNotesAboutCommand(path string) string { + notes := "" + stat, err := os.Stat(path) + if err != nil { + return notes + } + + notes += "\nAdditional notes about plugin:\n" + notes += fmt.Sprintf(" Path: %s\n", path) + notes += fmt.Sprintf(" Mode: %s\n", stat.Mode()) + + if elfFile, err := elf.Open(path); err == nil { + notes += fmt.Sprintf(" ELF architecture: %s (current architecture: %s)\n", elfFile.Machine, runtime.GOARCH) + } else if machoFile, err := macho.Open(path); err == nil { + notes += fmt.Sprintf(" MachO architecture: %s (current architecture: %s)\n", machoFile.Cpu, runtime.GOARCH) + } else if peFile, err := pe.Open(path); err == nil { + machine, ok := peTypes[peFile.Machine] + if !ok { + machine = "unknown" + } + notes += fmt.Sprintf(" PE architecture: %s (current architecture: %s)\n", machine, runtime.GOARCH) + } + return notes +} diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol_data.go index 0e220f57c..36dfcd764 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol_data.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/protocol_data.go @@ -122,7 +122,7 @@ func protocolDataDynamicValue6(_ context.Context, value *tfprotov6.DynamicValue) } func writeProtocolFile(ctx context.Context, dataDir string, rpc string, message string, field string, fileExtension string, fileContents []byte) { - fileName := fmt.Sprintf("%d_%s_%s_%s", time.Now().Unix(), rpc, message, field) + fileName := fmt.Sprintf("%d_%s_%s_%s", time.Now().UnixMilli(), rpc, message, field) if fileExtension != "" { fileName += "." + fileExtension diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/diagnostic.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/diagnostic.go index 979896f77..81d692cef 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/diagnostic.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/diagnostic.go @@ -1,6 +1,8 @@ package toproto import ( + "unicode/utf8" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5" ) @@ -8,8 +10,8 @@ import ( func Diagnostic(in *tfprotov5.Diagnostic) (*tfplugin5.Diagnostic, error) { diag := &tfplugin5.Diagnostic{ Severity: Diagnostic_Severity(in.Severity), - Summary: in.Summary, - Detail: in.Detail, + Summary: forceValidUTF8(in.Summary), + Detail: forceValidUTF8(in.Detail), } if in.Attribute != nil { attr, err := AttributePath(in.Attribute) @@ -41,6 +43,59 @@ func Diagnostics(in []*tfprotov5.Diagnostic) ([]*tfplugin5.Diagnostic, error) { return diagnostics, nil } +// forceValidUTF8 returns a string guaranteed to be valid UTF-8 even if the +// input isn't, by replacing any invalid bytes with a valid UTF-8 encoding of +// the Unicode Replacement Character (\uFFFD). +// +// The protobuf serialization library will reject invalid UTF-8 with an +// unhelpful error message: +// +// string field contains invalid UTF-8 +// +// Passing a string result through this function makes invalid UTF-8 instead +// emerge as placeholder characters on the other side of the wire protocol, +// giving a better chance of still returning a partially-legible message +// instead of a generic character encoding error. +// +// This is intended for user-facing messages such as diagnostic summary and +// detail messages, where Terraform will just treat the value as opaque and +// it's ultimately up to the user and their terminal or web browser to +// interpret the result. Don't use this for strings that have machine-readable +// meaning. +func forceValidUTF8(s string) string { + // Most strings that pass through here will already be valid UTF-8 and + // utf8.ValidString has a fast path which will beat our rune-by-rune + // analysis below, so it's worth the cost of walking the string twice + // in the rarer invalid case. + if utf8.ValidString(s) { + return s + } + + // If we get down here then we know there's at least one invalid UTF-8 + // sequence in the string, so in this slow path we'll reconstruct the + // string one rune at a time, guaranteeing that we'll only write valid + // UTF-8 sequences into the resulting buffer. + // + // Any invalid string will grow at least a little larger as a result of + // this operation because we'll be replacing each invalid byte with + // the three-byte sequence \xEF\xBF\xBD, which is the UTF-8 encoding of + // the replacement character \uFFFD. 9 is a magic number giving room for + // three such expansions without any further allocation. + ret := make([]byte, 0, len(s)+9) + for { + // If the first byte in s is not the start of a valid UTF-8 sequence + // then the following will return utf8.RuneError, 1, where + // utf8.RuneError is the unicode replacement character. + r, advance := utf8.DecodeRuneInString(s) + if advance == 0 { + break + } + s = s[advance:] + ret = utf8.AppendRune(ret, r) + } + return string(ret) +} + // we have to say this next thing to get golint to stop yelling at us about the // underscores in the function names. We want the function names to match // actually-generated code, so it feels like fair play. It's just a shame we diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/diagnostic.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/diagnostic.go index 26ce3e9df..4144222ce 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/diagnostic.go +++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/diagnostic.go @@ -1,6 +1,8 @@ package toproto import ( + "unicode/utf8" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6" ) @@ -8,8 +10,8 @@ import ( func Diagnostic(in *tfprotov6.Diagnostic) (*tfplugin6.Diagnostic, error) { diag := &tfplugin6.Diagnostic{ Severity: Diagnostic_Severity(in.Severity), - Summary: in.Summary, - Detail: in.Detail, + Summary: forceValidUTF8(in.Summary), + Detail: forceValidUTF8(in.Detail), } if in.Attribute != nil { attr, err := AttributePath(in.Attribute) @@ -41,6 +43,59 @@ func Diagnostics(in []*tfprotov6.Diagnostic) ([]*tfplugin6.Diagnostic, error) { return diagnostics, nil } +// forceValidUTF8 returns a string guaranteed to be valid UTF-8 even if the +// input isn't, by replacing any invalid bytes with a valid UTF-8 encoding of +// the Unicode Replacement Character (\uFFFD). +// +// The protobuf serialization library will reject invalid UTF-8 with an +// unhelpful error message: +// +// string field contains invalid UTF-8 +// +// Passing a string result through this function makes invalid UTF-8 instead +// emerge as placeholder characters on the other side of the wire protocol, +// giving a better chance of still returning a partially-legible message +// instead of a generic character encoding error. +// +// This is intended for user-facing messages such as diagnostic summary and +// detail messages, where Terraform will just treat the value as opaque and +// it's ultimately up to the user and their terminal or web browser to +// interpret the result. Don't use this for strings that have machine-readable +// meaning. +func forceValidUTF8(s string) string { + // Most strings that pass through here will already be valid UTF-8 and + // utf8.ValidString has a fast path which will beat our rune-by-rune + // analysis below, so it's worth the cost of walking the string twice + // in the rarer invalid case. + if utf8.ValidString(s) { + return s + } + + // If we get down here then we know there's at least one invalid UTF-8 + // sequence in the string, so in this slow path we'll reconstruct the + // string one rune at a time, guaranteeing that we'll only write valid + // UTF-8 sequences into the resulting buffer. + // + // Any invalid string will grow at least a little larger as a result of + // this operation because we'll be replacing each invalid byte with + // the three-byte sequence \xEF\xBF\xBD, which is the UTF-8 encoding of + // the replacement character \uFFFD. 9 is a magic number giving room for + // three such expansions without any further allocation. + ret := make([]byte, 0, len(s)+9) + for { + // If the first byte in s is not the start of a valid UTF-8 sequence + // then the following will return utf8.RuneError, 1, where + // utf8.RuneError is the unicode replacement character. + r, advance := utf8.DecodeRuneInString(s) + if advance == 0 { + break + } + s = s[advance:] + ret = utf8.AppendRune(ret, r) + } + return string(ret) +} + // we have to say this next thing to get golint to stop yelling at us about the // underscores in the function names. We want the function names to match // actually-generated code, so it feels like fair play. It's just a shame we diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go index 39bbcf00f..d569c0c94 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_bsd.go +++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go @@ -1,5 +1,5 @@ -//go:build (darwin || freebsd || openbsd || netbsd || dragonfly) && !appengine -// +build darwin freebsd openbsd netbsd dragonfly +//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine +// +build darwin freebsd openbsd netbsd dragonfly hurd // +build !appengine package isatty diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go index 75ffe396d..b7b2e74e0 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go @@ -77,6 +77,12 @@ CircuitsCircuitTerminationsListParams contains all the parameters to send to the */ type CircuitsCircuitTerminationsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -89,12 +95,21 @@ type CircuitsCircuitTerminationsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -146,24 +161,42 @@ type CircuitsCircuitTerminationsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. */ Limit *int64 + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // PortSpeed. PortSpeed *string @@ -203,6 +236,12 @@ type CircuitsCircuitTerminationsListParams struct { // SiteIDn. SiteIDn *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + // TermSide. TermSide *string @@ -310,6 +349,28 @@ func (o *CircuitsCircuitTerminationsListParams) SetHTTPClient(client *http.Clien o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithCableEnd(cableEnd *string) *CircuitsCircuitTerminationsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithCableEndn(cableEndn *string) *CircuitsCircuitTerminationsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithCabled(cabled *string) *CircuitsCircuitTerminationsListParams { o.SetCabled(cabled) @@ -354,6 +415,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithCreatedGt(createdGt *string) *CircuitsCircuitTerminationsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithCreatedGte(createdGte *string) *CircuitsCircuitTerminationsListParams { o.SetCreatedGte(createdGte) @@ -365,6 +437,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetCreatedGte(createdGte *string o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithCreatedLt(createdLt *string) *CircuitsCircuitTerminationsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithCreatedLte(createdLte *string) *CircuitsCircuitTerminationsListParams { o.SetCreatedLte(createdLte) @@ -376,6 +459,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetCreatedLte(createdLte *string o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithCreatedn(createdn *string) *CircuitsCircuitTerminationsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithDescription(description *string) *CircuitsCircuitTerminationsListParams { o.SetDescription(description) @@ -563,6 +657,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetLastUpdated(lastUpdated *stri o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *CircuitsCircuitTerminationsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsCircuitTerminationsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -574,6 +679,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetLastUpdatedGte(lastUpdatedGte o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *CircuitsCircuitTerminationsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsCircuitTerminationsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -585,6 +701,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetLastUpdatedLte(lastUpdatedLte o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithLastUpdatedn(lastUpdatedn *string) *CircuitsCircuitTerminationsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithLimit(limit *int64) *CircuitsCircuitTerminationsListParams { o.SetLimit(limit) @@ -596,6 +723,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithOccupied adds the occupied to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithOccupied(occupied *string) *CircuitsCircuitTerminationsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithOffset(offset *int64) *CircuitsCircuitTerminationsListParams { o.SetOffset(offset) @@ -607,6 +745,17 @@ func (o *CircuitsCircuitTerminationsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithOrdering(ordering *string) *CircuitsCircuitTerminationsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPortSpeed adds the portSpeed to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithPortSpeed(portSpeed *string) *CircuitsCircuitTerminationsListParams { o.SetPortSpeed(portSpeed) @@ -750,6 +899,28 @@ func (o *CircuitsCircuitTerminationsListParams) SetSiteIDn(siteIDn *string) { o.SiteIDn = siteIDn } +// WithTag adds the tag to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithTag(tag *string) *CircuitsCircuitTerminationsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithTagn(tagn *string) *CircuitsCircuitTerminationsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WithTermSide adds the termSide to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithTermSide(termSide *string) *CircuitsCircuitTerminationsListParams { o.SetTermSide(termSide) @@ -956,6 +1127,40 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1024,6 +1229,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1041,6 +1263,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1058,6 +1297,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1347,6 +1603,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1364,6 +1637,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1381,6 +1671,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1398,6 +1705,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -1415,6 +1739,23 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.PortSpeed != nil { // query param port_speed @@ -1636,6 +1977,40 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.Tag != nil { + + // query param tag + var qrTag string + + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + } + if o.TermSide != nil { // query param term_side diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_types_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_types_list_parameters.go index 432e8d651..d2f080562 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_types_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuit_types_list_parameters.go @@ -80,12 +80,21 @@ type CircuitsCircuitTypesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type CircuitsCircuitTypesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type CircuitsCircuitTypesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -288,6 +312,17 @@ func (o *CircuitsCircuitTypesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithCreatedGt(createdGt *string) *CircuitsCircuitTypesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithCreatedGte(createdGte *string) *CircuitsCircuitTypesListParams { o.SetCreatedGte(createdGte) @@ -299,6 +334,17 @@ func (o *CircuitsCircuitTypesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithCreatedLt(createdLt *string) *CircuitsCircuitTypesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithCreatedLte(createdLte *string) *CircuitsCircuitTypesListParams { o.SetCreatedLte(createdLte) @@ -310,6 +356,17 @@ func (o *CircuitsCircuitTypesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithCreatedn(createdn *string) *CircuitsCircuitTypesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithDescription(description *string) *CircuitsCircuitTypesListParams { o.SetDescription(description) @@ -497,6 +554,17 @@ func (o *CircuitsCircuitTypesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *CircuitsCircuitTypesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsCircuitTypesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -508,6 +576,17 @@ func (o *CircuitsCircuitTypesListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *CircuitsCircuitTypesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsCircuitTypesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -519,6 +598,17 @@ func (o *CircuitsCircuitTypesListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithLastUpdatedn(lastUpdatedn *string) *CircuitsCircuitTypesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithLimit(limit *int64) *CircuitsCircuitTypesListParams { o.SetLimit(limit) @@ -651,6 +741,17 @@ func (o *CircuitsCircuitTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithOrdering(ordering *string) *CircuitsCircuitTypesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithQ(q *string) *CircuitsCircuitTypesListParams { o.SetQ(q) @@ -819,6 +920,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -836,6 +954,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -853,6 +988,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1142,6 +1294,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1159,6 +1328,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1176,6 +1362,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1380,6 +1583,23 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuits_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuits_list_parameters.go index f165db74a..e3795f452 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuits_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_circuits_list_parameters.go @@ -146,12 +146,21 @@ type CircuitsCircuitsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -221,12 +230,21 @@ type CircuitsCircuitsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -239,6 +257,12 @@ type CircuitsCircuitsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Provider. Provider *string @@ -332,6 +356,24 @@ type CircuitsCircuitsListParams struct { // TenantIDn. TenantIDn *string + // TerminationDate. + TerminationDate *string + + // TerminationDateGt. + TerminationDateGt *string + + // TerminationDateGte. + TerminationDateGte *string + + // TerminationDateLt. + TerminationDateLt *string + + // TerminationDateLte. + TerminationDateLte *string + + // TerminationDaten. + TerminationDaten *string + // Type. Type *string @@ -650,6 +692,17 @@ func (o *CircuitsCircuitsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreatedGt(createdGt *string) *CircuitsCircuitsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithCreatedGte(createdGte *string) *CircuitsCircuitsListParams { o.SetCreatedGte(createdGte) @@ -661,6 +714,17 @@ func (o *CircuitsCircuitsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreatedLt(createdLt *string) *CircuitsCircuitsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithCreatedLte(createdLte *string) *CircuitsCircuitsListParams { o.SetCreatedLte(createdLte) @@ -672,6 +736,17 @@ func (o *CircuitsCircuitsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithCreatedn(createdn *string) *CircuitsCircuitsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithDescription(description *string) *CircuitsCircuitsListParams { o.SetDescription(description) @@ -925,6 +1000,17 @@ func (o *CircuitsCircuitsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *CircuitsCircuitsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsCircuitsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -936,6 +1022,17 @@ func (o *CircuitsCircuitsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *CircuitsCircuitsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsCircuitsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -947,6 +1044,17 @@ func (o *CircuitsCircuitsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithLastUpdatedn(lastUpdatedn *string) *CircuitsCircuitsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithLimit(limit *int64) *CircuitsCircuitsListParams { o.SetLimit(limit) @@ -969,6 +1077,17 @@ func (o *CircuitsCircuitsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithOrdering(ordering *string) *CircuitsCircuitsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithProvider adds the provider to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithProvider(provider *string) *CircuitsCircuitsListParams { o.SetProvider(provider) @@ -1310,6 +1429,72 @@ func (o *CircuitsCircuitsListParams) SetTenantIDn(tenantIDn *string) { o.TenantIDn = tenantIDn } +// WithTerminationDate adds the terminationDate to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDate(terminationDate *string) *CircuitsCircuitsListParams { + o.SetTerminationDate(terminationDate) + return o +} + +// SetTerminationDate adds the terminationDate to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDate(terminationDate *string) { + o.TerminationDate = terminationDate +} + +// WithTerminationDateGt adds the terminationDateGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDateGt(terminationDateGt *string) *CircuitsCircuitsListParams { + o.SetTerminationDateGt(terminationDateGt) + return o +} + +// SetTerminationDateGt adds the terminationDateGt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDateGt(terminationDateGt *string) { + o.TerminationDateGt = terminationDateGt +} + +// WithTerminationDateGte adds the terminationDateGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDateGte(terminationDateGte *string) *CircuitsCircuitsListParams { + o.SetTerminationDateGte(terminationDateGte) + return o +} + +// SetTerminationDateGte adds the terminationDateGte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDateGte(terminationDateGte *string) { + o.TerminationDateGte = terminationDateGte +} + +// WithTerminationDateLt adds the terminationDateLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDateLt(terminationDateLt *string) *CircuitsCircuitsListParams { + o.SetTerminationDateLt(terminationDateLt) + return o +} + +// SetTerminationDateLt adds the terminationDateLt to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDateLt(terminationDateLt *string) { + o.TerminationDateLt = terminationDateLt +} + +// WithTerminationDateLte adds the terminationDateLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDateLte(terminationDateLte *string) *CircuitsCircuitsListParams { + o.SetTerminationDateLte(terminationDateLte) + return o +} + +// SetTerminationDateLte adds the terminationDateLte to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDateLte(terminationDateLte *string) { + o.TerminationDateLte = terminationDateLte +} + +// WithTerminationDaten adds the terminationDaten to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithTerminationDaten(terminationDaten *string) *CircuitsCircuitsListParams { + o.SetTerminationDaten(terminationDaten) + return o +} + +// SetTerminationDaten adds the terminationDateN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetTerminationDaten(terminationDaten *string) { + o.TerminationDaten = terminationDaten +} + // WithType adds the typeVar to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithType(typeVar *string) *CircuitsCircuitsListParams { o.SetType(typeVar) @@ -1753,6 +1938,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1770,6 +1972,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1787,6 +2006,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2178,6 +2414,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2195,6 +2448,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2212,6 +2482,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2246,6 +2533,23 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Provider != nil { // query param provider @@ -2773,6 +3077,108 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.TerminationDate != nil { + + // query param termination_date + var qrTerminationDate string + + if o.TerminationDate != nil { + qrTerminationDate = *o.TerminationDate + } + qTerminationDate := qrTerminationDate + if qTerminationDate != "" { + + if err := r.SetQueryParam("termination_date", qTerminationDate); err != nil { + return err + } + } + } + + if o.TerminationDateGt != nil { + + // query param termination_date__gt + var qrTerminationDateGt string + + if o.TerminationDateGt != nil { + qrTerminationDateGt = *o.TerminationDateGt + } + qTerminationDateGt := qrTerminationDateGt + if qTerminationDateGt != "" { + + if err := r.SetQueryParam("termination_date__gt", qTerminationDateGt); err != nil { + return err + } + } + } + + if o.TerminationDateGte != nil { + + // query param termination_date__gte + var qrTerminationDateGte string + + if o.TerminationDateGte != nil { + qrTerminationDateGte = *o.TerminationDateGte + } + qTerminationDateGte := qrTerminationDateGte + if qTerminationDateGte != "" { + + if err := r.SetQueryParam("termination_date__gte", qTerminationDateGte); err != nil { + return err + } + } + } + + if o.TerminationDateLt != nil { + + // query param termination_date__lt + var qrTerminationDateLt string + + if o.TerminationDateLt != nil { + qrTerminationDateLt = *o.TerminationDateLt + } + qTerminationDateLt := qrTerminationDateLt + if qTerminationDateLt != "" { + + if err := r.SetQueryParam("termination_date__lt", qTerminationDateLt); err != nil { + return err + } + } + } + + if o.TerminationDateLte != nil { + + // query param termination_date__lte + var qrTerminationDateLte string + + if o.TerminationDateLte != nil { + qrTerminationDateLte = *o.TerminationDateLte + } + qTerminationDateLte := qrTerminationDateLte + if qTerminationDateLte != "" { + + if err := r.SetQueryParam("termination_date__lte", qTerminationDateLte); err != nil { + return err + } + } + } + + if o.TerminationDaten != nil { + + // query param termination_date__n + var qrTerminationDaten string + + if o.TerminationDaten != nil { + qrTerminationDaten = *o.TerminationDaten + } + qTerminationDaten := qrTerminationDaten + if qTerminationDaten != "" { + + if err := r.SetQueryParam("termination_date__n", qTerminationDaten); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_client.go index 9d0a36a70..5393244b4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_client.go @@ -336,7 +336,7 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin } /* -CircuitsCircuitTerminationsList Overrides ListModelMixin to allow processing ExportTemplates. +CircuitsCircuitTerminationsList circuits circuit terminations list API */ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitTerminationsListOK, error) { // TODO: Validate the params before sending @@ -726,7 +726,7 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa } /* -CircuitsCircuitTypesList Overrides ListModelMixin to allow processing ExportTemplates. +CircuitsCircuitTypesList circuits circuit types list API */ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitTypesListOK, error) { // TODO: Validate the params before sending @@ -1077,7 +1077,7 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au } /* -CircuitsCircuitsList Overrides ListModelMixin to allow processing ExportTemplates. +CircuitsCircuitsList circuits circuits list API */ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsCircuitsListOK, error) { // TODO: Validate the params before sending @@ -1428,7 +1428,7 @@ func (a *Client) CircuitsProviderNetworksDelete(params *CircuitsProviderNetworks } /* -CircuitsProviderNetworksList Overrides ListModelMixin to allow processing ExportTemplates. +CircuitsProviderNetworksList circuits provider networks list API */ func (a *Client) CircuitsProviderNetworksList(params *CircuitsProviderNetworksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsProviderNetworksListOK, error) { // TODO: Validate the params before sending @@ -1779,7 +1779,7 @@ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, } /* -CircuitsProvidersList Overrides ListModelMixin to allow processing ExportTemplates. +CircuitsProvidersList circuits providers list API */ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CircuitsProvidersListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_provider_networks_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_provider_networks_list_parameters.go index 7fad92208..a5e055d99 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_provider_networks_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_provider_networks_list_parameters.go @@ -80,12 +80,21 @@ type CircuitsProviderNetworksListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type CircuitsProviderNetworksListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type CircuitsProviderNetworksListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Provider. Provider *string @@ -300,6 +324,17 @@ func (o *CircuitsProviderNetworksListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithCreatedGt(createdGt *string) *CircuitsProviderNetworksListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithCreatedGte(createdGte *string) *CircuitsProviderNetworksListParams { o.SetCreatedGte(createdGte) @@ -311,6 +346,17 @@ func (o *CircuitsProviderNetworksListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithCreatedLt(createdLt *string) *CircuitsProviderNetworksListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithCreatedLte(createdLte *string) *CircuitsProviderNetworksListParams { o.SetCreatedLte(createdLte) @@ -322,6 +368,17 @@ func (o *CircuitsProviderNetworksListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithCreatedn(createdn *string) *CircuitsProviderNetworksListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithDescription(description *string) *CircuitsProviderNetworksListParams { o.SetDescription(description) @@ -509,6 +566,17 @@ func (o *CircuitsProviderNetworksListParams) SetLastUpdated(lastUpdated *string) o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithLastUpdatedGt(lastUpdatedGt *string) *CircuitsProviderNetworksListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsProviderNetworksListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -520,6 +588,17 @@ func (o *CircuitsProviderNetworksListParams) SetLastUpdatedGte(lastUpdatedGte *s o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithLastUpdatedLt(lastUpdatedLt *string) *CircuitsProviderNetworksListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsProviderNetworksListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -531,6 +610,17 @@ func (o *CircuitsProviderNetworksListParams) SetLastUpdatedLte(lastUpdatedLte *s o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithLastUpdatedn(lastUpdatedn *string) *CircuitsProviderNetworksListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithLimit(limit *int64) *CircuitsProviderNetworksListParams { o.SetLimit(limit) @@ -663,6 +753,17 @@ func (o *CircuitsProviderNetworksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithOrdering(ordering *string) *CircuitsProviderNetworksListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithProvider adds the provider to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithProvider(provider *string) *CircuitsProviderNetworksListParams { o.SetProvider(provider) @@ -875,6 +976,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -892,6 +1010,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -909,6 +1044,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1198,6 +1350,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1215,6 +1384,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1232,6 +1418,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1436,6 +1639,23 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Provider != nil { // query param provider diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_providers_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_providers_list_parameters.go index 0c5572fdb..7271cc695 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_providers_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/circuits/circuits_providers_list_parameters.go @@ -152,12 +152,21 @@ type CircuitsProvidersListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -179,12 +188,21 @@ type CircuitsProvidersListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -227,6 +245,12 @@ type CircuitsProvidersListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -630,6 +654,17 @@ func (o *CircuitsProvidersListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreatedGt(createdGt *string) *CircuitsProvidersListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the circuits providers list params func (o *CircuitsProvidersListParams) WithCreatedGte(createdGte *string) *CircuitsProvidersListParams { o.SetCreatedGte(createdGte) @@ -641,6 +676,17 @@ func (o *CircuitsProvidersListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreatedLt(createdLt *string) *CircuitsProvidersListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the circuits providers list params func (o *CircuitsProvidersListParams) WithCreatedLte(createdLte *string) *CircuitsProvidersListParams { o.SetCreatedLte(createdLte) @@ -652,6 +698,17 @@ func (o *CircuitsProvidersListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the circuits providers list params +func (o *CircuitsProvidersListParams) WithCreatedn(createdn *string) *CircuitsProvidersListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the circuits providers list params +func (o *CircuitsProvidersListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the circuits providers list params func (o *CircuitsProvidersListParams) WithID(id *string) *CircuitsProvidersListParams { o.SetID(id) @@ -729,6 +786,17 @@ func (o *CircuitsProvidersListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdatedGt(lastUpdatedGt *string) *CircuitsProvidersListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the circuits providers list params func (o *CircuitsProvidersListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsProvidersListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -740,6 +808,17 @@ func (o *CircuitsProvidersListParams) SetLastUpdatedGte(lastUpdatedGte *string) o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdatedLt(lastUpdatedLt *string) *CircuitsProvidersListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the circuits providers list params func (o *CircuitsProvidersListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsProvidersListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -751,6 +830,17 @@ func (o *CircuitsProvidersListParams) SetLastUpdatedLte(lastUpdatedLte *string) o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the circuits providers list params +func (o *CircuitsProvidersListParams) WithLastUpdatedn(lastUpdatedn *string) *CircuitsProvidersListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the circuits providers list params +func (o *CircuitsProvidersListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the circuits providers list params func (o *CircuitsProvidersListParams) WithLimit(limit *int64) *CircuitsProvidersListParams { o.SetLimit(limit) @@ -883,6 +973,17 @@ func (o *CircuitsProvidersListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the circuits providers list params +func (o *CircuitsProvidersListParams) WithOrdering(ordering *string) *CircuitsProvidersListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the circuits providers list params +func (o *CircuitsProvidersListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the circuits providers list params func (o *CircuitsProvidersListParams) WithQ(q *string) *CircuitsProvidersListParams { o.SetQ(q) @@ -1591,6 +1692,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1608,6 +1726,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1625,6 +1760,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1744,6 +1896,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1761,6 +1930,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1778,6 +1964,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1982,6 +2185,23 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_parameters.go new file mode 100644 index 000000000..943744134 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_parameters.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDcimCableTerminationsBulkDeleteParams creates a new DcimCableTerminationsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsBulkDeleteParams() *DcimCableTerminationsBulkDeleteParams { + return &DcimCableTerminationsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsBulkDeleteParamsWithTimeout creates a new DcimCableTerminationsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsBulkDeleteParams { + return &DcimCableTerminationsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsBulkDeleteParamsWithContext creates a new DcimCableTerminationsBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsBulkDeleteParamsWithContext(ctx context.Context) *DcimCableTerminationsBulkDeleteParams { + return &DcimCableTerminationsBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsBulkDeleteParamsWithHTTPClient creates a new DcimCableTerminationsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsBulkDeleteParams { + return &DcimCableTerminationsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsBulkDeleteParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkDeleteParams) WithDefaults() *DcimCableTerminationsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) WithContext(ctx context.Context) *DcimCableTerminationsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations bulk delete params +func (o *DcimCableTerminationsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsBulkDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_responses.go new file mode 100644 index 000000000..633daa78e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// DcimCableTerminationsBulkDeleteReader is a Reader for the DcimCableTerminationsBulkDelete structure. +type DcimCableTerminationsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimCableTerminationsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsBulkDeleteNoContent creates a DcimCableTerminationsBulkDeleteNoContent with default headers values +func NewDcimCableTerminationsBulkDeleteNoContent() *DcimCableTerminationsBulkDeleteNoContent { + return &DcimCableTerminationsBulkDeleteNoContent{} +} + +/* +DcimCableTerminationsBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimCableTerminationsBulkDeleteNoContent dcim cable terminations bulk delete no content +*/ +type DcimCableTerminationsBulkDeleteNoContent struct { +} + +// IsSuccess returns true when this dcim cable terminations bulk delete no content response has a 2xx status code +func (o *DcimCableTerminationsBulkDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations bulk delete no content response has a 3xx status code +func (o *DcimCableTerminationsBulkDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations bulk delete no content response has a 4xx status code +func (o *DcimCableTerminationsBulkDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations bulk delete no content response has a 5xx status code +func (o *DcimCableTerminationsBulkDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations bulk delete no content response a status code equal to that given +func (o *DcimCableTerminationsBulkDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *DcimCableTerminationsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/cable-terminations/][%d] dcimCableTerminationsBulkDeleteNoContent ", 204) +} + +func (o *DcimCableTerminationsBulkDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /dcim/cable-terminations/][%d] dcimCableTerminationsBulkDeleteNoContent ", 204) +} + +func (o *DcimCableTerminationsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_parameters.go new file mode 100644 index 000000000..9a3c5c027 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewDcimCableTerminationsBulkPartialUpdateParams creates a new DcimCableTerminationsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsBulkPartialUpdateParams() *DcimCableTerminationsBulkPartialUpdateParams { + return &DcimCableTerminationsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsBulkPartialUpdateParamsWithTimeout creates a new DcimCableTerminationsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsBulkPartialUpdateParams { + return &DcimCableTerminationsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsBulkPartialUpdateParamsWithContext creates a new DcimCableTerminationsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimCableTerminationsBulkPartialUpdateParams { + return &DcimCableTerminationsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsBulkPartialUpdateParamsWithHTTPClient creates a new DcimCableTerminationsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsBulkPartialUpdateParams { + return &DcimCableTerminationsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsBulkPartialUpdateParams struct { + + // Data. + Data *models.CableTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkPartialUpdateParams) WithDefaults() *DcimCableTerminationsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimCableTerminationsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) WithData(data *models.CableTermination) *DcimCableTerminationsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim cable terminations bulk partial update params +func (o *DcimCableTerminationsBulkPartialUpdateParams) SetData(data *models.CableTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_responses.go new file mode 100644 index 000000000..0dd7e3563 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsBulkPartialUpdateReader is a Reader for the DcimCableTerminationsBulkPartialUpdate structure. +type DcimCableTerminationsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsBulkPartialUpdateOK creates a DcimCableTerminationsBulkPartialUpdateOK with default headers values +func NewDcimCableTerminationsBulkPartialUpdateOK() *DcimCableTerminationsBulkPartialUpdateOK { + return &DcimCableTerminationsBulkPartialUpdateOK{} +} + +/* +DcimCableTerminationsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimCableTerminationsBulkPartialUpdateOK dcim cable terminations bulk partial update o k +*/ +type DcimCableTerminationsBulkPartialUpdateOK struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations bulk partial update o k response has a 2xx status code +func (o *DcimCableTerminationsBulkPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations bulk partial update o k response has a 3xx status code +func (o *DcimCableTerminationsBulkPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations bulk partial update o k response has a 4xx status code +func (o *DcimCableTerminationsBulkPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations bulk partial update o k response has a 5xx status code +func (o *DcimCableTerminationsBulkPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations bulk partial update o k response a status code equal to that given +func (o *DcimCableTerminationsBulkPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/cable-terminations/][%d] dcimCableTerminationsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsBulkPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /dcim/cable-terminations/][%d] dcimCableTerminationsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsBulkPartialUpdateOK) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_parameters.go new file mode 100644 index 000000000..e4cad6a43 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewDcimCableTerminationsBulkUpdateParams creates a new DcimCableTerminationsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsBulkUpdateParams() *DcimCableTerminationsBulkUpdateParams { + return &DcimCableTerminationsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsBulkUpdateParamsWithTimeout creates a new DcimCableTerminationsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsBulkUpdateParams { + return &DcimCableTerminationsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsBulkUpdateParamsWithContext creates a new DcimCableTerminationsBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsBulkUpdateParamsWithContext(ctx context.Context) *DcimCableTerminationsBulkUpdateParams { + return &DcimCableTerminationsBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsBulkUpdateParamsWithHTTPClient creates a new DcimCableTerminationsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsBulkUpdateParams { + return &DcimCableTerminationsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsBulkUpdateParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsBulkUpdateParams struct { + + // Data. + Data *models.CableTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkUpdateParams) WithDefaults() *DcimCableTerminationsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) WithContext(ctx context.Context) *DcimCableTerminationsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) WithData(data *models.CableTermination) *DcimCableTerminationsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim cable terminations bulk update params +func (o *DcimCableTerminationsBulkUpdateParams) SetData(data *models.CableTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_responses.go new file mode 100644 index 000000000..36b5b9497 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_bulk_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsBulkUpdateReader is a Reader for the DcimCableTerminationsBulkUpdate structure. +type DcimCableTerminationsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsBulkUpdateOK creates a DcimCableTerminationsBulkUpdateOK with default headers values +func NewDcimCableTerminationsBulkUpdateOK() *DcimCableTerminationsBulkUpdateOK { + return &DcimCableTerminationsBulkUpdateOK{} +} + +/* +DcimCableTerminationsBulkUpdateOK describes a response with status code 200, with default header values. + +DcimCableTerminationsBulkUpdateOK dcim cable terminations bulk update o k +*/ +type DcimCableTerminationsBulkUpdateOK struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations bulk update o k response has a 2xx status code +func (o *DcimCableTerminationsBulkUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations bulk update o k response has a 3xx status code +func (o *DcimCableTerminationsBulkUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations bulk update o k response has a 4xx status code +func (o *DcimCableTerminationsBulkUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations bulk update o k response has a 5xx status code +func (o *DcimCableTerminationsBulkUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations bulk update o k response a status code equal to that given +func (o *DcimCableTerminationsBulkUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/cable-terminations/][%d] dcimCableTerminationsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsBulkUpdateOK) String() string { + return fmt.Sprintf("[PUT /dcim/cable-terminations/][%d] dcimCableTerminationsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsBulkUpdateOK) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_parameters.go new file mode 100644 index 000000000..a7cd7ea8e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewDcimCableTerminationsCreateParams creates a new DcimCableTerminationsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsCreateParams() *DcimCableTerminationsCreateParams { + return &DcimCableTerminationsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsCreateParamsWithTimeout creates a new DcimCableTerminationsCreateParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsCreateParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsCreateParams { + return &DcimCableTerminationsCreateParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsCreateParamsWithContext creates a new DcimCableTerminationsCreateParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsCreateParamsWithContext(ctx context.Context) *DcimCableTerminationsCreateParams { + return &DcimCableTerminationsCreateParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsCreateParamsWithHTTPClient creates a new DcimCableTerminationsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsCreateParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsCreateParams { + return &DcimCableTerminationsCreateParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsCreateParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations create operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsCreateParams struct { + + // Data. + Data *models.CableTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsCreateParams) WithDefaults() *DcimCableTerminationsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) WithContext(ctx context.Context) *DcimCableTerminationsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) WithData(data *models.CableTermination) *DcimCableTerminationsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim cable terminations create params +func (o *DcimCableTerminationsCreateParams) SetData(data *models.CableTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_responses.go new file mode 100644 index 000000000..31c845cb8 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_create_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsCreateReader is a Reader for the DcimCableTerminationsCreate structure. +type DcimCableTerminationsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimCableTerminationsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsCreateCreated creates a DcimCableTerminationsCreateCreated with default headers values +func NewDcimCableTerminationsCreateCreated() *DcimCableTerminationsCreateCreated { + return &DcimCableTerminationsCreateCreated{} +} + +/* +DcimCableTerminationsCreateCreated describes a response with status code 201, with default header values. + +DcimCableTerminationsCreateCreated dcim cable terminations create created +*/ +type DcimCableTerminationsCreateCreated struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations create created response has a 2xx status code +func (o *DcimCableTerminationsCreateCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations create created response has a 3xx status code +func (o *DcimCableTerminationsCreateCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations create created response has a 4xx status code +func (o *DcimCableTerminationsCreateCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations create created response has a 5xx status code +func (o *DcimCableTerminationsCreateCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations create created response a status code equal to that given +func (o *DcimCableTerminationsCreateCreated) IsCode(code int) bool { + return code == 201 +} + +func (o *DcimCableTerminationsCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/cable-terminations/][%d] dcimCableTerminationsCreateCreated %+v", 201, o.Payload) +} + +func (o *DcimCableTerminationsCreateCreated) String() string { + return fmt.Sprintf("[POST /dcim/cable-terminations/][%d] dcimCableTerminationsCreateCreated %+v", 201, o.Payload) +} + +func (o *DcimCableTerminationsCreateCreated) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_parameters.go new file mode 100644 index 000000000..c277982c3 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDcimCableTerminationsDeleteParams creates a new DcimCableTerminationsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsDeleteParams() *DcimCableTerminationsDeleteParams { + return &DcimCableTerminationsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsDeleteParamsWithTimeout creates a new DcimCableTerminationsDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsDeleteParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsDeleteParams { + return &DcimCableTerminationsDeleteParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsDeleteParamsWithContext creates a new DcimCableTerminationsDeleteParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsDeleteParamsWithContext(ctx context.Context) *DcimCableTerminationsDeleteParams { + return &DcimCableTerminationsDeleteParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsDeleteParamsWithHTTPClient creates a new DcimCableTerminationsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsDeleteParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsDeleteParams { + return &DcimCableTerminationsDeleteParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsDeleteParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations delete operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsDeleteParams struct { + + /* ID. + + A unique integer value identifying this cable termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsDeleteParams) WithDefaults() *DcimCableTerminationsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) WithContext(ctx context.Context) *DcimCableTerminationsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) WithID(id int64) *DcimCableTerminationsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim cable terminations delete params +func (o *DcimCableTerminationsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_responses.go new file mode 100644 index 000000000..28af817c6 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// DcimCableTerminationsDeleteReader is a Reader for the DcimCableTerminationsDelete structure. +type DcimCableTerminationsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimCableTerminationsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsDeleteNoContent creates a DcimCableTerminationsDeleteNoContent with default headers values +func NewDcimCableTerminationsDeleteNoContent() *DcimCableTerminationsDeleteNoContent { + return &DcimCableTerminationsDeleteNoContent{} +} + +/* +DcimCableTerminationsDeleteNoContent describes a response with status code 204, with default header values. + +DcimCableTerminationsDeleteNoContent dcim cable terminations delete no content +*/ +type DcimCableTerminationsDeleteNoContent struct { +} + +// IsSuccess returns true when this dcim cable terminations delete no content response has a 2xx status code +func (o *DcimCableTerminationsDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations delete no content response has a 3xx status code +func (o *DcimCableTerminationsDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations delete no content response has a 4xx status code +func (o *DcimCableTerminationsDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations delete no content response has a 5xx status code +func (o *DcimCableTerminationsDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations delete no content response a status code equal to that given +func (o *DcimCableTerminationsDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *DcimCableTerminationsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsDeleteNoContent ", 204) +} + +func (o *DcimCableTerminationsDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsDeleteNoContent ", 204) +} + +func (o *DcimCableTerminationsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_parameters.go new file mode 100644 index 000000000..0a15b21a2 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_parameters.go @@ -0,0 +1,805 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDcimCableTerminationsListParams creates a new DcimCableTerminationsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsListParams() *DcimCableTerminationsListParams { + return &DcimCableTerminationsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsListParamsWithTimeout creates a new DcimCableTerminationsListParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsListParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsListParams { + return &DcimCableTerminationsListParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsListParamsWithContext creates a new DcimCableTerminationsListParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsListParamsWithContext(ctx context.Context) *DcimCableTerminationsListParams { + return &DcimCableTerminationsListParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsListParamsWithHTTPClient creates a new DcimCableTerminationsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsListParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsListParams { + return &DcimCableTerminationsListParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsListParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations list operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsListParams struct { + + // Cable. + Cable *string + + // Cablen. + Cablen *string + + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + + // TerminationID. + TerminationID *string + + // TerminationIDGt. + TerminationIDGt *string + + // TerminationIDGte. + TerminationIDGte *string + + // TerminationIDLt. + TerminationIDLt *string + + // TerminationIDLte. + TerminationIDLte *string + + // TerminationIDn. + TerminationIDn *string + + // TerminationType. + TerminationType *string + + // TerminationTypen. + TerminationTypen *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsListParams) WithDefaults() *DcimCableTerminationsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithContext(ctx context.Context) *DcimCableTerminationsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCable adds the cable to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithCable(cable *string) *DcimCableTerminationsListParams { + o.SetCable(cable) + return o +} + +// SetCable adds the cable to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetCable(cable *string) { + o.Cable = cable +} + +// WithCablen adds the cablen to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithCablen(cablen *string) *DcimCableTerminationsListParams { + o.SetCablen(cablen) + return o +} + +// SetCablen adds the cableN to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetCablen(cablen *string) { + o.Cablen = cablen +} + +// WithCableEnd adds the cableEnd to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithCableEnd(cableEnd *string) *DcimCableTerminationsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithCableEndn(cableEndn *string) *DcimCableTerminationsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + +// WithID adds the id to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithID(id *string) *DcimCableTerminationsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithIDGt(iDGt *string) *DcimCableTerminationsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithIDGte(iDGte *string) *DcimCableTerminationsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithIDLt(iDLt *string) *DcimCableTerminationsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithIDLte(iDLte *string) *DcimCableTerminationsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithIDn(iDn *string) *DcimCableTerminationsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLimit adds the limit to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithLimit(limit *int64) *DcimCableTerminationsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithOffset(offset *int64) *DcimCableTerminationsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrdering adds the ordering to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithOrdering(ordering *string) *DcimCableTerminationsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + +// WithTerminationID adds the terminationID to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationID(terminationID *string) *DcimCableTerminationsListParams { + o.SetTerminationID(terminationID) + return o +} + +// SetTerminationID adds the terminationId to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationID(terminationID *string) { + o.TerminationID = terminationID +} + +// WithTerminationIDGt adds the terminationIDGt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationIDGt(terminationIDGt *string) *DcimCableTerminationsListParams { + o.SetTerminationIDGt(terminationIDGt) + return o +} + +// SetTerminationIDGt adds the terminationIdGt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationIDGt(terminationIDGt *string) { + o.TerminationIDGt = terminationIDGt +} + +// WithTerminationIDGte adds the terminationIDGte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationIDGte(terminationIDGte *string) *DcimCableTerminationsListParams { + o.SetTerminationIDGte(terminationIDGte) + return o +} + +// SetTerminationIDGte adds the terminationIdGte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationIDGte(terminationIDGte *string) { + o.TerminationIDGte = terminationIDGte +} + +// WithTerminationIDLt adds the terminationIDLt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationIDLt(terminationIDLt *string) *DcimCableTerminationsListParams { + o.SetTerminationIDLt(terminationIDLt) + return o +} + +// SetTerminationIDLt adds the terminationIdLt to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationIDLt(terminationIDLt *string) { + o.TerminationIDLt = terminationIDLt +} + +// WithTerminationIDLte adds the terminationIDLte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationIDLte(terminationIDLte *string) *DcimCableTerminationsListParams { + o.SetTerminationIDLte(terminationIDLte) + return o +} + +// SetTerminationIDLte adds the terminationIdLte to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationIDLte(terminationIDLte *string) { + o.TerminationIDLte = terminationIDLte +} + +// WithTerminationIDn adds the terminationIDn to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationIDn(terminationIDn *string) *DcimCableTerminationsListParams { + o.SetTerminationIDn(terminationIDn) + return o +} + +// SetTerminationIDn adds the terminationIdN to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationIDn(terminationIDn *string) { + o.TerminationIDn = terminationIDn +} + +// WithTerminationType adds the terminationType to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationType(terminationType *string) *DcimCableTerminationsListParams { + o.SetTerminationType(terminationType) + return o +} + +// SetTerminationType adds the terminationType to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationType(terminationType *string) { + o.TerminationType = terminationType +} + +// WithTerminationTypen adds the terminationTypen to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) WithTerminationTypen(terminationTypen *string) *DcimCableTerminationsListParams { + o.SetTerminationTypen(terminationTypen) + return o +} + +// SetTerminationTypen adds the terminationTypeN to the dcim cable terminations list params +func (o *DcimCableTerminationsListParams) SetTerminationTypen(terminationTypen *string) { + o.TerminationTypen = terminationTypen +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cable != nil { + + // query param cable + var qrCable string + + if o.Cable != nil { + qrCable = *o.Cable + } + qCable := qrCable + if qCable != "" { + + if err := r.SetQueryParam("cable", qCable); err != nil { + return err + } + } + } + + if o.Cablen != nil { + + // query param cable__n + var qrCablen string + + if o.Cablen != nil { + qrCablen = *o.Cablen + } + qCablen := qrCablen + if qCablen != "" { + + if err := r.SetQueryParam("cable__n", qCablen); err != nil { + return err + } + } + } + + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + + if o.TerminationID != nil { + + // query param termination_id + var qrTerminationID string + + if o.TerminationID != nil { + qrTerminationID = *o.TerminationID + } + qTerminationID := qrTerminationID + if qTerminationID != "" { + + if err := r.SetQueryParam("termination_id", qTerminationID); err != nil { + return err + } + } + } + + if o.TerminationIDGt != nil { + + // query param termination_id__gt + var qrTerminationIDGt string + + if o.TerminationIDGt != nil { + qrTerminationIDGt = *o.TerminationIDGt + } + qTerminationIDGt := qrTerminationIDGt + if qTerminationIDGt != "" { + + if err := r.SetQueryParam("termination_id__gt", qTerminationIDGt); err != nil { + return err + } + } + } + + if o.TerminationIDGte != nil { + + // query param termination_id__gte + var qrTerminationIDGte string + + if o.TerminationIDGte != nil { + qrTerminationIDGte = *o.TerminationIDGte + } + qTerminationIDGte := qrTerminationIDGte + if qTerminationIDGte != "" { + + if err := r.SetQueryParam("termination_id__gte", qTerminationIDGte); err != nil { + return err + } + } + } + + if o.TerminationIDLt != nil { + + // query param termination_id__lt + var qrTerminationIDLt string + + if o.TerminationIDLt != nil { + qrTerminationIDLt = *o.TerminationIDLt + } + qTerminationIDLt := qrTerminationIDLt + if qTerminationIDLt != "" { + + if err := r.SetQueryParam("termination_id__lt", qTerminationIDLt); err != nil { + return err + } + } + } + + if o.TerminationIDLte != nil { + + // query param termination_id__lte + var qrTerminationIDLte string + + if o.TerminationIDLte != nil { + qrTerminationIDLte = *o.TerminationIDLte + } + qTerminationIDLte := qrTerminationIDLte + if qTerminationIDLte != "" { + + if err := r.SetQueryParam("termination_id__lte", qTerminationIDLte); err != nil { + return err + } + } + } + + if o.TerminationIDn != nil { + + // query param termination_id__n + var qrTerminationIDn string + + if o.TerminationIDn != nil { + qrTerminationIDn = *o.TerminationIDn + } + qTerminationIDn := qrTerminationIDn + if qTerminationIDn != "" { + + if err := r.SetQueryParam("termination_id__n", qTerminationIDn); err != nil { + return err + } + } + } + + if o.TerminationType != nil { + + // query param termination_type + var qrTerminationType string + + if o.TerminationType != nil { + qrTerminationType = *o.TerminationType + } + qTerminationType := qrTerminationType + if qTerminationType != "" { + + if err := r.SetQueryParam("termination_type", qTerminationType); err != nil { + return err + } + } + } + + if o.TerminationTypen != nil { + + // query param termination_type__n + var qrTerminationTypen string + + if o.TerminationTypen != nil { + qrTerminationTypen = *o.TerminationTypen + } + qTerminationTypen := qrTerminationTypen + if qTerminationTypen != "" { + + if err := r.SetQueryParam("termination_type__n", qTerminationTypen); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_responses.go new file mode 100644 index 000000000..40f866b6e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_list_responses.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsListReader is a Reader for the DcimCableTerminationsList structure. +type DcimCableTerminationsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsListOK creates a DcimCableTerminationsListOK with default headers values +func NewDcimCableTerminationsListOK() *DcimCableTerminationsListOK { + return &DcimCableTerminationsListOK{} +} + +/* +DcimCableTerminationsListOK describes a response with status code 200, with default header values. + +DcimCableTerminationsListOK dcim cable terminations list o k +*/ +type DcimCableTerminationsListOK struct { + Payload *DcimCableTerminationsListOKBody +} + +// IsSuccess returns true when this dcim cable terminations list o k response has a 2xx status code +func (o *DcimCableTerminationsListOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations list o k response has a 3xx status code +func (o *DcimCableTerminationsListOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations list o k response has a 4xx status code +func (o *DcimCableTerminationsListOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations list o k response has a 5xx status code +func (o *DcimCableTerminationsListOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations list o k response a status code equal to that given +func (o *DcimCableTerminationsListOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsListOK) Error() string { + return fmt.Sprintf("[GET /dcim/cable-terminations/][%d] dcimCableTerminationsListOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsListOK) String() string { + return fmt.Sprintf("[GET /dcim/cable-terminations/][%d] dcimCableTerminationsListOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsListOK) GetPayload() *DcimCableTerminationsListOKBody { + return o.Payload +} + +func (o *DcimCableTerminationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimCableTerminationsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +DcimCableTerminationsListOKBody dcim cable terminations list o k body +swagger:model DcimCableTerminationsListOKBody +*/ +type DcimCableTerminationsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.CableTermination `json:"results"` +} + +// Validate validates this dcim cable terminations list o k body +func (o *DcimCableTerminationsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimCableTerminationsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimCableTerminationsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimCableTerminationsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimCableTerminationsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimCableTerminationsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimCableTerminationsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimCableTerminationsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimCableTerminationsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimCableTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimCableTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim cable terminations list o k body based on the context it is used +func (o *DcimCableTerminationsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimCableTerminationsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimCableTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimCableTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimCableTerminationsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimCableTerminationsListOKBody) UnmarshalBinary(b []byte) error { + var res DcimCableTerminationsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_parameters.go new file mode 100644 index 000000000..3015cfa90 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewDcimCableTerminationsPartialUpdateParams creates a new DcimCableTerminationsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsPartialUpdateParams() *DcimCableTerminationsPartialUpdateParams { + return &DcimCableTerminationsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsPartialUpdateParamsWithTimeout creates a new DcimCableTerminationsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsPartialUpdateParams { + return &DcimCableTerminationsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsPartialUpdateParamsWithContext creates a new DcimCableTerminationsPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsPartialUpdateParamsWithContext(ctx context.Context) *DcimCableTerminationsPartialUpdateParams { + return &DcimCableTerminationsPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsPartialUpdateParamsWithHTTPClient creates a new DcimCableTerminationsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsPartialUpdateParams { + return &DcimCableTerminationsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsPartialUpdateParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsPartialUpdateParams struct { + + // Data. + Data *models.CableTermination + + /* ID. + + A unique integer value identifying this cable termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsPartialUpdateParams) WithDefaults() *DcimCableTerminationsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) WithContext(ctx context.Context) *DcimCableTerminationsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) WithData(data *models.CableTermination) *DcimCableTerminationsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) SetData(data *models.CableTermination) { + o.Data = data +} + +// WithID adds the id to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) WithID(id int64) *DcimCableTerminationsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim cable terminations partial update params +func (o *DcimCableTerminationsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_responses.go new file mode 100644 index 000000000..2ee50d6c5 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsPartialUpdateReader is a Reader for the DcimCableTerminationsPartialUpdate structure. +type DcimCableTerminationsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsPartialUpdateOK creates a DcimCableTerminationsPartialUpdateOK with default headers values +func NewDcimCableTerminationsPartialUpdateOK() *DcimCableTerminationsPartialUpdateOK { + return &DcimCableTerminationsPartialUpdateOK{} +} + +/* +DcimCableTerminationsPartialUpdateOK describes a response with status code 200, with default header values. + +DcimCableTerminationsPartialUpdateOK dcim cable terminations partial update o k +*/ +type DcimCableTerminationsPartialUpdateOK struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations partial update o k response has a 2xx status code +func (o *DcimCableTerminationsPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations partial update o k response has a 3xx status code +func (o *DcimCableTerminationsPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations partial update o k response has a 4xx status code +func (o *DcimCableTerminationsPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations partial update o k response has a 5xx status code +func (o *DcimCableTerminationsPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations partial update o k response a status code equal to that given +func (o *DcimCableTerminationsPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsPartialUpdateOK) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_parameters.go new file mode 100644 index 000000000..a1f8c0104 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDcimCableTerminationsReadParams creates a new DcimCableTerminationsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsReadParams() *DcimCableTerminationsReadParams { + return &DcimCableTerminationsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsReadParamsWithTimeout creates a new DcimCableTerminationsReadParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsReadParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsReadParams { + return &DcimCableTerminationsReadParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsReadParamsWithContext creates a new DcimCableTerminationsReadParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsReadParamsWithContext(ctx context.Context) *DcimCableTerminationsReadParams { + return &DcimCableTerminationsReadParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsReadParamsWithHTTPClient creates a new DcimCableTerminationsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsReadParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsReadParams { + return &DcimCableTerminationsReadParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsReadParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations read operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsReadParams struct { + + /* ID. + + A unique integer value identifying this cable termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsReadParams) WithDefaults() *DcimCableTerminationsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) WithContext(ctx context.Context) *DcimCableTerminationsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) WithID(id int64) *DcimCableTerminationsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim cable terminations read params +func (o *DcimCableTerminationsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_responses.go new file mode 100644 index 000000000..325ac90c9 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_read_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsReadReader is a Reader for the DcimCableTerminationsRead structure. +type DcimCableTerminationsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsReadOK creates a DcimCableTerminationsReadOK with default headers values +func NewDcimCableTerminationsReadOK() *DcimCableTerminationsReadOK { + return &DcimCableTerminationsReadOK{} +} + +/* +DcimCableTerminationsReadOK describes a response with status code 200, with default header values. + +DcimCableTerminationsReadOK dcim cable terminations read o k +*/ +type DcimCableTerminationsReadOK struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations read o k response has a 2xx status code +func (o *DcimCableTerminationsReadOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations read o k response has a 3xx status code +func (o *DcimCableTerminationsReadOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations read o k response has a 4xx status code +func (o *DcimCableTerminationsReadOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations read o k response has a 5xx status code +func (o *DcimCableTerminationsReadOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations read o k response a status code equal to that given +func (o *DcimCableTerminationsReadOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsReadOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsReadOK) String() string { + return fmt.Sprintf("[GET /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsReadOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsReadOK) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_parameters.go new file mode 100644 index 000000000..bbb7d2216 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewDcimCableTerminationsUpdateParams creates a new DcimCableTerminationsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimCableTerminationsUpdateParams() *DcimCableTerminationsUpdateParams { + return &DcimCableTerminationsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimCableTerminationsUpdateParamsWithTimeout creates a new DcimCableTerminationsUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimCableTerminationsUpdateParamsWithTimeout(timeout time.Duration) *DcimCableTerminationsUpdateParams { + return &DcimCableTerminationsUpdateParams{ + timeout: timeout, + } +} + +// NewDcimCableTerminationsUpdateParamsWithContext creates a new DcimCableTerminationsUpdateParams object +// with the ability to set a context for a request. +func NewDcimCableTerminationsUpdateParamsWithContext(ctx context.Context) *DcimCableTerminationsUpdateParams { + return &DcimCableTerminationsUpdateParams{ + Context: ctx, + } +} + +// NewDcimCableTerminationsUpdateParamsWithHTTPClient creates a new DcimCableTerminationsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimCableTerminationsUpdateParamsWithHTTPClient(client *http.Client) *DcimCableTerminationsUpdateParams { + return &DcimCableTerminationsUpdateParams{ + HTTPClient: client, + } +} + +/* +DcimCableTerminationsUpdateParams contains all the parameters to send to the API endpoint + + for the dcim cable terminations update operation. + + Typically these are written to a http.Request. +*/ +type DcimCableTerminationsUpdateParams struct { + + // Data. + Data *models.CableTermination + + /* ID. + + A unique integer value identifying this cable termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim cable terminations update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsUpdateParams) WithDefaults() *DcimCableTerminationsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim cable terminations update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimCableTerminationsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) WithTimeout(timeout time.Duration) *DcimCableTerminationsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) WithContext(ctx context.Context) *DcimCableTerminationsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) WithHTTPClient(client *http.Client) *DcimCableTerminationsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) WithData(data *models.CableTermination) *DcimCableTerminationsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) SetData(data *models.CableTermination) { + o.Data = data +} + +// WithID adds the id to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) WithID(id int64) *DcimCableTerminationsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim cable terminations update params +func (o *DcimCableTerminationsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimCableTerminationsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_responses.go new file mode 100644 index 000000000..3078cd766 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cable_terminations_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// DcimCableTerminationsUpdateReader is a Reader for the DcimCableTerminationsUpdate structure. +type DcimCableTerminationsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimCableTerminationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimCableTerminationsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimCableTerminationsUpdateOK creates a DcimCableTerminationsUpdateOK with default headers values +func NewDcimCableTerminationsUpdateOK() *DcimCableTerminationsUpdateOK { + return &DcimCableTerminationsUpdateOK{} +} + +/* +DcimCableTerminationsUpdateOK describes a response with status code 200, with default header values. + +DcimCableTerminationsUpdateOK dcim cable terminations update o k +*/ +type DcimCableTerminationsUpdateOK struct { + Payload *models.CableTermination +} + +// IsSuccess returns true when this dcim cable terminations update o k response has a 2xx status code +func (o *DcimCableTerminationsUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this dcim cable terminations update o k response has a 3xx status code +func (o *DcimCableTerminationsUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this dcim cable terminations update o k response has a 4xx status code +func (o *DcimCableTerminationsUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this dcim cable terminations update o k response has a 5xx status code +func (o *DcimCableTerminationsUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this dcim cable terminations update o k response a status code equal to that given +func (o *DcimCableTerminationsUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *DcimCableTerminationsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsUpdateOK) String() string { + return fmt.Sprintf("[PUT /dcim/cable-terminations/{id}/][%d] dcimCableTerminationsUpdateOK %+v", 200, o.Payload) +} + +func (o *DcimCableTerminationsUpdateOK) GetPayload() *models.CableTermination { + return o.Payload +} + +func (o *DcimCableTerminationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CableTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cables_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cables_list_parameters.go index a44bc8e06..bdbd01d4c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cables_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_cables_list_parameters.go @@ -86,12 +86,21 @@ type DcimCablesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Device. Device *string @@ -149,12 +158,21 @@ type DcimCablesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + // Length. Length *string @@ -185,12 +203,24 @@ type DcimCablesListParams struct { */ Limit *int64 + // Location. + Location *string + + // LocationID. + LocationID *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -382,6 +412,17 @@ func (o *DcimCablesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim cables list params +func (o *DcimCablesListParams) WithCreatedGt(createdGt *string) *DcimCablesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim cables list params +func (o *DcimCablesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim cables list params func (o *DcimCablesListParams) WithCreatedGte(createdGte *string) *DcimCablesListParams { o.SetCreatedGte(createdGte) @@ -393,6 +434,17 @@ func (o *DcimCablesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim cables list params +func (o *DcimCablesListParams) WithCreatedLt(createdLt *string) *DcimCablesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim cables list params +func (o *DcimCablesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim cables list params func (o *DcimCablesListParams) WithCreatedLte(createdLte *string) *DcimCablesListParams { o.SetCreatedLte(createdLte) @@ -404,6 +456,17 @@ func (o *DcimCablesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim cables list params +func (o *DcimCablesListParams) WithCreatedn(createdn *string) *DcimCablesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim cables list params +func (o *DcimCablesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevice adds the device to the dcim cables list params func (o *DcimCablesListParams) WithDevice(device *string) *DcimCablesListParams { o.SetDevice(device) @@ -613,6 +676,17 @@ func (o *DcimCablesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim cables list params +func (o *DcimCablesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimCablesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim cables list params +func (o *DcimCablesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim cables list params func (o *DcimCablesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimCablesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -624,6 +698,17 @@ func (o *DcimCablesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim cables list params +func (o *DcimCablesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimCablesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim cables list params +func (o *DcimCablesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim cables list params func (o *DcimCablesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimCablesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -635,6 +720,17 @@ func (o *DcimCablesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim cables list params +func (o *DcimCablesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimCablesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim cables list params +func (o *DcimCablesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLength adds the length to the dcim cables list params func (o *DcimCablesListParams) WithLength(length *string) *DcimCablesListParams { o.SetLength(length) @@ -734,6 +830,28 @@ func (o *DcimCablesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the dcim cables list params +func (o *DcimCablesListParams) WithLocation(location *string) *DcimCablesListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim cables list params +func (o *DcimCablesListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationID adds the locationID to the dcim cables list params +func (o *DcimCablesListParams) WithLocationID(locationID *string) *DcimCablesListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim cables list params +func (o *DcimCablesListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + // WithOffset adds the offset to the dcim cables list params func (o *DcimCablesListParams) WithOffset(offset *int64) *DcimCablesListParams { o.SetOffset(offset) @@ -745,6 +863,17 @@ func (o *DcimCablesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim cables list params +func (o *DcimCablesListParams) WithOrdering(ordering *string) *DcimCablesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim cables list params +func (o *DcimCablesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim cables list params func (o *DcimCablesListParams) WithQ(q *string) *DcimCablesListParams { o.SetQ(q) @@ -1189,6 +1318,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1206,6 +1352,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1223,6 +1386,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Device != nil { // query param device @@ -1546,6 +1726,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1563,6 +1760,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1580,6 +1794,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Length != nil { // query param length @@ -1733,6 +1964,40 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -1750,6 +2015,23 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_client.go index af09f62d7..b47073bb8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_client.go @@ -45,6 +45,24 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + DcimCableTerminationsBulkDelete(params *DcimCableTerminationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkDeleteNoContent, error) + + DcimCableTerminationsBulkPartialUpdate(params *DcimCableTerminationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkPartialUpdateOK, error) + + DcimCableTerminationsBulkUpdate(params *DcimCableTerminationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkUpdateOK, error) + + DcimCableTerminationsCreate(params *DcimCableTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsCreateCreated, error) + + DcimCableTerminationsDelete(params *DcimCableTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsDeleteNoContent, error) + + DcimCableTerminationsList(params *DcimCableTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsListOK, error) + + DcimCableTerminationsPartialUpdate(params *DcimCableTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsPartialUpdateOK, error) + + DcimCableTerminationsRead(params *DcimCableTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsReadOK, error) + + DcimCableTerminationsUpdate(params *DcimCableTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsUpdateOK, error) + DcimCablesBulkDelete(params *DcimCablesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCablesBulkDeleteNoContent, error) DcimCablesBulkPartialUpdate(params *DcimCablesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCablesBulkPartialUpdateOK, error) @@ -772,6 +790,357 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +DcimCableTerminationsBulkDelete dcim cable terminations bulk delete API +*/ +func (a *Client) DcimCableTerminationsBulkDelete(params *DcimCableTerminationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/cable-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsBulkDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsBulkPartialUpdate dcim cable terminations bulk partial update API +*/ +func (a *Client) DcimCableTerminationsBulkPartialUpdate(params *DcimCableTerminationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/cable-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsBulkPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsBulkUpdate dcim cable terminations bulk update API +*/ +func (a *Client) DcimCableTerminationsBulkUpdate(params *DcimCableTerminationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_bulk_update", + Method: "PUT", + PathPattern: "/dcim/cable-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsBulkUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsCreate dcim cable terminations create API +*/ +func (a *Client) DcimCableTerminationsCreate(params *DcimCableTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_create", + Method: "POST", + PathPattern: "/dcim/cable-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsDelete dcim cable terminations delete API +*/ +func (a *Client) DcimCableTerminationsDelete(params *DcimCableTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_delete", + Method: "DELETE", + PathPattern: "/dcim/cable-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsList dcim cable terminations list API +*/ +func (a *Client) DcimCableTerminationsList(params *DcimCableTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_list", + Method: "GET", + PathPattern: "/dcim/cable-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsPartialUpdate dcim cable terminations partial update API +*/ +func (a *Client) DcimCableTerminationsPartialUpdate(params *DcimCableTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_partial_update", + Method: "PATCH", + PathPattern: "/dcim/cable-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsRead dcim cable terminations read API +*/ +func (a *Client) DcimCableTerminationsRead(params *DcimCableTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_read", + Method: "GET", + PathPattern: "/dcim/cable-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DcimCableTerminationsUpdate dcim cable terminations update API +*/ +func (a *Client) DcimCableTerminationsUpdate(params *DcimCableTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCableTerminationsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimCableTerminationsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_cable-terminations_update", + Method: "PUT", + PathPattern: "/dcim/cable-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimCableTerminationsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimCableTerminationsUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_cable-terminations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* DcimCablesBulkDelete dcim cables bulk delete API */ @@ -968,7 +1337,7 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti } /* -DcimCablesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimCablesList dcim cables list API */ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimCablesListOK, error) { // TODO: Validate the params before sending @@ -1364,7 +1733,7 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates } /* -DcimConsolePortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimConsolePortTemplatesList dcim console port templates list API */ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1715,7 +2084,7 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au } /* -DcimConsolePortsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimConsolePortsList dcim console ports list API */ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsolePortsListOK, error) { // TODO: Validate the params before sending @@ -2105,7 +2474,7 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP } /* -DcimConsoleServerPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimConsoleServerPortTemplatesList dcim console server port templates list API */ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleServerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -2456,7 +2825,7 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele } /* -DcimConsoleServerPortsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimConsoleServerPortsList dcim console server ports list API */ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimConsoleServerPortsListOK, error) { // TODO: Validate the params before sending @@ -2846,7 +3215,7 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele } /* -DcimDeviceBayTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimDeviceBayTemplatesList dcim device bay templates list API */ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceBayTemplatesListOK, error) { // TODO: Validate the params before sending @@ -3197,7 +3566,7 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn } /* -DcimDeviceBaysList Overrides ListModelMixin to allow processing ExportTemplates. +DcimDeviceBaysList dcim device bays list API */ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceBaysListOK, error) { // TODO: Validate the params before sending @@ -3548,7 +3917,7 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth } /* -DcimDeviceRolesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimDeviceRolesList dcim device roles list API */ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceRolesListOK, error) { // TODO: Validate the params before sending @@ -3899,7 +4268,7 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth } /* -DcimDeviceTypesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimDeviceTypesList dcim device types list API */ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDeviceTypesListOK, error) { // TODO: Validate the params before sending @@ -4250,7 +4619,7 @@ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo run } /* -DcimDevicesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimDevicesList dcim devices list API */ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimDevicesListOK, error) { // TODO: Validate the params before sending @@ -4640,7 +5009,7 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele } /* -DcimFrontPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimFrontPortTemplatesList dcim front port templates list API */ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimFrontPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -4991,7 +5360,7 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn } /* -DcimFrontPortsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimFrontPortsList dcim front ports list API */ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimFrontPortsListOK, error) { // TODO: Validate the params before sending @@ -5381,7 +5750,7 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele } /* -DcimInterfaceTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimInterfaceTemplatesList dcim interface templates list API */ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfaceTemplatesListOK, error) { // TODO: Validate the params before sending @@ -5732,7 +6101,7 @@ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authIn } /* -DcimInterfacesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimInterfacesList dcim interfaces list API */ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfacesListOK, error) { // TODO: Validate the params before sending @@ -6122,7 +6491,7 @@ func (a *Client) DcimInventoryItemRolesDelete(params *DcimInventoryItemRolesDele } /* -DcimInventoryItemRolesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimInventoryItemRolesList dcim inventory item roles list API */ func (a *Client) DcimInventoryItemRolesList(params *DcimInventoryItemRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesListOK, error) { // TODO: Validate the params before sending @@ -6473,7 +6842,7 @@ func (a *Client) DcimInventoryItemTemplatesDelete(params *DcimInventoryItemTempl } /* -DcimInventoryItemTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimInventoryItemTemplatesList dcim inventory item templates list API */ func (a *Client) DcimInventoryItemTemplatesList(params *DcimInventoryItemTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesListOK, error) { // TODO: Validate the params before sending @@ -6824,7 +7193,7 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams } /* -DcimInventoryItemsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimInventoryItemsList dcim inventory items list API */ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsListOK, error) { // TODO: Validate the params before sending @@ -7175,7 +7544,7 @@ func (a *Client) DcimLocationsDelete(params *DcimLocationsDeleteParams, authInfo } /* -DcimLocationsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimLocationsList dcim locations list API */ func (a *Client) DcimLocationsList(params *DcimLocationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsListOK, error) { // TODO: Validate the params before sending @@ -7526,7 +7895,7 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, } /* -DcimManufacturersList Overrides ListModelMixin to allow processing ExportTemplates. +DcimManufacturersList dcim manufacturers list API */ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersListOK, error) { // TODO: Validate the params before sending @@ -7877,7 +8246,7 @@ func (a *Client) DcimModuleBayTemplatesDelete(params *DcimModuleBayTemplatesDele } /* -DcimModuleBayTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimModuleBayTemplatesList dcim module bay templates list API */ func (a *Client) DcimModuleBayTemplatesList(params *DcimModuleBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesListOK, error) { // TODO: Validate the params before sending @@ -8228,7 +8597,7 @@ func (a *Client) DcimModuleBaysDelete(params *DcimModuleBaysDeleteParams, authIn } /* -DcimModuleBaysList Overrides ListModelMixin to allow processing ExportTemplates. +DcimModuleBaysList dcim module bays list API */ func (a *Client) DcimModuleBaysList(params *DcimModuleBaysListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysListOK, error) { // TODO: Validate the params before sending @@ -8579,7 +8948,7 @@ func (a *Client) DcimModuleTypesDelete(params *DcimModuleTypesDeleteParams, auth } /* -DcimModuleTypesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimModuleTypesList dcim module types list API */ func (a *Client) DcimModuleTypesList(params *DcimModuleTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesListOK, error) { // TODO: Validate the params before sending @@ -8930,7 +9299,7 @@ func (a *Client) DcimModulesDelete(params *DcimModulesDeleteParams, authInfo run } /* -DcimModulesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimModulesList dcim modules list API */ func (a *Client) DcimModulesList(params *DcimModulesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesListOK, error) { // TODO: Validate the params before sending @@ -9281,7 +9650,7 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo } /* -DcimPlatformsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPlatformsList dcim platforms list API */ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPlatformsListOK, error) { // TODO: Validate the params before sending @@ -9632,7 +10001,7 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn } /* -DcimPowerFeedsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerFeedsList dcim power feeds list API */ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerFeedsListOK, error) { // TODO: Validate the params before sending @@ -10022,7 +10391,7 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates } /* -DcimPowerOutletTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerOutletTemplatesList dcim power outlet templates list API */ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerOutletTemplatesListOK, error) { // TODO: Validate the params before sending @@ -10373,7 +10742,7 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au } /* -DcimPowerOutletsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerOutletsList dcim power outlets list API */ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerOutletsListOK, error) { // TODO: Validate the params before sending @@ -10763,7 +11132,7 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth } /* -DcimPowerPanelsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerPanelsList dcim power panels list API */ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPanelsListOK, error) { // TODO: Validate the params before sending @@ -11114,7 +11483,7 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele } /* -DcimPowerPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerPortTemplatesList dcim power port templates list API */ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -11465,7 +11834,7 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn } /* -DcimPowerPortsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimPowerPortsList dcim power ports list API */ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPowerPortsListOK, error) { // TODO: Validate the params before sending @@ -11855,7 +12224,7 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa } /* -DcimRackReservationsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRackReservationsList dcim rack reservations list API */ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRackReservationsListOK, error) { // TODO: Validate the params before sending @@ -12206,7 +12575,7 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo } /* -DcimRackRolesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRackRolesList dcim rack roles list API */ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRackRolesListOK, error) { // TODO: Validate the params before sending @@ -12596,7 +12965,7 @@ func (a *Client) DcimRacksElevation(params *DcimRacksElevationParams, authInfo r } /* -DcimRacksList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRacksList dcim racks list API */ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRacksListOK, error) { // TODO: Validate the params before sending @@ -12947,7 +13316,7 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete } /* -DcimRearPortTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRearPortTemplatesList dcim rear port templates list API */ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRearPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -13298,7 +13667,7 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo } /* -DcimRearPortsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRearPortsList dcim rear ports list API */ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRearPortsListOK, error) { // TODO: Validate the params before sending @@ -13688,7 +14057,7 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run } /* -DcimRegionsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimRegionsList dcim regions list API */ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimRegionsListOK, error) { // TODO: Validate the params before sending @@ -14039,7 +14408,7 @@ func (a *Client) DcimSiteGroupsDelete(params *DcimSiteGroupsDeleteParams, authIn } /* -DcimSiteGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +DcimSiteGroupsList dcim site groups list API */ func (a *Client) DcimSiteGroupsList(params *DcimSiteGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimSiteGroupsListOK, error) { // TODO: Validate the params before sending @@ -14390,7 +14759,7 @@ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime } /* -DcimSitesList Overrides ListModelMixin to allow processing ExportTemplates. +DcimSitesList dcim sites list API */ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimSitesListOK, error) { // TODO: Validate the params before sending @@ -14741,7 +15110,7 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams } /* -DcimVirtualChassisList Overrides ListModelMixin to allow processing ExportTemplates. +DcimVirtualChassisList dcim virtual chassis list API */ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimVirtualChassisListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_port_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_port_templates_list_parameters.go index 3b0eed570..e64b497fa 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_port_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_port_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimConsolePortTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -113,12 +122,21 @@ type DcimConsolePortTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -167,6 +185,12 @@ type DcimConsolePortTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -240,6 +264,17 @@ func (o *DcimConsolePortTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithCreatedGt(createdGt *string) *DcimConsolePortTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithCreatedGte(createdGte *string) *DcimConsolePortTemplatesListParams { o.SetCreatedGte(createdGte) @@ -251,6 +286,17 @@ func (o *DcimConsolePortTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithCreatedLt(createdLt *string) *DcimConsolePortTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithCreatedLte(createdLte *string) *DcimConsolePortTemplatesListParams { o.SetCreatedLte(createdLte) @@ -262,6 +308,17 @@ func (o *DcimConsolePortTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithCreatedn(createdn *string) *DcimConsolePortTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimConsolePortTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -361,6 +418,17 @@ func (o *DcimConsolePortTemplatesListParams) SetLastUpdated(lastUpdated *string) o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimConsolePortTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimConsolePortTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -372,6 +440,17 @@ func (o *DcimConsolePortTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *s o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimConsolePortTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimConsolePortTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -383,6 +462,17 @@ func (o *DcimConsolePortTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *s o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimConsolePortTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithLimit(limit *int64) *DcimConsolePortTemplatesListParams { o.SetLimit(limit) @@ -537,6 +627,17 @@ func (o *DcimConsolePortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithOrdering(ordering *string) *DcimConsolePortTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithQ(q *string) *DcimConsolePortTemplatesListParams { o.SetQ(q) @@ -595,6 +696,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -612,6 +730,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -629,6 +764,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -782,6 +934,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -799,6 +968,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -816,6 +1002,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1054,6 +1257,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_ports_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_ports_list_parameters.go index 029edc50d..54dd73d64 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_ports_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_ports_list_parameters.go @@ -77,6 +77,12 @@ DcimConsolePortsListParams contains all the parameters to send to the API endpoi */ type DcimConsolePortsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -86,12 +92,21 @@ type DcimConsolePortsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -185,12 +200,21 @@ type DcimConsolePortsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -245,15 +269,36 @@ type DcimConsolePortsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -367,6 +412,28 @@ func (o *DcimConsolePortsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithCableEnd(cableEnd *string) *DcimConsolePortsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithCableEndn(cableEndn *string) *DcimConsolePortsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim console ports list params func (o *DcimConsolePortsListParams) WithCabled(cabled *string) *DcimConsolePortsListParams { o.SetCabled(cabled) @@ -400,6 +467,17 @@ func (o *DcimConsolePortsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithCreatedGt(createdGt *string) *DcimConsolePortsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim console ports list params func (o *DcimConsolePortsListParams) WithCreatedGte(createdGte *string) *DcimConsolePortsListParams { o.SetCreatedGte(createdGte) @@ -411,6 +489,17 @@ func (o *DcimConsolePortsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithCreatedLt(createdLt *string) *DcimConsolePortsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim console ports list params func (o *DcimConsolePortsListParams) WithCreatedLte(createdLte *string) *DcimConsolePortsListParams { o.SetCreatedLte(createdLte) @@ -422,6 +511,17 @@ func (o *DcimConsolePortsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithCreatedn(createdn *string) *DcimConsolePortsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim console ports list params func (o *DcimConsolePortsListParams) WithDescription(description *string) *DcimConsolePortsListParams { o.SetDescription(description) @@ -763,6 +863,17 @@ func (o *DcimConsolePortsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimConsolePortsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim console ports list params func (o *DcimConsolePortsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimConsolePortsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -774,6 +885,17 @@ func (o *DcimConsolePortsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimConsolePortsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim console ports list params func (o *DcimConsolePortsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimConsolePortsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -785,6 +907,17 @@ func (o *DcimConsolePortsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimConsolePortsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim console ports list params func (o *DcimConsolePortsListParams) WithLimit(limit *int64) *DcimConsolePortsListParams { o.SetLimit(limit) @@ -972,6 +1105,17 @@ func (o *DcimConsolePortsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithOccupied(occupied *string) *DcimConsolePortsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim console ports list params func (o *DcimConsolePortsListParams) WithOffset(offset *int64) *DcimConsolePortsListParams { o.SetOffset(offset) @@ -983,6 +1127,17 @@ func (o *DcimConsolePortsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithOrdering(ordering *string) *DcimConsolePortsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim console ports list params func (o *DcimConsolePortsListParams) WithQ(q *string) *DcimConsolePortsListParams { o.SetQ(q) @@ -994,6 +1149,50 @@ func (o *DcimConsolePortsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRack(rack *string) *DcimConsolePortsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRackn(rackn *string) *DcimConsolePortsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRackID(rackID *string) *DcimConsolePortsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithRackIDn(rackIDn *string) *DcimConsolePortsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim console ports list params func (o *DcimConsolePortsListParams) WithRegion(region *string) *DcimConsolePortsListParams { o.SetRegion(region) @@ -1222,6 +1421,40 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1273,6 +1506,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1290,6 +1540,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1307,6 +1574,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1834,6 +2118,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1851,6 +2152,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1868,6 +2186,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2157,6 +2492,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2174,6 +2526,23 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2191,6 +2560,74 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go index 423b9b273..2259fd9fd 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimConsoleServerPortTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -113,12 +122,21 @@ type DcimConsoleServerPortTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -167,6 +185,12 @@ type DcimConsoleServerPortTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -240,6 +264,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithCreatedGt(createdGt *string) *DcimConsoleServerPortTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithCreatedGte(createdGte *string) *DcimConsoleServerPortTemplatesListParams { o.SetCreatedGte(createdGte) @@ -251,6 +286,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetCreatedGte(createdGte *str o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithCreatedLt(createdLt *string) *DcimConsoleServerPortTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithCreatedLte(createdLte *string) *DcimConsoleServerPortTemplatesListParams { o.SetCreatedLte(createdLte) @@ -262,6 +308,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetCreatedLte(createdLte *str o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithCreatedn(createdn *string) *DcimConsoleServerPortTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimConsoleServerPortTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -361,6 +418,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdated(lastUpdated *s o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimConsoleServerPortTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimConsoleServerPortTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -372,6 +440,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdatedGte(lastUpdated o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimConsoleServerPortTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimConsoleServerPortTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -383,6 +462,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdatedLte(lastUpdated o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimConsoleServerPortTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithLimit(limit *int64) *DcimConsoleServerPortTemplatesListParams { o.SetLimit(limit) @@ -537,6 +627,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithOrdering(ordering *string) *DcimConsoleServerPortTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithQ(q *string) *DcimConsoleServerPortTemplatesListParams { o.SetQ(q) @@ -595,6 +696,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -612,6 +730,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -629,6 +764,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -782,6 +934,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -799,6 +968,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -816,6 +1002,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1054,6 +1257,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_ports_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_ports_list_parameters.go index 57f01a4c3..764615cc9 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_ports_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_console_server_ports_list_parameters.go @@ -77,6 +77,12 @@ DcimConsoleServerPortsListParams contains all the parameters to send to the API */ type DcimConsoleServerPortsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -86,12 +92,21 @@ type DcimConsoleServerPortsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -185,12 +200,21 @@ type DcimConsoleServerPortsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -245,15 +269,36 @@ type DcimConsoleServerPortsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -367,6 +412,28 @@ func (o *DcimConsoleServerPortsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithCableEnd(cableEnd *string) *DcimConsoleServerPortsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithCableEndn(cableEndn *string) *DcimConsoleServerPortsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithCabled(cabled *string) *DcimConsoleServerPortsListParams { o.SetCabled(cabled) @@ -400,6 +467,17 @@ func (o *DcimConsoleServerPortsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithCreatedGt(createdGt *string) *DcimConsoleServerPortsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithCreatedGte(createdGte *string) *DcimConsoleServerPortsListParams { o.SetCreatedGte(createdGte) @@ -411,6 +489,17 @@ func (o *DcimConsoleServerPortsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithCreatedLt(createdLt *string) *DcimConsoleServerPortsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithCreatedLte(createdLte *string) *DcimConsoleServerPortsListParams { o.SetCreatedLte(createdLte) @@ -422,6 +511,17 @@ func (o *DcimConsoleServerPortsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithCreatedn(createdn *string) *DcimConsoleServerPortsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithDescription(description *string) *DcimConsoleServerPortsListParams { o.SetDescription(description) @@ -763,6 +863,17 @@ func (o *DcimConsoleServerPortsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimConsoleServerPortsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimConsoleServerPortsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -774,6 +885,17 @@ func (o *DcimConsoleServerPortsListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimConsoleServerPortsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimConsoleServerPortsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -785,6 +907,17 @@ func (o *DcimConsoleServerPortsListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimConsoleServerPortsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithLimit(limit *int64) *DcimConsoleServerPortsListParams { o.SetLimit(limit) @@ -972,6 +1105,17 @@ func (o *DcimConsoleServerPortsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithOccupied(occupied *string) *DcimConsoleServerPortsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithOffset(offset *int64) *DcimConsoleServerPortsListParams { o.SetOffset(offset) @@ -983,6 +1127,17 @@ func (o *DcimConsoleServerPortsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithOrdering(ordering *string) *DcimConsoleServerPortsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithQ(q *string) *DcimConsoleServerPortsListParams { o.SetQ(q) @@ -994,6 +1149,50 @@ func (o *DcimConsoleServerPortsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRack(rack *string) *DcimConsoleServerPortsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRackn(rackn *string) *DcimConsoleServerPortsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRackID(rackID *string) *DcimConsoleServerPortsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithRackIDn(rackIDn *string) *DcimConsoleServerPortsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithRegion(region *string) *DcimConsoleServerPortsListParams { o.SetRegion(region) @@ -1222,6 +1421,40 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1273,6 +1506,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1290,6 +1540,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1307,6 +1574,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1834,6 +2118,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1851,6 +2152,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1868,6 +2186,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2157,6 +2492,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2174,6 +2526,23 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2191,6 +2560,74 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go index 00fcae168..eea970f8a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimDeviceBayTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -113,12 +122,21 @@ type DcimDeviceBayTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -161,6 +179,12 @@ type DcimDeviceBayTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -228,6 +252,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithCreatedGt(createdGt *string) *DcimDeviceBayTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithCreatedGte(createdGte *string) *DcimDeviceBayTemplatesListParams { o.SetCreatedGte(createdGte) @@ -239,6 +274,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithCreatedLt(createdLt *string) *DcimDeviceBayTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithCreatedLte(createdLte *string) *DcimDeviceBayTemplatesListParams { o.SetCreatedLte(createdLte) @@ -250,6 +296,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithCreatedn(createdn *string) *DcimDeviceBayTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimDeviceBayTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -349,6 +406,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimDeviceBayTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDeviceBayTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -360,6 +428,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimDeviceBayTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDeviceBayTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -371,6 +450,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimDeviceBayTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithLimit(limit *int64) *DcimDeviceBayTemplatesListParams { o.SetLimit(limit) @@ -503,6 +593,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithOrdering(ordering *string) *DcimDeviceBayTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithQ(q *string) *DcimDeviceBayTemplatesListParams { o.SetQ(q) @@ -539,6 +640,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -556,6 +674,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -573,6 +708,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -726,6 +878,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -743,6 +912,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -760,6 +946,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -964,6 +1167,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bays_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bays_list_parameters.go index 26bba3b55..c14c53fc6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bays_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_bays_list_parameters.go @@ -80,12 +80,21 @@ type DcimDeviceBaysListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -179,12 +188,21 @@ type DcimDeviceBaysListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -239,9 +257,27 @@ type DcimDeviceBaysListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -360,6 +396,17 @@ func (o *DcimDeviceBaysListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithCreatedGt(createdGt *string) *DcimDeviceBaysListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithCreatedGte(createdGte *string) *DcimDeviceBaysListParams { o.SetCreatedGte(createdGte) @@ -371,6 +418,17 @@ func (o *DcimDeviceBaysListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithCreatedLt(createdLt *string) *DcimDeviceBaysListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithCreatedLte(createdLte *string) *DcimDeviceBaysListParams { o.SetCreatedLte(createdLte) @@ -382,6 +440,17 @@ func (o *DcimDeviceBaysListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithCreatedn(createdn *string) *DcimDeviceBaysListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithDescription(description *string) *DcimDeviceBaysListParams { o.SetDescription(description) @@ -723,6 +792,17 @@ func (o *DcimDeviceBaysListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimDeviceBaysListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDeviceBaysListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -734,6 +814,17 @@ func (o *DcimDeviceBaysListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimDeviceBaysListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDeviceBaysListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -745,6 +836,17 @@ func (o *DcimDeviceBaysListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimDeviceBaysListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithLimit(limit *int64) *DcimDeviceBaysListParams { o.SetLimit(limit) @@ -921,6 +1023,17 @@ func (o *DcimDeviceBaysListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithOrdering(ordering *string) *DcimDeviceBaysListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithQ(q *string) *DcimDeviceBaysListParams { o.SetQ(q) @@ -932,6 +1045,50 @@ func (o *DcimDeviceBaysListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRack(rack *string) *DcimDeviceBaysListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRackn(rackn *string) *DcimDeviceBaysListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRackID(rackID *string) *DcimDeviceBaysListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithRackIDn(rackIDn *string) *DcimDeviceBaysListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithRegion(region *string) *DcimDeviceBaysListParams { o.SetRegion(region) @@ -1155,6 +1312,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1172,6 +1346,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1189,6 +1380,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1716,6 +1924,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1733,6 +1958,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1750,6 +1992,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2022,6 +2281,23 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2039,6 +2315,74 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_roles_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_roles_list_parameters.go index 4634a7d87..a8f81604c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_roles_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_roles_list_parameters.go @@ -110,12 +110,21 @@ type DcimDeviceRolesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -167,12 +176,21 @@ type DcimDeviceRolesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -215,6 +233,12 @@ type DcimDeviceRolesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -431,6 +455,17 @@ func (o *DcimDeviceRolesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithCreatedGt(createdGt *string) *DcimDeviceRolesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithCreatedGte(createdGte *string) *DcimDeviceRolesListParams { o.SetCreatedGte(createdGte) @@ -442,6 +477,17 @@ func (o *DcimDeviceRolesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithCreatedLt(createdLt *string) *DcimDeviceRolesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithCreatedLte(createdLte *string) *DcimDeviceRolesListParams { o.SetCreatedLte(createdLte) @@ -453,6 +499,17 @@ func (o *DcimDeviceRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithCreatedn(createdn *string) *DcimDeviceRolesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithDescription(description *string) *DcimDeviceRolesListParams { o.SetDescription(description) @@ -640,6 +697,17 @@ func (o *DcimDeviceRolesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimDeviceRolesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDeviceRolesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -651,6 +719,17 @@ func (o *DcimDeviceRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimDeviceRolesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDeviceRolesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -662,6 +741,17 @@ func (o *DcimDeviceRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimDeviceRolesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithLimit(limit *int64) *DcimDeviceRolesListParams { o.SetLimit(limit) @@ -794,6 +884,17 @@ func (o *DcimDeviceRolesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithOrdering(ordering *string) *DcimDeviceRolesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithQ(q *string) *DcimDeviceRolesListParams { o.SetQ(q) @@ -1143,6 +1244,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1160,6 +1278,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1177,6 +1312,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1466,6 +1618,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1483,6 +1652,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1500,6 +1686,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1704,6 +1907,23 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_types_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_types_list_parameters.go index 5180823a6..393ef0e05 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_types_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_device_types_list_parameters.go @@ -92,15 +92,30 @@ type DcimDeviceTypesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DeviceBays. DeviceBays *string + // HasFrontImage. + HasFrontImage *string + + // HasRearImage. + HasRearImage *string + // ID. ID *string @@ -131,12 +146,21 @@ type DcimDeviceTypesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -194,6 +218,12 @@ type DcimDeviceTypesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // PartNumber. PartNumber *string @@ -404,6 +434,17 @@ func (o *DcimDeviceTypesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreatedGt(createdGt *string) *DcimDeviceTypesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim device types list params func (o *DcimDeviceTypesListParams) WithCreatedGte(createdGte *string) *DcimDeviceTypesListParams { o.SetCreatedGte(createdGte) @@ -415,6 +456,17 @@ func (o *DcimDeviceTypesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreatedLt(createdLt *string) *DcimDeviceTypesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim device types list params func (o *DcimDeviceTypesListParams) WithCreatedLte(createdLte *string) *DcimDeviceTypesListParams { o.SetCreatedLte(createdLte) @@ -426,6 +478,17 @@ func (o *DcimDeviceTypesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithCreatedn(createdn *string) *DcimDeviceTypesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDeviceBays adds the deviceBays to the dcim device types list params func (o *DcimDeviceTypesListParams) WithDeviceBays(deviceBays *string) *DcimDeviceTypesListParams { o.SetDeviceBays(deviceBays) @@ -437,6 +500,28 @@ func (o *DcimDeviceTypesListParams) SetDeviceBays(deviceBays *string) { o.DeviceBays = deviceBays } +// WithHasFrontImage adds the hasFrontImage to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithHasFrontImage(hasFrontImage *string) *DcimDeviceTypesListParams { + o.SetHasFrontImage(hasFrontImage) + return o +} + +// SetHasFrontImage adds the hasFrontImage to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetHasFrontImage(hasFrontImage *string) { + o.HasFrontImage = hasFrontImage +} + +// WithHasRearImage adds the hasRearImage to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithHasRearImage(hasRearImage *string) *DcimDeviceTypesListParams { + o.SetHasRearImage(hasRearImage) + return o +} + +// SetHasRearImage adds the hasRearImage to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetHasRearImage(hasRearImage *string) { + o.HasRearImage = hasRearImage +} + // WithID adds the id to the dcim device types list params func (o *DcimDeviceTypesListParams) WithID(id *string) *DcimDeviceTypesListParams { o.SetID(id) @@ -547,6 +632,17 @@ func (o *DcimDeviceTypesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimDeviceTypesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim device types list params func (o *DcimDeviceTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDeviceTypesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -558,6 +654,17 @@ func (o *DcimDeviceTypesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimDeviceTypesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim device types list params func (o *DcimDeviceTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDeviceTypesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -569,6 +676,17 @@ func (o *DcimDeviceTypesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimDeviceTypesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim device types list params func (o *DcimDeviceTypesListParams) WithLimit(limit *int64) *DcimDeviceTypesListParams { o.SetLimit(limit) @@ -756,6 +874,17 @@ func (o *DcimDeviceTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithOrdering(ordering *string) *DcimDeviceTypesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPartNumber adds the partNumber to the dcim device types list params func (o *DcimDeviceTypesListParams) WithPartNumber(partNumber *string) *DcimDeviceTypesListParams { o.SetPartNumber(partNumber) @@ -1223,6 +1352,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1240,6 +1386,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1257,6 +1420,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DeviceBays != nil { // query param device_bays @@ -1274,6 +1454,40 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.HasFrontImage != nil { + + // query param has_front_image + var qrHasFrontImage string + + if o.HasFrontImage != nil { + qrHasFrontImage = *o.HasFrontImage + } + qHasFrontImage := qrHasFrontImage + if qHasFrontImage != "" { + + if err := r.SetQueryParam("has_front_image", qHasFrontImage); err != nil { + return err + } + } + } + + if o.HasRearImage != nil { + + // query param has_rear_image + var qrHasRearImage string + + if o.HasRearImage != nil { + qrHasRearImage = *o.HasRearImage + } + qHasRearImage := qrHasRearImage + if qHasRearImage != "" { + + if err := r.SetQueryParam("has_rear_image", qHasRearImage); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1444,6 +1658,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1461,6 +1692,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1478,6 +1726,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1767,6 +2032,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.PartNumber != nil { // query param part_number diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_devices_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_devices_list_parameters.go index f60092314..1b26bc552 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_devices_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_devices_list_parameters.go @@ -146,15 +146,30 @@ type DcimDevicesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DeviceBays. DeviceBays *string + // DeviceType. + DeviceType *string + + // DeviceTypen. + DeviceTypen *string + // DeviceTypeID. DeviceTypeID *string @@ -197,12 +212,21 @@ type DcimDevicesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -305,6 +329,12 @@ type DcimDevicesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // ParentDeviceID. ParentDeviceID *string @@ -824,6 +854,17 @@ func (o *DcimDevicesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim devices list params +func (o *DcimDevicesListParams) WithCreatedGt(createdGt *string) *DcimDevicesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim devices list params +func (o *DcimDevicesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim devices list params func (o *DcimDevicesListParams) WithCreatedGte(createdGte *string) *DcimDevicesListParams { o.SetCreatedGte(createdGte) @@ -835,6 +876,17 @@ func (o *DcimDevicesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim devices list params +func (o *DcimDevicesListParams) WithCreatedLt(createdLt *string) *DcimDevicesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim devices list params +func (o *DcimDevicesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim devices list params func (o *DcimDevicesListParams) WithCreatedLte(createdLte *string) *DcimDevicesListParams { o.SetCreatedLte(createdLte) @@ -846,6 +898,17 @@ func (o *DcimDevicesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim devices list params +func (o *DcimDevicesListParams) WithCreatedn(createdn *string) *DcimDevicesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim devices list params +func (o *DcimDevicesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDeviceBays adds the deviceBays to the dcim devices list params func (o *DcimDevicesListParams) WithDeviceBays(deviceBays *string) *DcimDevicesListParams { o.SetDeviceBays(deviceBays) @@ -857,6 +920,28 @@ func (o *DcimDevicesListParams) SetDeviceBays(deviceBays *string) { o.DeviceBays = deviceBays } +// WithDeviceType adds the deviceType to the dcim devices list params +func (o *DcimDevicesListParams) WithDeviceType(deviceType *string) *DcimDevicesListParams { + o.SetDeviceType(deviceType) + return o +} + +// SetDeviceType adds the deviceType to the dcim devices list params +func (o *DcimDevicesListParams) SetDeviceType(deviceType *string) { + o.DeviceType = deviceType +} + +// WithDeviceTypen adds the deviceTypen to the dcim devices list params +func (o *DcimDevicesListParams) WithDeviceTypen(deviceTypen *string) *DcimDevicesListParams { + o.SetDeviceTypen(deviceTypen) + return o +} + +// SetDeviceTypen adds the deviceTypeN to the dcim devices list params +func (o *DcimDevicesListParams) SetDeviceTypen(deviceTypen *string) { + o.DeviceTypen = deviceTypen +} + // WithDeviceTypeID adds the deviceTypeID to the dcim devices list params func (o *DcimDevicesListParams) WithDeviceTypeID(deviceTypeID *string) *DcimDevicesListParams { o.SetDeviceTypeID(deviceTypeID) @@ -1011,6 +1096,17 @@ func (o *DcimDevicesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimDevicesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim devices list params func (o *DcimDevicesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimDevicesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -1022,6 +1118,17 @@ func (o *DcimDevicesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimDevicesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim devices list params func (o *DcimDevicesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimDevicesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -1033,6 +1140,17 @@ func (o *DcimDevicesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim devices list params +func (o *DcimDevicesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimDevicesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim devices list params +func (o *DcimDevicesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim devices list params func (o *DcimDevicesListParams) WithLimit(limit *int64) *DcimDevicesListParams { o.SetLimit(limit) @@ -1385,6 +1503,17 @@ func (o *DcimDevicesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim devices list params +func (o *DcimDevicesListParams) WithOrdering(ordering *string) *DcimDevicesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim devices list params +func (o *DcimDevicesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParentDeviceID adds the parentDeviceID to the dcim devices list params func (o *DcimDevicesListParams) WithParentDeviceID(parentDeviceID *string) *DcimDevicesListParams { o.SetParentDeviceID(parentDeviceID) @@ -2565,6 +2694,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -2582,6 +2728,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -2599,6 +2762,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DeviceBays != nil { // query param device_bays @@ -2616,6 +2796,40 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.DeviceType != nil { + + // query param device_type + var qrDeviceType string + + if o.DeviceType != nil { + qrDeviceType = *o.DeviceType + } + qDeviceType := qrDeviceType + if qDeviceType != "" { + + if err := r.SetQueryParam("device_type", qDeviceType); err != nil { + return err + } + } + } + + if o.DeviceTypen != nil { + + // query param device_type__n + var qrDeviceTypen string + + if o.DeviceTypen != nil { + qrDeviceTypen = *o.DeviceTypen + } + qDeviceTypen := qrDeviceTypen + if qDeviceTypen != "" { + + if err := r.SetQueryParam("device_type__n", qDeviceTypen); err != nil { + return err + } + } + } + if o.DeviceTypeID != nil { // query param device_type_id @@ -2854,6 +3068,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2871,6 +3102,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2888,6 +3136,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -3432,6 +3697,23 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.ParentDeviceID != nil { // query param parent_device_id diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_port_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_port_templates_list_parameters.go index 08aa5c21f..1407694dc 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_port_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_port_templates_list_parameters.go @@ -110,12 +110,21 @@ type DcimFrontPortTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -143,12 +152,21 @@ type DcimFrontPortTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -197,6 +215,12 @@ type DcimFrontPortTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -380,6 +404,17 @@ func (o *DcimFrontPortTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithCreatedGt(createdGt *string) *DcimFrontPortTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithCreatedGte(createdGte *string) *DcimFrontPortTemplatesListParams { o.SetCreatedGte(createdGte) @@ -391,6 +426,17 @@ func (o *DcimFrontPortTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithCreatedLt(createdLt *string) *DcimFrontPortTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithCreatedLte(createdLte *string) *DcimFrontPortTemplatesListParams { o.SetCreatedLte(createdLte) @@ -402,6 +448,17 @@ func (o *DcimFrontPortTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithCreatedn(createdn *string) *DcimFrontPortTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimFrontPortTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -501,6 +558,17 @@ func (o *DcimFrontPortTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimFrontPortTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimFrontPortTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -512,6 +580,17 @@ func (o *DcimFrontPortTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimFrontPortTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimFrontPortTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -523,6 +602,17 @@ func (o *DcimFrontPortTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimFrontPortTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithLimit(limit *int64) *DcimFrontPortTemplatesListParams { o.SetLimit(limit) @@ -677,6 +767,17 @@ func (o *DcimFrontPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithOrdering(ordering *string) *DcimFrontPortTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithQ(q *string) *DcimFrontPortTemplatesListParams { o.SetQ(q) @@ -905,6 +1006,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -922,6 +1040,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -939,6 +1074,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -1092,6 +1244,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1109,6 +1278,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1126,6 +1312,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1364,6 +1567,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_ports_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_ports_list_parameters.go index c650a9e97..c1239a876 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_ports_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_front_ports_list_parameters.go @@ -77,6 +77,12 @@ DcimFrontPortsListParams contains all the parameters to send to the API endpoint */ type DcimFrontPortsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -113,12 +119,21 @@ type DcimFrontPortsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -212,12 +227,21 @@ type DcimFrontPortsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -272,15 +296,36 @@ type DcimFrontPortsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -394,6 +439,28 @@ func (o *DcimFrontPortsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithCableEnd(cableEnd *string) *DcimFrontPortsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithCableEndn(cableEndn *string) *DcimFrontPortsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim front ports list params func (o *DcimFrontPortsListParams) WithCabled(cabled *string) *DcimFrontPortsListParams { o.SetCabled(cabled) @@ -526,6 +593,17 @@ func (o *DcimFrontPortsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithCreatedGt(createdGt *string) *DcimFrontPortsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim front ports list params func (o *DcimFrontPortsListParams) WithCreatedGte(createdGte *string) *DcimFrontPortsListParams { o.SetCreatedGte(createdGte) @@ -537,6 +615,17 @@ func (o *DcimFrontPortsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithCreatedLt(createdLt *string) *DcimFrontPortsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim front ports list params func (o *DcimFrontPortsListParams) WithCreatedLte(createdLte *string) *DcimFrontPortsListParams { o.SetCreatedLte(createdLte) @@ -548,6 +637,17 @@ func (o *DcimFrontPortsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithCreatedn(createdn *string) *DcimFrontPortsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim front ports list params func (o *DcimFrontPortsListParams) WithDescription(description *string) *DcimFrontPortsListParams { o.SetDescription(description) @@ -889,6 +989,17 @@ func (o *DcimFrontPortsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimFrontPortsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim front ports list params func (o *DcimFrontPortsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimFrontPortsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -900,6 +1011,17 @@ func (o *DcimFrontPortsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimFrontPortsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim front ports list params func (o *DcimFrontPortsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimFrontPortsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -911,6 +1033,17 @@ func (o *DcimFrontPortsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimFrontPortsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim front ports list params func (o *DcimFrontPortsListParams) WithLimit(limit *int64) *DcimFrontPortsListParams { o.SetLimit(limit) @@ -1098,6 +1231,17 @@ func (o *DcimFrontPortsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithOccupied(occupied *string) *DcimFrontPortsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim front ports list params func (o *DcimFrontPortsListParams) WithOffset(offset *int64) *DcimFrontPortsListParams { o.SetOffset(offset) @@ -1109,6 +1253,17 @@ func (o *DcimFrontPortsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithOrdering(ordering *string) *DcimFrontPortsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim front ports list params func (o *DcimFrontPortsListParams) WithQ(q *string) *DcimFrontPortsListParams { o.SetQ(q) @@ -1120,6 +1275,50 @@ func (o *DcimFrontPortsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRack(rack *string) *DcimFrontPortsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRackn(rackn *string) *DcimFrontPortsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRackID(rackID *string) *DcimFrontPortsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithRackIDn(rackIDn *string) *DcimFrontPortsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim front ports list params func (o *DcimFrontPortsListParams) WithRegion(region *string) *DcimFrontPortsListParams { o.SetRegion(region) @@ -1348,6 +1547,40 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1552,6 +1785,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1569,6 +1819,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1586,6 +1853,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2113,6 +2397,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2130,6 +2431,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2147,6 +2465,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2436,6 +2771,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2453,6 +2805,23 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2470,6 +2839,74 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interface_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interface_templates_list_parameters.go index 626ee4855..b5eeb52a6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interface_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interface_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimInterfaceTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -113,12 +122,21 @@ type DcimInterfaceTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -170,6 +188,24 @@ type DcimInterfaceTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + + // PoeMode. + PoeMode *string + + // PoeModen. + PoeModen *string + + // PoeType. + PoeType *string + + // PoeTypen. + PoeTypen *string + // Q. Q *string @@ -243,6 +279,17 @@ func (o *DcimInterfaceTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithCreatedGt(createdGt *string) *DcimInterfaceTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithCreatedGte(createdGte *string) *DcimInterfaceTemplatesListParams { o.SetCreatedGte(createdGte) @@ -254,6 +301,17 @@ func (o *DcimInterfaceTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithCreatedLt(createdLt *string) *DcimInterfaceTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithCreatedLte(createdLte *string) *DcimInterfaceTemplatesListParams { o.SetCreatedLte(createdLte) @@ -265,6 +323,17 @@ func (o *DcimInterfaceTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithCreatedn(createdn *string) *DcimInterfaceTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimInterfaceTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -364,6 +433,17 @@ func (o *DcimInterfaceTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimInterfaceTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInterfaceTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -375,6 +455,17 @@ func (o *DcimInterfaceTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimInterfaceTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInterfaceTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -386,6 +477,17 @@ func (o *DcimInterfaceTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimInterfaceTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithLimit(limit *int64) *DcimInterfaceTemplatesListParams { o.SetLimit(limit) @@ -551,6 +653,61 @@ func (o *DcimInterfaceTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithOrdering(ordering *string) *DcimInterfaceTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + +// WithPoeMode adds the poeMode to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithPoeMode(poeMode *string) *DcimInterfaceTemplatesListParams { + o.SetPoeMode(poeMode) + return o +} + +// SetPoeMode adds the poeMode to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetPoeMode(poeMode *string) { + o.PoeMode = poeMode +} + +// WithPoeModen adds the poeModen to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithPoeModen(poeModen *string) *DcimInterfaceTemplatesListParams { + o.SetPoeModen(poeModen) + return o +} + +// SetPoeModen adds the poeModeN to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetPoeModen(poeModen *string) { + o.PoeModen = poeModen +} + +// WithPoeType adds the poeType to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithPoeType(poeType *string) *DcimInterfaceTemplatesListParams { + o.SetPoeType(poeType) + return o +} + +// SetPoeType adds the poeType to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetPoeType(poeType *string) { + o.PoeType = poeType +} + +// WithPoeTypen adds the poeTypen to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithPoeTypen(poeTypen *string) *DcimInterfaceTemplatesListParams { + o.SetPoeTypen(poeTypen) + return o +} + +// SetPoeTypen adds the poeTypeN to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetPoeTypen(poeTypen *string) { + o.PoeTypen = poeTypen +} + // WithQ adds the q to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithQ(q *string) *DcimInterfaceTemplatesListParams { o.SetQ(q) @@ -609,6 +766,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -626,6 +800,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -643,6 +834,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -796,6 +1004,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -813,6 +1038,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -830,6 +1072,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1085,6 +1344,91 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + + if o.PoeMode != nil { + + // query param poe_mode + var qrPoeMode string + + if o.PoeMode != nil { + qrPoeMode = *o.PoeMode + } + qPoeMode := qrPoeMode + if qPoeMode != "" { + + if err := r.SetQueryParam("poe_mode", qPoeMode); err != nil { + return err + } + } + } + + if o.PoeModen != nil { + + // query param poe_mode__n + var qrPoeModen string + + if o.PoeModen != nil { + qrPoeModen = *o.PoeModen + } + qPoeModen := qrPoeModen + if qPoeModen != "" { + + if err := r.SetQueryParam("poe_mode__n", qPoeModen); err != nil { + return err + } + } + } + + if o.PoeType != nil { + + // query param poe_type + var qrPoeType string + + if o.PoeType != nil { + qrPoeType = *o.PoeType + } + qPoeType := qrPoeType + if qPoeType != "" { + + if err := r.SetQueryParam("poe_type", qPoeType); err != nil { + return err + } + } + } + + if o.PoeTypen != nil { + + // query param poe_type__n + var qrPoeTypen string + + if o.PoeTypen != nil { + qrPoeTypen = *o.PoeTypen + } + qPoeTypen := qrPoeTypen + if qPoeTypen != "" { + + if err := r.SetQueryParam("poe_type__n", qPoeTypen); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interfaces_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interfaces_list_parameters.go index 275af7e37..452981bc5 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interfaces_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_interfaces_list_parameters.go @@ -83,6 +83,12 @@ type DcimInterfacesListParams struct { // BridgeIDn. BridgeIDn *string + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -92,12 +98,21 @@ type DcimInterfacesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -203,12 +218,21 @@ type DcimInterfacesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -320,21 +344,54 @@ type DcimInterfacesListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // ParentID. ParentID *string // ParentIDn. ParentIDn *string + // PoeMode. + PoeMode *string + + // PoeModen. + PoeModen *string + + // PoeType. + PoeType *string + + // PoeTypen. + PoeTypen *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -602,6 +659,28 @@ func (o *DcimInterfacesListParams) SetBridgeIDn(bridgeIDn *string) { o.BridgeIDn = bridgeIDn } +// WithCableEnd adds the cableEnd to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithCableEnd(cableEnd *string) *DcimInterfacesListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithCableEndn(cableEndn *string) *DcimInterfacesListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim interfaces list params func (o *DcimInterfacesListParams) WithCabled(cabled *string) *DcimInterfacesListParams { o.SetCabled(cabled) @@ -635,6 +714,17 @@ func (o *DcimInterfacesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithCreatedGt(createdGt *string) *DcimInterfacesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim interfaces list params func (o *DcimInterfacesListParams) WithCreatedGte(createdGte *string) *DcimInterfacesListParams { o.SetCreatedGte(createdGte) @@ -646,6 +736,17 @@ func (o *DcimInterfacesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithCreatedLt(createdLt *string) *DcimInterfacesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim interfaces list params func (o *DcimInterfacesListParams) WithCreatedLte(createdLte *string) *DcimInterfacesListParams { o.SetCreatedLte(createdLte) @@ -657,6 +758,17 @@ func (o *DcimInterfacesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithCreatedn(createdn *string) *DcimInterfacesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim interfaces list params func (o *DcimInterfacesListParams) WithDescription(description *string) *DcimInterfacesListParams { o.SetDescription(description) @@ -1042,6 +1154,17 @@ func (o *DcimInterfacesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimInterfacesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim interfaces list params func (o *DcimInterfacesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInterfacesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -1053,6 +1176,17 @@ func (o *DcimInterfacesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimInterfacesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim interfaces list params func (o *DcimInterfacesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInterfacesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -1064,6 +1198,17 @@ func (o *DcimInterfacesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimInterfacesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim interfaces list params func (o *DcimInterfacesListParams) WithLimit(limit *int64) *DcimInterfacesListParams { o.SetLimit(limit) @@ -1460,6 +1605,17 @@ func (o *DcimInterfacesListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithOccupied(occupied *string) *DcimInterfacesListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim interfaces list params func (o *DcimInterfacesListParams) WithOffset(offset *int64) *DcimInterfacesListParams { o.SetOffset(offset) @@ -1471,6 +1627,17 @@ func (o *DcimInterfacesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithOrdering(ordering *string) *DcimInterfacesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParentID adds the parentID to the dcim interfaces list params func (o *DcimInterfacesListParams) WithParentID(parentID *string) *DcimInterfacesListParams { o.SetParentID(parentID) @@ -1493,6 +1660,50 @@ func (o *DcimInterfacesListParams) SetParentIDn(parentIDn *string) { o.ParentIDn = parentIDn } +// WithPoeMode adds the poeMode to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithPoeMode(poeMode *string) *DcimInterfacesListParams { + o.SetPoeMode(poeMode) + return o +} + +// SetPoeMode adds the poeMode to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetPoeMode(poeMode *string) { + o.PoeMode = poeMode +} + +// WithPoeModen adds the poeModen to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithPoeModen(poeModen *string) *DcimInterfacesListParams { + o.SetPoeModen(poeModen) + return o +} + +// SetPoeModen adds the poeModeN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetPoeModen(poeModen *string) { + o.PoeModen = poeModen +} + +// WithPoeType adds the poeType to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithPoeType(poeType *string) *DcimInterfacesListParams { + o.SetPoeType(poeType) + return o +} + +// SetPoeType adds the poeType to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetPoeType(poeType *string) { + o.PoeType = poeType +} + +// WithPoeTypen adds the poeTypen to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithPoeTypen(poeTypen *string) *DcimInterfacesListParams { + o.SetPoeTypen(poeTypen) + return o +} + +// SetPoeTypen adds the poeTypeN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetPoeTypen(poeTypen *string) { + o.PoeTypen = poeTypen +} + // WithQ adds the q to the dcim interfaces list params func (o *DcimInterfacesListParams) WithQ(q *string) *DcimInterfacesListParams { o.SetQ(q) @@ -1504,6 +1715,50 @@ func (o *DcimInterfacesListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRack(rack *string) *DcimInterfacesListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRackn(rackn *string) *DcimInterfacesListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRackID(rackID *string) *DcimInterfacesListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRackIDn(rackIDn *string) *DcimInterfacesListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim interfaces list params func (o *DcimInterfacesListParams) WithRegion(region *string) *DcimInterfacesListParams { o.SetRegion(region) @@ -2250,6 +2505,40 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -2301,6 +2590,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -2318,6 +2624,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -2335,6 +2658,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2930,6 +3270,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2947,6 +3304,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2964,6 +3338,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -3576,6 +3967,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -3593,6 +4001,23 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.ParentID != nil { // query param parent_id @@ -3627,6 +4052,74 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.PoeMode != nil { + + // query param poe_mode + var qrPoeMode string + + if o.PoeMode != nil { + qrPoeMode = *o.PoeMode + } + qPoeMode := qrPoeMode + if qPoeMode != "" { + + if err := r.SetQueryParam("poe_mode", qPoeMode); err != nil { + return err + } + } + } + + if o.PoeModen != nil { + + // query param poe_mode__n + var qrPoeModen string + + if o.PoeModen != nil { + qrPoeModen = *o.PoeModen + } + qPoeModen := qrPoeModen + if qPoeModen != "" { + + if err := r.SetQueryParam("poe_mode__n", qPoeModen); err != nil { + return err + } + } + } + + if o.PoeType != nil { + + // query param poe_type + var qrPoeType string + + if o.PoeType != nil { + qrPoeType = *o.PoeType + } + qPoeType := qrPoeType + if qPoeType != "" { + + if err := r.SetQueryParam("poe_type", qPoeType); err != nil { + return err + } + } + } + + if o.PoeTypen != nil { + + // query param poe_type__n + var qrPoeTypen string + + if o.PoeTypen != nil { + qrPoeTypen = *o.PoeTypen + } + qPoeTypen := qrPoeTypen + if qPoeTypen != "" { + + if err := r.SetQueryParam("poe_type__n", qPoeTypen); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -3644,6 +4137,74 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go index a2fb3f9b8..e22489738 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go @@ -110,12 +110,21 @@ type DcimInventoryItemRolesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -137,12 +146,21 @@ type DcimInventoryItemRolesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type DcimInventoryItemRolesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -398,6 +422,17 @@ func (o *DcimInventoryItemRolesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreatedGt(createdGt *string) *DcimInventoryItemRolesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithCreatedGte(createdGte *string) *DcimInventoryItemRolesListParams { o.SetCreatedGte(createdGte) @@ -409,6 +444,17 @@ func (o *DcimInventoryItemRolesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreatedLt(createdLt *string) *DcimInventoryItemRolesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithCreatedLte(createdLte *string) *DcimInventoryItemRolesListParams { o.SetCreatedLte(createdLte) @@ -420,6 +466,17 @@ func (o *DcimInventoryItemRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreatedn(createdn *string) *DcimInventoryItemRolesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithID(id *string) *DcimInventoryItemRolesListParams { o.SetID(id) @@ -497,6 +554,17 @@ func (o *DcimInventoryItemRolesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInventoryItemRolesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -508,6 +576,17 @@ func (o *DcimInventoryItemRolesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInventoryItemRolesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -519,6 +598,17 @@ func (o *DcimInventoryItemRolesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithLimit(limit *int64) *DcimInventoryItemRolesListParams { o.SetLimit(limit) @@ -651,6 +741,17 @@ func (o *DcimInventoryItemRolesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithOrdering(ordering *string) *DcimInventoryItemRolesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim inventory item roles list params func (o *DcimInventoryItemRolesListParams) WithQ(q *string) *DcimInventoryItemRolesListParams { o.SetQ(q) @@ -989,6 +1090,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1006,6 +1124,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1023,6 +1158,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1142,6 +1294,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1159,6 +1328,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1176,6 +1362,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1380,6 +1583,23 @@ func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go index b326d1b39..3e81d5290 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go @@ -104,12 +104,21 @@ type DcimInventoryItemTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -167,12 +176,21 @@ type DcimInventoryItemTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -227,6 +245,12 @@ type DcimInventoryItemTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // ParentID. ParentID *string @@ -430,6 +454,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreatedGt(createdGt *string) *DcimInventoryItemTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithCreatedGte(createdGte *string) *DcimInventoryItemTemplatesListParams { o.SetCreatedGte(createdGte) @@ -441,6 +476,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetCreatedGte(createdGte *string) o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreatedLt(createdLt *string) *DcimInventoryItemTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithCreatedLte(createdLte *string) *DcimInventoryItemTemplatesListParams { o.SetCreatedLte(createdLte) @@ -452,6 +498,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetCreatedLte(createdLte *string) o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreatedn(createdn *string) *DcimInventoryItemTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimInventoryItemTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -661,6 +718,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetLastUpdated(lastUpdated *strin o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInventoryItemTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -672,6 +740,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInventoryItemTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -683,6 +762,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithLimit(limit *int64) *DcimInventoryItemTemplatesListParams { o.SetLimit(limit) @@ -859,6 +949,17 @@ func (o *DcimInventoryItemTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithOrdering(ordering *string) *DcimInventoryItemTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParentID adds the parentID to the dcim inventory item templates list params func (o *DcimInventoryItemTemplatesListParams) WithParentID(parentID *string) *DcimInventoryItemTemplatesListParams { o.SetParentID(parentID) @@ -1207,6 +1308,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1224,6 +1342,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1241,6 +1376,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -1564,6 +1716,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1581,6 +1750,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1598,6 +1784,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1870,6 +2073,23 @@ func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRe } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.ParentID != nil { // query param parent_id diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_items_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_items_list_parameters.go index 2708f38e2..8db12a1f8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_items_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_inventory_items_list_parameters.go @@ -134,12 +134,21 @@ type DcimInventoryItemsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Device. Device *string @@ -206,12 +215,21 @@ type DcimInventoryItemsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -278,6 +296,12 @@ type DcimInventoryItemsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // ParentID. ParentID *string @@ -317,6 +341,18 @@ type DcimInventoryItemsListParams struct { // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -675,6 +711,17 @@ func (o *DcimInventoryItemsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithCreatedGt(createdGt *string) *DcimInventoryItemsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithCreatedGte(createdGte *string) *DcimInventoryItemsListParams { o.SetCreatedGte(createdGte) @@ -686,6 +733,17 @@ func (o *DcimInventoryItemsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithCreatedLt(createdLt *string) *DcimInventoryItemsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithCreatedLte(createdLte *string) *DcimInventoryItemsListParams { o.SetCreatedLte(createdLte) @@ -697,6 +755,17 @@ func (o *DcimInventoryItemsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithCreatedn(createdn *string) *DcimInventoryItemsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevice adds the device to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithDevice(device *string) *DcimInventoryItemsListParams { o.SetDevice(device) @@ -939,6 +1008,17 @@ func (o *DcimInventoryItemsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimInventoryItemsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInventoryItemsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -950,6 +1030,17 @@ func (o *DcimInventoryItemsListParams) SetLastUpdatedGte(lastUpdatedGte *string) o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimInventoryItemsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInventoryItemsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -961,6 +1052,17 @@ func (o *DcimInventoryItemsListParams) SetLastUpdatedLte(lastUpdatedLte *string) o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimInventoryItemsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithLimit(limit *int64) *DcimInventoryItemsListParams { o.SetLimit(limit) @@ -1181,6 +1283,17 @@ func (o *DcimInventoryItemsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithOrdering(ordering *string) *DcimInventoryItemsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParentID adds the parentID to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithParentID(parentID *string) *DcimInventoryItemsListParams { o.SetParentID(parentID) @@ -1324,6 +1437,50 @@ func (o *DcimInventoryItemsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRack(rack *string) *DcimInventoryItemsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRackn(rackn *string) *DcimInventoryItemsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRackID(rackID *string) *DcimInventoryItemsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRackIDn(rackIDn *string) *DcimInventoryItemsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithRegion(region *string) *DcimInventoryItemsListParams { o.SetRegion(region) @@ -2007,6 +2164,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -2024,6 +2198,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -2041,6 +2232,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Device != nil { // query param device @@ -2415,6 +2623,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2432,6 +2657,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2449,6 +2691,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2789,6 +3048,23 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.ParentID != nil { // query param parent_id @@ -3010,6 +3286,74 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_locations_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_locations_list_parameters.go index 614297a64..f3cb21462 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_locations_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_locations_list_parameters.go @@ -98,12 +98,21 @@ type DcimLocationsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type DcimLocationsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type DcimLocationsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -284,6 +308,12 @@ type DcimLocationsListParams struct { // SlugNisw. SlugNisw *string + // Status. + Status *string + + // Statusn. + Statusn *string + // Tag. Tag *string @@ -444,6 +474,17 @@ func (o *DcimLocationsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim locations list params +func (o *DcimLocationsListParams) WithCreatedGt(createdGt *string) *DcimLocationsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim locations list params +func (o *DcimLocationsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim locations list params func (o *DcimLocationsListParams) WithCreatedGte(createdGte *string) *DcimLocationsListParams { o.SetCreatedGte(createdGte) @@ -455,6 +496,17 @@ func (o *DcimLocationsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim locations list params +func (o *DcimLocationsListParams) WithCreatedLt(createdLt *string) *DcimLocationsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim locations list params +func (o *DcimLocationsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim locations list params func (o *DcimLocationsListParams) WithCreatedLte(createdLte *string) *DcimLocationsListParams { o.SetCreatedLte(createdLte) @@ -466,6 +518,17 @@ func (o *DcimLocationsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim locations list params +func (o *DcimLocationsListParams) WithCreatedn(createdn *string) *DcimLocationsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim locations list params +func (o *DcimLocationsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim locations list params func (o *DcimLocationsListParams) WithDescription(description *string) *DcimLocationsListParams { o.SetDescription(description) @@ -653,6 +716,17 @@ func (o *DcimLocationsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim locations list params +func (o *DcimLocationsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimLocationsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim locations list params +func (o *DcimLocationsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim locations list params func (o *DcimLocationsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimLocationsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -664,6 +738,17 @@ func (o *DcimLocationsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim locations list params +func (o *DcimLocationsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimLocationsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim locations list params +func (o *DcimLocationsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim locations list params func (o *DcimLocationsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimLocationsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -675,6 +760,17 @@ func (o *DcimLocationsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim locations list params +func (o *DcimLocationsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimLocationsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim locations list params +func (o *DcimLocationsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim locations list params func (o *DcimLocationsListParams) WithLimit(limit *int64) *DcimLocationsListParams { o.SetLimit(limit) @@ -807,6 +903,17 @@ func (o *DcimLocationsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim locations list params +func (o *DcimLocationsListParams) WithOrdering(ordering *string) *DcimLocationsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim locations list params +func (o *DcimLocationsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the dcim locations list params func (o *DcimLocationsListParams) WithParent(parent *string) *DcimLocationsListParams { o.SetParent(parent) @@ -1104,6 +1211,28 @@ func (o *DcimLocationsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithStatus adds the status to the dcim locations list params +func (o *DcimLocationsListParams) WithStatus(status *string) *DcimLocationsListParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the dcim locations list params +func (o *DcimLocationsListParams) SetStatus(status *string) { + o.Status = status +} + +// WithStatusn adds the statusn to the dcim locations list params +func (o *DcimLocationsListParams) WithStatusn(statusn *string) *DcimLocationsListParams { + o.SetStatusn(statusn) + return o +} + +// SetStatusn adds the statusN to the dcim locations list params +func (o *DcimLocationsListParams) SetStatusn(statusn *string) { + o.Statusn = statusn +} + // WithTag adds the tag to the dcim locations list params func (o *DcimLocationsListParams) WithTag(tag *string) *DcimLocationsListParams { o.SetTag(tag) @@ -1341,6 +1470,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1358,6 +1504,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1375,6 +1538,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1664,6 +1844,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1681,6 +1878,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1698,6 +1912,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1902,6 +2133,23 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent @@ -2361,6 +2609,40 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Status != nil { + + // query param status + var qrStatus string + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := qrStatus + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if o.Statusn != nil { + + // query param status__n + var qrStatusn string + + if o.Statusn != nil { + qrStatusn = *o.Statusn + } + qStatusn := qrStatusn + if qStatusn != "" { + + if err := r.SetQueryParam("status__n", qStatusn); err != nil { + return err + } + } + } + if o.Tag != nil { // query param tag diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_manufacturers_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_manufacturers_list_parameters.go index 080921960..0714c6c8d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_manufacturers_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_manufacturers_list_parameters.go @@ -98,12 +98,21 @@ type DcimManufacturersListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type DcimManufacturersListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type DcimManufacturersListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -372,6 +396,17 @@ func (o *DcimManufacturersListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithCreatedGt(createdGt *string) *DcimManufacturersListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithCreatedGte(createdGte *string) *DcimManufacturersListParams { o.SetCreatedGte(createdGte) @@ -383,6 +418,17 @@ func (o *DcimManufacturersListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithCreatedLt(createdLt *string) *DcimManufacturersListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithCreatedLte(createdLte *string) *DcimManufacturersListParams { o.SetCreatedLte(createdLte) @@ -394,6 +440,17 @@ func (o *DcimManufacturersListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithCreatedn(createdn *string) *DcimManufacturersListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithDescription(description *string) *DcimManufacturersListParams { o.SetDescription(description) @@ -581,6 +638,17 @@ func (o *DcimManufacturersListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimManufacturersListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimManufacturersListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -592,6 +660,17 @@ func (o *DcimManufacturersListParams) SetLastUpdatedGte(lastUpdatedGte *string) o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimManufacturersListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimManufacturersListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -603,6 +682,17 @@ func (o *DcimManufacturersListParams) SetLastUpdatedLte(lastUpdatedLte *string) o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimManufacturersListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithLimit(limit *int64) *DcimManufacturersListParams { o.SetLimit(limit) @@ -735,6 +825,17 @@ func (o *DcimManufacturersListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithOrdering(ordering *string) *DcimManufacturersListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithQ(q *string) *DcimManufacturersListParams { o.SetQ(q) @@ -1005,6 +1106,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1022,6 +1140,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1039,6 +1174,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1328,6 +1480,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1345,6 +1514,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1362,6 +1548,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1566,6 +1769,23 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go index 2b4ba82a0..54de090e2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimModuleBayTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -113,12 +122,21 @@ type DcimModuleBayTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -161,6 +179,12 @@ type DcimModuleBayTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -228,6 +252,17 @@ func (o *DcimModuleBayTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreatedGt(createdGt *string) *DcimModuleBayTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithCreatedGte(createdGte *string) *DcimModuleBayTemplatesListParams { o.SetCreatedGte(createdGte) @@ -239,6 +274,17 @@ func (o *DcimModuleBayTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreatedLt(createdLt *string) *DcimModuleBayTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithCreatedLte(createdLte *string) *DcimModuleBayTemplatesListParams { o.SetCreatedLte(createdLte) @@ -250,6 +296,17 @@ func (o *DcimModuleBayTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreatedn(createdn *string) *DcimModuleBayTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimModuleBayTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -349,6 +406,17 @@ func (o *DcimModuleBayTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleBayTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -360,6 +428,17 @@ func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleBayTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -371,6 +450,17 @@ func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithLimit(limit *int64) *DcimModuleBayTemplatesListParams { o.SetLimit(limit) @@ -503,6 +593,17 @@ func (o *DcimModuleBayTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithOrdering(ordering *string) *DcimModuleBayTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim module bay templates list params func (o *DcimModuleBayTemplatesListParams) WithQ(q *string) *DcimModuleBayTemplatesListParams { o.SetQ(q) @@ -539,6 +640,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -556,6 +674,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -573,6 +708,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -726,6 +878,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -743,6 +912,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -760,6 +946,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -964,6 +1167,23 @@ func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bays_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bays_list_parameters.go index 2b49c0d66..d00c203c7 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bays_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_bays_list_parameters.go @@ -80,12 +80,21 @@ type DcimModuleBaysListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -179,12 +188,21 @@ type DcimModuleBaysListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -239,9 +257,27 @@ type DcimModuleBaysListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -360,6 +396,17 @@ func (o *DcimModuleBaysListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreatedGt(createdGt *string) *DcimModuleBaysListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim module bays list params func (o *DcimModuleBaysListParams) WithCreatedGte(createdGte *string) *DcimModuleBaysListParams { o.SetCreatedGte(createdGte) @@ -371,6 +418,17 @@ func (o *DcimModuleBaysListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreatedLt(createdLt *string) *DcimModuleBaysListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim module bays list params func (o *DcimModuleBaysListParams) WithCreatedLte(createdLte *string) *DcimModuleBaysListParams { o.SetCreatedLte(createdLte) @@ -382,6 +440,17 @@ func (o *DcimModuleBaysListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreatedn(createdn *string) *DcimModuleBaysListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim module bays list params func (o *DcimModuleBaysListParams) WithDescription(description *string) *DcimModuleBaysListParams { o.SetDescription(description) @@ -723,6 +792,17 @@ func (o *DcimModuleBaysListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimModuleBaysListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim module bays list params func (o *DcimModuleBaysListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleBaysListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -734,6 +814,17 @@ func (o *DcimModuleBaysListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimModuleBaysListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim module bays list params func (o *DcimModuleBaysListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleBaysListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -745,6 +836,17 @@ func (o *DcimModuleBaysListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimModuleBaysListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim module bays list params func (o *DcimModuleBaysListParams) WithLimit(limit *int64) *DcimModuleBaysListParams { o.SetLimit(limit) @@ -921,6 +1023,17 @@ func (o *DcimModuleBaysListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithOrdering(ordering *string) *DcimModuleBaysListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim module bays list params func (o *DcimModuleBaysListParams) WithQ(q *string) *DcimModuleBaysListParams { o.SetQ(q) @@ -932,6 +1045,50 @@ func (o *DcimModuleBaysListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRack(rack *string) *DcimModuleBaysListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRackn(rackn *string) *DcimModuleBaysListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRackID(rackID *string) *DcimModuleBaysListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRackIDn(rackIDn *string) *DcimModuleBaysListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim module bays list params func (o *DcimModuleBaysListParams) WithRegion(region *string) *DcimModuleBaysListParams { o.SetRegion(region) @@ -1155,6 +1312,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1172,6 +1346,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1189,6 +1380,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1716,6 +1924,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1733,6 +1958,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1750,6 +1992,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2022,6 +2281,23 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2039,6 +2315,74 @@ func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_types_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_types_list_parameters.go index 7aa2e491a..4a0c4c995 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_types_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_module_types_list_parameters.go @@ -86,12 +86,21 @@ type DcimModuleTypesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -116,12 +125,21 @@ type DcimModuleTypesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -176,6 +194,12 @@ type DcimModuleTypesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // PartNumber. PartNumber *string @@ -310,6 +334,17 @@ func (o *DcimModuleTypesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreatedGt(createdGt *string) *DcimModuleTypesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim module types list params func (o *DcimModuleTypesListParams) WithCreatedGte(createdGte *string) *DcimModuleTypesListParams { o.SetCreatedGte(createdGte) @@ -321,6 +356,17 @@ func (o *DcimModuleTypesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreatedLt(createdLt *string) *DcimModuleTypesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim module types list params func (o *DcimModuleTypesListParams) WithCreatedLte(createdLte *string) *DcimModuleTypesListParams { o.SetCreatedLte(createdLte) @@ -332,6 +378,17 @@ func (o *DcimModuleTypesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreatedn(createdn *string) *DcimModuleTypesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the dcim module types list params func (o *DcimModuleTypesListParams) WithID(id *string) *DcimModuleTypesListParams { o.SetID(id) @@ -420,6 +477,17 @@ func (o *DcimModuleTypesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimModuleTypesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim module types list params func (o *DcimModuleTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleTypesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -431,6 +499,17 @@ func (o *DcimModuleTypesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimModuleTypesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim module types list params func (o *DcimModuleTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleTypesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -442,6 +521,17 @@ func (o *DcimModuleTypesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimModuleTypesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim module types list params func (o *DcimModuleTypesListParams) WithLimit(limit *int64) *DcimModuleTypesListParams { o.SetLimit(limit) @@ -618,6 +708,17 @@ func (o *DcimModuleTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim module types list params +func (o *DcimModuleTypesListParams) WithOrdering(ordering *string) *DcimModuleTypesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim module types list params +func (o *DcimModuleTypesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPartNumber adds the partNumber to the dcim module types list params func (o *DcimModuleTypesListParams) WithPartNumber(partNumber *string) *DcimModuleTypesListParams { o.SetPartNumber(partNumber) @@ -853,6 +954,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -870,6 +988,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -887,6 +1022,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1023,6 +1175,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1040,6 +1209,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1057,6 +1243,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1329,6 +1532,23 @@ func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.PartNumber != nil { // query param part_number diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_modules_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_modules_list_parameters.go index c6b771cda..2b1218f49 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_modules_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_modules_list_parameters.go @@ -110,12 +110,21 @@ type DcimModulesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DeviceID. DeviceID *string @@ -143,12 +152,21 @@ type DcimModulesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -191,6 +209,12 @@ type DcimModulesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -404,6 +428,17 @@ func (o *DcimModulesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim modules list params +func (o *DcimModulesListParams) WithCreatedGt(createdGt *string) *DcimModulesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim modules list params +func (o *DcimModulesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim modules list params func (o *DcimModulesListParams) WithCreatedGte(createdGte *string) *DcimModulesListParams { o.SetCreatedGte(createdGte) @@ -415,6 +450,17 @@ func (o *DcimModulesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim modules list params +func (o *DcimModulesListParams) WithCreatedLt(createdLt *string) *DcimModulesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim modules list params +func (o *DcimModulesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim modules list params func (o *DcimModulesListParams) WithCreatedLte(createdLte *string) *DcimModulesListParams { o.SetCreatedLte(createdLte) @@ -426,6 +472,17 @@ func (o *DcimModulesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim modules list params +func (o *DcimModulesListParams) WithCreatedn(createdn *string) *DcimModulesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim modules list params +func (o *DcimModulesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDeviceID adds the deviceID to the dcim modules list params func (o *DcimModulesListParams) WithDeviceID(deviceID *string) *DcimModulesListParams { o.SetDeviceID(deviceID) @@ -525,6 +582,17 @@ func (o *DcimModulesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimModulesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim modules list params func (o *DcimModulesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModulesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -536,6 +604,17 @@ func (o *DcimModulesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimModulesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim modules list params func (o *DcimModulesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModulesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -547,6 +626,17 @@ func (o *DcimModulesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimModulesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim modules list params func (o *DcimModulesListParams) WithLimit(limit *int64) *DcimModulesListParams { o.SetLimit(limit) @@ -679,6 +769,17 @@ func (o *DcimModulesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim modules list params +func (o *DcimModulesListParams) WithOrdering(ordering *string) *DcimModulesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim modules list params +func (o *DcimModulesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim modules list params func (o *DcimModulesListParams) WithQ(q *string) *DcimModulesListParams { o.SetQ(q) @@ -1017,6 +1118,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1034,6 +1152,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1051,6 +1186,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DeviceID != nil { // query param device_id @@ -1204,6 +1356,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1221,6 +1390,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1238,6 +1424,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1442,6 +1645,23 @@ func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_platforms_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_platforms_list_parameters.go index f474b4a61..5b43cccda 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_platforms_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_platforms_list_parameters.go @@ -80,12 +80,21 @@ type DcimPlatformsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type DcimPlatformsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -227,6 +245,12 @@ type DcimPlatformsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -330,6 +354,17 @@ func (o *DcimPlatformsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim platforms list params +func (o *DcimPlatformsListParams) WithCreatedGt(createdGt *string) *DcimPlatformsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim platforms list params +func (o *DcimPlatformsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim platforms list params func (o *DcimPlatformsListParams) WithCreatedGte(createdGte *string) *DcimPlatformsListParams { o.SetCreatedGte(createdGte) @@ -341,6 +376,17 @@ func (o *DcimPlatformsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim platforms list params +func (o *DcimPlatformsListParams) WithCreatedLt(createdLt *string) *DcimPlatformsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim platforms list params +func (o *DcimPlatformsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim platforms list params func (o *DcimPlatformsListParams) WithCreatedLte(createdLte *string) *DcimPlatformsListParams { o.SetCreatedLte(createdLte) @@ -352,6 +398,17 @@ func (o *DcimPlatformsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim platforms list params +func (o *DcimPlatformsListParams) WithCreatedn(createdn *string) *DcimPlatformsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim platforms list params +func (o *DcimPlatformsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim platforms list params func (o *DcimPlatformsListParams) WithDescription(description *string) *DcimPlatformsListParams { o.SetDescription(description) @@ -539,6 +596,17 @@ func (o *DcimPlatformsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim platforms list params +func (o *DcimPlatformsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPlatformsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim platforms list params +func (o *DcimPlatformsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim platforms list params func (o *DcimPlatformsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPlatformsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -550,6 +618,17 @@ func (o *DcimPlatformsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim platforms list params +func (o *DcimPlatformsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPlatformsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim platforms list params +func (o *DcimPlatformsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim platforms list params func (o *DcimPlatformsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPlatformsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -561,6 +640,17 @@ func (o *DcimPlatformsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim platforms list params +func (o *DcimPlatformsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPlatformsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim platforms list params +func (o *DcimPlatformsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim platforms list params func (o *DcimPlatformsListParams) WithLimit(limit *int64) *DcimPlatformsListParams { o.SetLimit(limit) @@ -847,6 +937,17 @@ func (o *DcimPlatformsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim platforms list params +func (o *DcimPlatformsListParams) WithOrdering(ordering *string) *DcimPlatformsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim platforms list params +func (o *DcimPlatformsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim platforms list params func (o *DcimPlatformsListParams) WithQ(q *string) *DcimPlatformsListParams { o.SetQ(q) @@ -1015,6 +1116,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1032,6 +1150,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1049,6 +1184,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1338,6 +1490,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1355,6 +1524,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1372,6 +1558,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1814,6 +2017,23 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_feeds_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_feeds_list_parameters.go index 4c26526f6..57295f0ce 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_feeds_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_feeds_list_parameters.go @@ -95,6 +95,12 @@ type DcimPowerFeedsListParams struct { // Amperagen. Amperagen *string + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -104,12 +110,21 @@ type DcimPowerFeedsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -131,12 +146,21 @@ type DcimPowerFeedsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -191,12 +215,21 @@ type DcimPowerFeedsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Phase. Phase *string @@ -415,6 +448,28 @@ func (o *DcimPowerFeedsListParams) SetAmperagen(amperagen *string) { o.Amperagen = amperagen } +// WithCableEnd adds the cableEnd to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCableEnd(cableEnd *string) *DcimPowerFeedsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCableEndn(cableEndn *string) *DcimPowerFeedsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithCabled(cabled *string) *DcimPowerFeedsListParams { o.SetCabled(cabled) @@ -448,6 +503,17 @@ func (o *DcimPowerFeedsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreatedGt(createdGt *string) *DcimPowerFeedsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithCreatedGte(createdGte *string) *DcimPowerFeedsListParams { o.SetCreatedGte(createdGte) @@ -459,6 +525,17 @@ func (o *DcimPowerFeedsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreatedLt(createdLt *string) *DcimPowerFeedsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithCreatedLte(createdLte *string) *DcimPowerFeedsListParams { o.SetCreatedLte(createdLte) @@ -470,6 +547,17 @@ func (o *DcimPowerFeedsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithCreatedn(createdn *string) *DcimPowerFeedsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithID(id *string) *DcimPowerFeedsListParams { o.SetID(id) @@ -547,6 +635,17 @@ func (o *DcimPowerFeedsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerFeedsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerFeedsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -558,6 +657,17 @@ func (o *DcimPowerFeedsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerFeedsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerFeedsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -569,6 +679,17 @@ func (o *DcimPowerFeedsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerFeedsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithLimit(limit *int64) *DcimPowerFeedsListParams { o.SetLimit(limit) @@ -756,6 +877,17 @@ func (o *DcimPowerFeedsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithOccupied(occupied *string) *DcimPowerFeedsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithOffset(offset *int64) *DcimPowerFeedsListParams { o.SetOffset(offset) @@ -767,6 +899,17 @@ func (o *DcimPowerFeedsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) WithOrdering(ordering *string) *DcimPowerFeedsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power feeds list params +func (o *DcimPowerFeedsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPhase adds the phase to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithPhase(phase *string) *DcimPowerFeedsListParams { o.SetPhase(phase) @@ -1240,6 +1383,40 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1291,6 +1468,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1308,6 +1502,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1325,6 +1536,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1444,6 +1672,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1461,6 +1706,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1478,6 +1740,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1767,6 +2046,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -1784,6 +2080,23 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Phase != nil { // query param phase diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go index 03048609e..28338e6d2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go @@ -80,12 +80,21 @@ type DcimPowerOutletTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -119,12 +128,21 @@ type DcimPowerOutletTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -173,6 +191,12 @@ type DcimPowerOutletTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -246,6 +270,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithCreatedGt(createdGt *string) *DcimPowerOutletTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithCreatedGte(createdGte *string) *DcimPowerOutletTemplatesListParams { o.SetCreatedGte(createdGte) @@ -257,6 +292,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithCreatedLt(createdLt *string) *DcimPowerOutletTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithCreatedLte(createdLte *string) *DcimPowerOutletTemplatesListParams { o.SetCreatedLte(createdLte) @@ -268,6 +314,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithCreatedn(createdn *string) *DcimPowerOutletTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimPowerOutletTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -389,6 +446,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetLastUpdated(lastUpdated *string) o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerOutletTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerOutletTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -400,6 +468,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *s o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerOutletTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerOutletTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -411,6 +490,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *s o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerOutletTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithLimit(limit *int64) *DcimPowerOutletTemplatesListParams { o.SetLimit(limit) @@ -565,6 +655,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithOrdering(ordering *string) *DcimPowerOutletTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithQ(q *string) *DcimPowerOutletTemplatesListParams { o.SetQ(q) @@ -623,6 +724,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -640,6 +758,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -657,6 +792,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -844,6 +996,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -861,6 +1030,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -878,6 +1064,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1116,6 +1319,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlets_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlets_list_parameters.go index 0e58ec0bd..4d8f07249 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlets_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_outlets_list_parameters.go @@ -77,6 +77,12 @@ DcimPowerOutletsListParams contains all the parameters to send to the API endpoi */ type DcimPowerOutletsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -86,12 +92,21 @@ type DcimPowerOutletsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -191,12 +206,21 @@ type DcimPowerOutletsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -251,15 +275,36 @@ type DcimPowerOutletsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -373,6 +418,28 @@ func (o *DcimPowerOutletsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithCableEnd(cableEnd *string) *DcimPowerOutletsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithCableEndn(cableEndn *string) *DcimPowerOutletsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithCabled(cabled *string) *DcimPowerOutletsListParams { o.SetCabled(cabled) @@ -406,6 +473,17 @@ func (o *DcimPowerOutletsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithCreatedGt(createdGt *string) *DcimPowerOutletsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithCreatedGte(createdGte *string) *DcimPowerOutletsListParams { o.SetCreatedGte(createdGte) @@ -417,6 +495,17 @@ func (o *DcimPowerOutletsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithCreatedLt(createdLt *string) *DcimPowerOutletsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithCreatedLte(createdLte *string) *DcimPowerOutletsListParams { o.SetCreatedLte(createdLte) @@ -428,6 +517,17 @@ func (o *DcimPowerOutletsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithCreatedn(createdn *string) *DcimPowerOutletsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithDescription(description *string) *DcimPowerOutletsListParams { o.SetDescription(description) @@ -791,6 +891,17 @@ func (o *DcimPowerOutletsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerOutletsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerOutletsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -802,6 +913,17 @@ func (o *DcimPowerOutletsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerOutletsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerOutletsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -813,6 +935,17 @@ func (o *DcimPowerOutletsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerOutletsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithLimit(limit *int64) *DcimPowerOutletsListParams { o.SetLimit(limit) @@ -1000,6 +1133,17 @@ func (o *DcimPowerOutletsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithOccupied(occupied *string) *DcimPowerOutletsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithOffset(offset *int64) *DcimPowerOutletsListParams { o.SetOffset(offset) @@ -1011,6 +1155,17 @@ func (o *DcimPowerOutletsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithOrdering(ordering *string) *DcimPowerOutletsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithQ(q *string) *DcimPowerOutletsListParams { o.SetQ(q) @@ -1022,6 +1177,50 @@ func (o *DcimPowerOutletsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRack(rack *string) *DcimPowerOutletsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRackn(rackn *string) *DcimPowerOutletsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRackID(rackID *string) *DcimPowerOutletsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithRackIDn(rackIDn *string) *DcimPowerOutletsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithRegion(region *string) *DcimPowerOutletsListParams { o.SetRegion(region) @@ -1250,6 +1449,40 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1301,6 +1534,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1318,6 +1568,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1335,6 +1602,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1896,6 +2180,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1913,6 +2214,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1930,6 +2248,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2219,6 +2554,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2236,6 +2588,23 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2253,6 +2622,74 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_panels_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_panels_list_parameters.go index fc20f4541..524f9ef32 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_panels_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_panels_list_parameters.go @@ -98,12 +98,21 @@ type DcimPowerPanelsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -125,12 +134,21 @@ type DcimPowerPanelsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -179,6 +197,12 @@ type DcimPowerPanelsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -354,6 +378,17 @@ func (o *DcimPowerPanelsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithCreatedGt(createdGt *string) *DcimPowerPanelsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithCreatedGte(createdGte *string) *DcimPowerPanelsListParams { o.SetCreatedGte(createdGte) @@ -365,6 +400,17 @@ func (o *DcimPowerPanelsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithCreatedLt(createdLt *string) *DcimPowerPanelsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithCreatedLte(createdLte *string) *DcimPowerPanelsListParams { o.SetCreatedLte(createdLte) @@ -376,6 +422,17 @@ func (o *DcimPowerPanelsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithCreatedn(createdn *string) *DcimPowerPanelsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithID(id *string) *DcimPowerPanelsListParams { o.SetID(id) @@ -453,6 +510,17 @@ func (o *DcimPowerPanelsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerPanelsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerPanelsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -464,6 +532,17 @@ func (o *DcimPowerPanelsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerPanelsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerPanelsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -475,6 +554,17 @@ func (o *DcimPowerPanelsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerPanelsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithLimit(limit *int64) *DcimPowerPanelsListParams { o.SetLimit(limit) @@ -629,6 +719,17 @@ func (o *DcimPowerPanelsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithOrdering(ordering *string) *DcimPowerPanelsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithQ(q *string) *DcimPowerPanelsListParams { o.SetQ(q) @@ -921,6 +1022,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -938,6 +1056,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -955,6 +1090,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1074,6 +1226,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1091,6 +1260,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1108,6 +1294,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1346,6 +1549,23 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_port_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_port_templates_list_parameters.go index 820b71193..f47c71855 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_port_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_port_templates_list_parameters.go @@ -98,12 +98,21 @@ type DcimPowerPortTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -131,12 +140,21 @@ type DcimPowerPortTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type DcimPowerPortTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -342,6 +366,17 @@ func (o *DcimPowerPortTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithCreatedGt(createdGt *string) *DcimPowerPortTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithCreatedGte(createdGte *string) *DcimPowerPortTemplatesListParams { o.SetCreatedGte(createdGte) @@ -353,6 +388,17 @@ func (o *DcimPowerPortTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithCreatedLt(createdLt *string) *DcimPowerPortTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithCreatedLte(createdLte *string) *DcimPowerPortTemplatesListParams { o.SetCreatedLte(createdLte) @@ -364,6 +410,17 @@ func (o *DcimPowerPortTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithCreatedn(createdn *string) *DcimPowerPortTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimPowerPortTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -463,6 +520,17 @@ func (o *DcimPowerPortTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerPortTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerPortTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -474,6 +542,17 @@ func (o *DcimPowerPortTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerPortTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerPortTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -485,6 +564,17 @@ func (o *DcimPowerPortTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerPortTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithLimit(limit *int64) *DcimPowerPortTemplatesListParams { o.SetLimit(limit) @@ -705,6 +795,17 @@ func (o *DcimPowerPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithOrdering(ordering *string) *DcimPowerPortTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithQ(q *string) *DcimPowerPortTemplatesListParams { o.SetQ(q) @@ -865,6 +966,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -882,6 +1000,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -899,6 +1034,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -1052,6 +1204,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1069,6 +1238,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1086,6 +1272,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1426,6 +1629,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_ports_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_ports_list_parameters.go index e298c6678..0fd51ad56 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_ports_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_power_ports_list_parameters.go @@ -95,6 +95,12 @@ type DcimPowerPortsListParams struct { // AllocatedDrawn. AllocatedDrawn *string + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -104,12 +110,21 @@ type DcimPowerPortsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -203,12 +218,21 @@ type DcimPowerPortsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -281,15 +305,36 @@ type DcimPowerPortsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -469,6 +514,28 @@ func (o *DcimPowerPortsListParams) SetAllocatedDrawn(allocatedDrawn *string) { o.AllocatedDrawn = allocatedDrawn } +// WithCableEnd adds the cableEnd to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithCableEnd(cableEnd *string) *DcimPowerPortsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithCableEndn(cableEndn *string) *DcimPowerPortsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim power ports list params func (o *DcimPowerPortsListParams) WithCabled(cabled *string) *DcimPowerPortsListParams { o.SetCabled(cabled) @@ -502,6 +569,17 @@ func (o *DcimPowerPortsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithCreatedGt(createdGt *string) *DcimPowerPortsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim power ports list params func (o *DcimPowerPortsListParams) WithCreatedGte(createdGte *string) *DcimPowerPortsListParams { o.SetCreatedGte(createdGte) @@ -513,6 +591,17 @@ func (o *DcimPowerPortsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithCreatedLt(createdLt *string) *DcimPowerPortsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim power ports list params func (o *DcimPowerPortsListParams) WithCreatedLte(createdLte *string) *DcimPowerPortsListParams { o.SetCreatedLte(createdLte) @@ -524,6 +613,17 @@ func (o *DcimPowerPortsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithCreatedn(createdn *string) *DcimPowerPortsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim power ports list params func (o *DcimPowerPortsListParams) WithDescription(description *string) *DcimPowerPortsListParams { o.SetDescription(description) @@ -865,6 +965,17 @@ func (o *DcimPowerPortsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimPowerPortsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power ports list params func (o *DcimPowerPortsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerPortsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -876,6 +987,17 @@ func (o *DcimPowerPortsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimPowerPortsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power ports list params func (o *DcimPowerPortsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerPortsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -887,6 +1009,17 @@ func (o *DcimPowerPortsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimPowerPortsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim power ports list params func (o *DcimPowerPortsListParams) WithLimit(limit *int64) *DcimPowerPortsListParams { o.SetLimit(limit) @@ -1140,6 +1273,17 @@ func (o *DcimPowerPortsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithOccupied(occupied *string) *DcimPowerPortsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim power ports list params func (o *DcimPowerPortsListParams) WithOffset(offset *int64) *DcimPowerPortsListParams { o.SetOffset(offset) @@ -1151,6 +1295,17 @@ func (o *DcimPowerPortsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithOrdering(ordering *string) *DcimPowerPortsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim power ports list params func (o *DcimPowerPortsListParams) WithQ(q *string) *DcimPowerPortsListParams { o.SetQ(q) @@ -1162,6 +1317,50 @@ func (o *DcimPowerPortsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRack(rack *string) *DcimPowerPortsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRackn(rackn *string) *DcimPowerPortsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRackID(rackID *string) *DcimPowerPortsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithRackIDn(rackIDn *string) *DcimPowerPortsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim power ports list params func (o *DcimPowerPortsListParams) WithRegion(region *string) *DcimPowerPortsListParams { o.SetRegion(region) @@ -1492,6 +1691,40 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1543,6 +1776,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1560,6 +1810,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1577,6 +1844,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2104,6 +2388,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2121,6 +2422,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2138,6 +2456,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2529,6 +2864,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2546,6 +2898,23 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2563,6 +2932,74 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_reservations_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_reservations_list_parameters.go index 15d8264b9..81e5e7c85 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_reservations_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_reservations_list_parameters.go @@ -80,12 +80,21 @@ type DcimRackReservationsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type DcimRackReservationsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -167,6 +185,12 @@ type DcimRackReservationsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -318,6 +342,17 @@ func (o *DcimRackReservationsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithCreatedGt(createdGt *string) *DcimRackReservationsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithCreatedGte(createdGte *string) *DcimRackReservationsListParams { o.SetCreatedGte(createdGte) @@ -329,6 +364,17 @@ func (o *DcimRackReservationsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithCreatedLt(createdLt *string) *DcimRackReservationsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithCreatedLte(createdLte *string) *DcimRackReservationsListParams { o.SetCreatedLte(createdLte) @@ -340,6 +386,17 @@ func (o *DcimRackReservationsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithCreatedn(createdn *string) *DcimRackReservationsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithDescription(description *string) *DcimRackReservationsListParams { o.SetDescription(description) @@ -527,6 +584,17 @@ func (o *DcimRackReservationsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRackReservationsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRackReservationsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -538,6 +606,17 @@ func (o *DcimRackReservationsListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRackReservationsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRackReservationsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -549,6 +628,17 @@ func (o *DcimRackReservationsListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRackReservationsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithLimit(limit *int64) *DcimRackReservationsListParams { o.SetLimit(limit) @@ -615,6 +705,17 @@ func (o *DcimRackReservationsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithOrdering(ordering *string) *DcimRackReservationsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithQ(q *string) *DcimRackReservationsListParams { o.SetQ(q) @@ -959,6 +1060,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -976,6 +1094,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -993,6 +1128,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1282,6 +1434,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1299,6 +1468,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1316,6 +1502,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1418,6 +1621,23 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_roles_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_roles_list_parameters.go index eac1aa98a..a28c22272 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_roles_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rack_roles_list_parameters.go @@ -110,12 +110,21 @@ type DcimRackRolesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -167,12 +176,21 @@ type DcimRackRolesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -215,6 +233,12 @@ type DcimRackRolesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -428,6 +452,17 @@ func (o *DcimRackRolesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithCreatedGt(createdGt *string) *DcimRackRolesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim rack roles list params func (o *DcimRackRolesListParams) WithCreatedGte(createdGte *string) *DcimRackRolesListParams { o.SetCreatedGte(createdGte) @@ -439,6 +474,17 @@ func (o *DcimRackRolesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithCreatedLt(createdLt *string) *DcimRackRolesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim rack roles list params func (o *DcimRackRolesListParams) WithCreatedLte(createdLte *string) *DcimRackRolesListParams { o.SetCreatedLte(createdLte) @@ -450,6 +496,17 @@ func (o *DcimRackRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithCreatedn(createdn *string) *DcimRackRolesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim rack roles list params func (o *DcimRackRolesListParams) WithDescription(description *string) *DcimRackRolesListParams { o.SetDescription(description) @@ -637,6 +694,17 @@ func (o *DcimRackRolesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRackRolesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim rack roles list params func (o *DcimRackRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRackRolesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -648,6 +716,17 @@ func (o *DcimRackRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRackRolesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim rack roles list params func (o *DcimRackRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRackRolesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -659,6 +738,17 @@ func (o *DcimRackRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRackRolesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim rack roles list params func (o *DcimRackRolesListParams) WithLimit(limit *int64) *DcimRackRolesListParams { o.SetLimit(limit) @@ -791,6 +881,17 @@ func (o *DcimRackRolesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithOrdering(ordering *string) *DcimRackRolesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim rack roles list params func (o *DcimRackRolesListParams) WithQ(q *string) *DcimRackRolesListParams { o.SetQ(q) @@ -1129,6 +1230,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1146,6 +1264,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1163,6 +1298,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1452,6 +1604,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1469,6 +1638,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1486,6 +1672,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1690,6 +1893,23 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_elevation_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_elevation_parameters.go index d64662cde..c1bd50c52 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_elevation_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_elevation_parameters.go @@ -106,6 +106,11 @@ type DcimRacksElevationParams struct { // Default: 30 LegendWidth *int64 + // MarginWidth. + // + // Default: 15 + MarginWidth *int64 + // Q. Q *string @@ -150,6 +155,8 @@ func (o *DcimRacksElevationParams) SetDefaults() { legendWidthDefault = int64(30) + marginWidthDefault = int64(15) + renderDefault = string("json") unitHeightDefault = int64(22) @@ -162,6 +169,7 @@ func (o *DcimRacksElevationParams) SetDefaults() { Face: &faceDefault, IncludeImages: &includeImagesDefault, LegendWidth: &legendWidthDefault, + MarginWidth: &marginWidthDefault, Render: &renderDefault, UnitHeight: &unitHeightDefault, UnitWidth: &unitWidthDefault, @@ -272,6 +280,17 @@ func (o *DcimRacksElevationParams) SetLegendWidth(legendWidth *int64) { o.LegendWidth = legendWidth } +// WithMarginWidth adds the marginWidth to the dcim racks elevation params +func (o *DcimRacksElevationParams) WithMarginWidth(marginWidth *int64) *DcimRacksElevationParams { + o.SetMarginWidth(marginWidth) + return o +} + +// SetMarginWidth adds the marginWidth to the dcim racks elevation params +func (o *DcimRacksElevationParams) SetMarginWidth(marginWidth *int64) { + o.MarginWidth = marginWidth +} + // WithQ adds the q to the dcim racks elevation params func (o *DcimRacksElevationParams) WithQ(q *string) *DcimRacksElevationParams { o.SetQ(q) @@ -414,6 +433,23 @@ func (o *DcimRacksElevationParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.MarginWidth != nil { + + // query param margin_width + var qrMarginWidth int64 + + if o.MarginWidth != nil { + qrMarginWidth = *o.MarginWidth + } + qMarginWidth := swag.FormatInt64(qrMarginWidth) + if qMarginWidth != "" { + + if err := r.SetQueryParam("margin_width", qMarginWidth); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_list_parameters.go index d388856b2..012d64d02 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_racks_list_parameters.go @@ -128,12 +128,21 @@ type DcimRacksListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DescUnits. DescUnits *string @@ -188,12 +197,21 @@ type DcimRacksListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -248,6 +266,12 @@ type DcimRacksListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // OuterDepth. OuterDepth *string @@ -677,6 +701,17 @@ func (o *DcimRacksListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim racks list params +func (o *DcimRacksListParams) WithCreatedGt(createdGt *string) *DcimRacksListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim racks list params +func (o *DcimRacksListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim racks list params func (o *DcimRacksListParams) WithCreatedGte(createdGte *string) *DcimRacksListParams { o.SetCreatedGte(createdGte) @@ -688,6 +723,17 @@ func (o *DcimRacksListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim racks list params +func (o *DcimRacksListParams) WithCreatedLt(createdLt *string) *DcimRacksListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim racks list params +func (o *DcimRacksListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim racks list params func (o *DcimRacksListParams) WithCreatedLte(createdLte *string) *DcimRacksListParams { o.SetCreatedLte(createdLte) @@ -699,6 +745,17 @@ func (o *DcimRacksListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim racks list params +func (o *DcimRacksListParams) WithCreatedn(createdn *string) *DcimRacksListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim racks list params +func (o *DcimRacksListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescUnits adds the descUnits to the dcim racks list params func (o *DcimRacksListParams) WithDescUnits(descUnits *string) *DcimRacksListParams { o.SetDescUnits(descUnits) @@ -897,6 +954,17 @@ func (o *DcimRacksListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRacksListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim racks list params func (o *DcimRacksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRacksListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -908,6 +976,17 @@ func (o *DcimRacksListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRacksListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim racks list params func (o *DcimRacksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRacksListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -919,6 +998,17 @@ func (o *DcimRacksListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim racks list params +func (o *DcimRacksListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRacksListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim racks list params +func (o *DcimRacksListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim racks list params func (o *DcimRacksListParams) WithLimit(limit *int64) *DcimRacksListParams { o.SetLimit(limit) @@ -1095,6 +1185,17 @@ func (o *DcimRacksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim racks list params +func (o *DcimRacksListParams) WithOrdering(ordering *string) *DcimRacksListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim racks list params +func (o *DcimRacksListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithOuterDepth adds the outerDepth to the dcim racks list params func (o *DcimRacksListParams) WithOuterDepth(outerDepth *string) *DcimRacksListParams { o.SetOuterDepth(outerDepth) @@ -2085,6 +2186,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -2102,6 +2220,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -2119,6 +2254,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DescUnits != nil { // query param desc_units @@ -2425,6 +2577,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2442,6 +2611,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2459,6 +2645,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2731,6 +2934,23 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.OuterDepth != nil { // query param outer_depth diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go index 9c26720f3..46c93733b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go @@ -110,12 +110,21 @@ type DcimRearPortTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DevicetypeID. DevicetypeID *string @@ -143,12 +152,21 @@ type DcimRearPortTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -197,6 +215,12 @@ type DcimRearPortTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Positions. Positions *string @@ -398,6 +422,17 @@ func (o *DcimRearPortTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithCreatedGt(createdGt *string) *DcimRearPortTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithCreatedGte(createdGte *string) *DcimRearPortTemplatesListParams { o.SetCreatedGte(createdGte) @@ -409,6 +444,17 @@ func (o *DcimRearPortTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithCreatedLt(createdLt *string) *DcimRearPortTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithCreatedLte(createdLte *string) *DcimRearPortTemplatesListParams { o.SetCreatedLte(createdLte) @@ -420,6 +466,17 @@ func (o *DcimRearPortTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithCreatedn(createdn *string) *DcimRearPortTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevicetypeID adds the devicetypeID to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimRearPortTemplatesListParams { o.SetDevicetypeID(devicetypeID) @@ -519,6 +576,17 @@ func (o *DcimRearPortTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRearPortTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRearPortTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -530,6 +598,17 @@ func (o *DcimRearPortTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *stri o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRearPortTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRearPortTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -541,6 +620,17 @@ func (o *DcimRearPortTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *stri o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRearPortTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithLimit(limit *int64) *DcimRearPortTemplatesListParams { o.SetLimit(limit) @@ -695,6 +785,17 @@ func (o *DcimRearPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithOrdering(ordering *string) *DcimRearPortTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPositions adds the positions to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithPositions(positions *string) *DcimRearPortTemplatesListParams { o.SetPositions(positions) @@ -989,6 +1090,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1006,6 +1124,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1023,6 +1158,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DevicetypeID != nil { // query param devicetype_id @@ -1176,6 +1328,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1193,6 +1362,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1210,6 +1396,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1448,6 +1651,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Positions != nil { // query param positions diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_ports_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_ports_list_parameters.go index 90353f934..86b7e9fa8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_ports_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_rear_ports_list_parameters.go @@ -77,6 +77,12 @@ DcimRearPortsListParams contains all the parameters to send to the API endpoint */ type DcimRearPortsListParams struct { + // CableEnd. + CableEnd *string + + // CableEndn. + CableEndn *string + // Cabled. Cabled *string @@ -113,12 +119,21 @@ type DcimRearPortsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -212,12 +227,21 @@ type DcimRearPortsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -272,12 +296,21 @@ type DcimRearPortsListParams struct { // NameNisw. NameNisw *string + // Occupied. + Occupied *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Positions. Positions *string @@ -299,6 +332,18 @@ type DcimRearPortsListParams struct { // Q. Q *string + // Rack. + Rack *string + + // Rackn. + Rackn *string + + // RackID. + RackID *string + + // RackIDn. + RackIDn *string + // Region. Region *string @@ -412,6 +457,28 @@ func (o *DcimRearPortsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithCableEnd adds the cableEnd to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithCableEnd(cableEnd *string) *DcimRearPortsListParams { + o.SetCableEnd(cableEnd) + return o +} + +// SetCableEnd adds the cableEnd to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetCableEnd(cableEnd *string) { + o.CableEnd = cableEnd +} + +// WithCableEndn adds the cableEndn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithCableEndn(cableEndn *string) *DcimRearPortsListParams { + o.SetCableEndn(cableEndn) + return o +} + +// SetCableEndn adds the cableEndN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetCableEndn(cableEndn *string) { + o.CableEndn = cableEndn +} + // WithCabled adds the cabled to the dcim rear ports list params func (o *DcimRearPortsListParams) WithCabled(cabled *string) *DcimRearPortsListParams { o.SetCabled(cabled) @@ -544,6 +611,17 @@ func (o *DcimRearPortsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithCreatedGt(createdGt *string) *DcimRearPortsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim rear ports list params func (o *DcimRearPortsListParams) WithCreatedGte(createdGte *string) *DcimRearPortsListParams { o.SetCreatedGte(createdGte) @@ -555,6 +633,17 @@ func (o *DcimRearPortsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithCreatedLt(createdLt *string) *DcimRearPortsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim rear ports list params func (o *DcimRearPortsListParams) WithCreatedLte(createdLte *string) *DcimRearPortsListParams { o.SetCreatedLte(createdLte) @@ -566,6 +655,17 @@ func (o *DcimRearPortsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithCreatedn(createdn *string) *DcimRearPortsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim rear ports list params func (o *DcimRearPortsListParams) WithDescription(description *string) *DcimRearPortsListParams { o.SetDescription(description) @@ -907,6 +1007,17 @@ func (o *DcimRearPortsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRearPortsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim rear ports list params func (o *DcimRearPortsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRearPortsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -918,6 +1029,17 @@ func (o *DcimRearPortsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRearPortsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim rear ports list params func (o *DcimRearPortsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRearPortsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -929,6 +1051,17 @@ func (o *DcimRearPortsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRearPortsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim rear ports list params func (o *DcimRearPortsListParams) WithLimit(limit *int64) *DcimRearPortsListParams { o.SetLimit(limit) @@ -1116,6 +1249,17 @@ func (o *DcimRearPortsListParams) SetNameNisw(nameNisw *string) { o.NameNisw = nameNisw } +// WithOccupied adds the occupied to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithOccupied(occupied *string) *DcimRearPortsListParams { + o.SetOccupied(occupied) + return o +} + +// SetOccupied adds the occupied to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetOccupied(occupied *string) { + o.Occupied = occupied +} + // WithOffset adds the offset to the dcim rear ports list params func (o *DcimRearPortsListParams) WithOffset(offset *int64) *DcimRearPortsListParams { o.SetOffset(offset) @@ -1127,6 +1271,17 @@ func (o *DcimRearPortsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithOrdering(ordering *string) *DcimRearPortsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPositions adds the positions to the dcim rear ports list params func (o *DcimRearPortsListParams) WithPositions(positions *string) *DcimRearPortsListParams { o.SetPositions(positions) @@ -1204,6 +1359,50 @@ func (o *DcimRearPortsListParams) SetQ(q *string) { o.Q = q } +// WithRack adds the rack to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRack(rack *string) *DcimRearPortsListParams { + o.SetRack(rack) + return o +} + +// SetRack adds the rack to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRack(rack *string) { + o.Rack = rack +} + +// WithRackn adds the rackn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRackn(rackn *string) *DcimRearPortsListParams { + o.SetRackn(rackn) + return o +} + +// SetRackn adds the rackN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRackn(rackn *string) { + o.Rackn = rackn +} + +// WithRackID adds the rackID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRackID(rackID *string) *DcimRearPortsListParams { + o.SetRackID(rackID) + return o +} + +// SetRackID adds the rackId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRackID(rackID *string) { + o.RackID = rackID +} + +// WithRackIDn adds the rackIDn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithRackIDn(rackIDn *string) *DcimRearPortsListParams { + o.SetRackIDn(rackIDn) + return o +} + +// SetRackIDn adds the rackIdN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetRackIDn(rackIDn *string) { + o.RackIDn = rackIDn +} + // WithRegion adds the region to the dcim rear ports list params func (o *DcimRearPortsListParams) WithRegion(region *string) *DcimRearPortsListParams { o.SetRegion(region) @@ -1432,6 +1631,40 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } var res []error + if o.CableEnd != nil { + + // query param cable_end + var qrCableEnd string + + if o.CableEnd != nil { + qrCableEnd = *o.CableEnd + } + qCableEnd := qrCableEnd + if qCableEnd != "" { + + if err := r.SetQueryParam("cable_end", qCableEnd); err != nil { + return err + } + } + } + + if o.CableEndn != nil { + + // query param cable_end__n + var qrCableEndn string + + if o.CableEndn != nil { + qrCableEndn = *o.CableEndn + } + qCableEndn := qrCableEndn + if qCableEndn != "" { + + if err := r.SetQueryParam("cable_end__n", qCableEndn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1636,6 +1869,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1653,6 +1903,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1670,6 +1937,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2197,6 +2481,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2214,6 +2515,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2231,6 +2549,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2520,6 +2855,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Occupied != nil { + + // query param occupied + var qrOccupied string + + if o.Occupied != nil { + qrOccupied = *o.Occupied + } + qOccupied := qrOccupied + if qOccupied != "" { + + if err := r.SetQueryParam("occupied", qOccupied); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -2537,6 +2889,23 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Positions != nil { // query param positions @@ -2656,6 +3025,74 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Rack != nil { + + // query param rack + var qrRack string + + if o.Rack != nil { + qrRack = *o.Rack + } + qRack := qrRack + if qRack != "" { + + if err := r.SetQueryParam("rack", qRack); err != nil { + return err + } + } + } + + if o.Rackn != nil { + + // query param rack__n + var qrRackn string + + if o.Rackn != nil { + qrRackn = *o.Rackn + } + qRackn := qrRackn + if qRackn != "" { + + if err := r.SetQueryParam("rack__n", qRackn); err != nil { + return err + } + } + } + + if o.RackID != nil { + + // query param rack_id + var qrRackID string + + if o.RackID != nil { + qrRackID = *o.RackID + } + qRackID := qrRackID + if qRackID != "" { + + if err := r.SetQueryParam("rack_id", qRackID); err != nil { + return err + } + } + } + + if o.RackIDn != nil { + + // query param rack_id__n + var qrRackIDn string + + if o.RackIDn != nil { + qrRackIDn = *o.RackIDn + } + qRackIDn := qrRackIDn + if qRackIDn != "" { + + if err := r.SetQueryParam("rack_id__n", qRackIDn); err != nil { + return err + } + } + } + if o.Region != nil { // query param region diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_regions_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_regions_list_parameters.go index 0c96587aa..ccb15029b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_regions_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_regions_list_parameters.go @@ -98,12 +98,21 @@ type DcimRegionsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type DcimRegionsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type DcimRegionsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -384,6 +408,17 @@ func (o *DcimRegionsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim regions list params +func (o *DcimRegionsListParams) WithCreatedGt(createdGt *string) *DcimRegionsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim regions list params +func (o *DcimRegionsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim regions list params func (o *DcimRegionsListParams) WithCreatedGte(createdGte *string) *DcimRegionsListParams { o.SetCreatedGte(createdGte) @@ -395,6 +430,17 @@ func (o *DcimRegionsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim regions list params +func (o *DcimRegionsListParams) WithCreatedLt(createdLt *string) *DcimRegionsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim regions list params +func (o *DcimRegionsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim regions list params func (o *DcimRegionsListParams) WithCreatedLte(createdLte *string) *DcimRegionsListParams { o.SetCreatedLte(createdLte) @@ -406,6 +452,17 @@ func (o *DcimRegionsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim regions list params +func (o *DcimRegionsListParams) WithCreatedn(createdn *string) *DcimRegionsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim regions list params +func (o *DcimRegionsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim regions list params func (o *DcimRegionsListParams) WithDescription(description *string) *DcimRegionsListParams { o.SetDescription(description) @@ -593,6 +650,17 @@ func (o *DcimRegionsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim regions list params +func (o *DcimRegionsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimRegionsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim regions list params +func (o *DcimRegionsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim regions list params func (o *DcimRegionsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimRegionsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -604,6 +672,17 @@ func (o *DcimRegionsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim regions list params +func (o *DcimRegionsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimRegionsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim regions list params +func (o *DcimRegionsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim regions list params func (o *DcimRegionsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimRegionsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -615,6 +694,17 @@ func (o *DcimRegionsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim regions list params +func (o *DcimRegionsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimRegionsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim regions list params +func (o *DcimRegionsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim regions list params func (o *DcimRegionsListParams) WithLimit(limit *int64) *DcimRegionsListParams { o.SetLimit(limit) @@ -747,6 +837,17 @@ func (o *DcimRegionsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim regions list params +func (o *DcimRegionsListParams) WithOrdering(ordering *string) *DcimRegionsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim regions list params +func (o *DcimRegionsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the dcim regions list params func (o *DcimRegionsListParams) WithParent(parent *string) *DcimRegionsListParams { o.SetParent(parent) @@ -1061,6 +1162,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1078,6 +1196,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1095,6 +1230,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1384,6 +1536,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1401,6 +1570,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1418,6 +1604,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1622,6 +1825,23 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_site_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_site_groups_list_parameters.go index c5a4cb7b2..c58f59d7a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_site_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_site_groups_list_parameters.go @@ -98,12 +98,21 @@ type DcimSiteGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type DcimSiteGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type DcimSiteGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -384,6 +408,17 @@ func (o *DcimSiteGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithCreatedGt(createdGt *string) *DcimSiteGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithCreatedGte(createdGte *string) *DcimSiteGroupsListParams { o.SetCreatedGte(createdGte) @@ -395,6 +430,17 @@ func (o *DcimSiteGroupsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithCreatedLt(createdLt *string) *DcimSiteGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithCreatedLte(createdLte *string) *DcimSiteGroupsListParams { o.SetCreatedLte(createdLte) @@ -406,6 +452,17 @@ func (o *DcimSiteGroupsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithCreatedn(createdn *string) *DcimSiteGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithDescription(description *string) *DcimSiteGroupsListParams { o.SetDescription(description) @@ -593,6 +650,17 @@ func (o *DcimSiteGroupsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimSiteGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimSiteGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -604,6 +672,17 @@ func (o *DcimSiteGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimSiteGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimSiteGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -615,6 +694,17 @@ func (o *DcimSiteGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimSiteGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithLimit(limit *int64) *DcimSiteGroupsListParams { o.SetLimit(limit) @@ -747,6 +837,17 @@ func (o *DcimSiteGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithOrdering(ordering *string) *DcimSiteGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithParent(parent *string) *DcimSiteGroupsListParams { o.SetParent(parent) @@ -1061,6 +1162,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1078,6 +1196,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1095,6 +1230,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1384,6 +1536,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1401,6 +1570,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1418,6 +1604,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1622,6 +1825,23 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_sites_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_sites_list_parameters.go index 3b4f017bc..81f53f905 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_sites_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_sites_list_parameters.go @@ -110,12 +110,21 @@ type DcimSitesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -209,12 +218,21 @@ type DcimSitesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + // Latitude. Latitude *string @@ -293,6 +311,12 @@ type DcimSitesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -548,6 +572,17 @@ func (o *DcimSitesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedGt(createdGt *string) *DcimSitesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim sites list params func (o *DcimSitesListParams) WithCreatedGte(createdGte *string) *DcimSitesListParams { o.SetCreatedGte(createdGte) @@ -559,6 +594,17 @@ func (o *DcimSitesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedLt(createdLt *string) *DcimSitesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim sites list params func (o *DcimSitesListParams) WithCreatedLte(createdLte *string) *DcimSitesListParams { o.SetCreatedLte(createdLte) @@ -570,6 +616,17 @@ func (o *DcimSitesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedn(createdn *string) *DcimSitesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the dcim sites list params func (o *DcimSitesListParams) WithDescription(description *string) *DcimSitesListParams { o.SetDescription(description) @@ -911,6 +968,17 @@ func (o *DcimSitesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimSitesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim sites list params func (o *DcimSitesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimSitesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -922,6 +990,17 @@ func (o *DcimSitesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimSitesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim sites list params func (o *DcimSitesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimSitesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -933,6 +1012,17 @@ func (o *DcimSitesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim sites list params +func (o *DcimSitesListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimSitesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim sites list params +func (o *DcimSitesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLatitude adds the latitude to the dcim sites list params func (o *DcimSitesListParams) WithLatitude(latitude *string) *DcimSitesListParams { o.SetLatitude(latitude) @@ -1197,6 +1287,17 @@ func (o *DcimSitesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim sites list params +func (o *DcimSitesListParams) WithOrdering(ordering *string) *DcimSitesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim sites list params +func (o *DcimSitesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim sites list params func (o *DcimSitesListParams) WithQ(q *string) *DcimSitesListParams { o.SetQ(q) @@ -1689,6 +1790,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1706,6 +1824,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1723,6 +1858,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -2250,6 +2402,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2267,6 +2436,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2284,6 +2470,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Latitude != nil { // query param latitude @@ -2692,6 +2895,23 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go index 8722f8ccc..3ed1fdf5d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go @@ -80,12 +80,21 @@ type DcimVirtualChassisListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Domain. Domain *string @@ -137,12 +146,21 @@ type DcimVirtualChassisListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -197,6 +215,12 @@ type DcimVirtualChassisListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -318,6 +342,17 @@ func (o *DcimVirtualChassisListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithCreatedGt(createdGt *string) *DcimVirtualChassisListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithCreatedGte(createdGte *string) *DcimVirtualChassisListParams { o.SetCreatedGte(createdGte) @@ -329,6 +364,17 @@ func (o *DcimVirtualChassisListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithCreatedLt(createdLt *string) *DcimVirtualChassisListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithCreatedLte(createdLte *string) *DcimVirtualChassisListParams { o.SetCreatedLte(createdLte) @@ -340,6 +386,17 @@ func (o *DcimVirtualChassisListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithCreatedn(createdn *string) *DcimVirtualChassisListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDomain adds the domain to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithDomain(domain *string) *DcimVirtualChassisListParams { o.SetDomain(domain) @@ -527,6 +584,17 @@ func (o *DcimVirtualChassisListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithLastUpdatedGt(lastUpdatedGt *string) *DcimVirtualChassisListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimVirtualChassisListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -538,6 +606,17 @@ func (o *DcimVirtualChassisListParams) SetLastUpdatedGte(lastUpdatedGte *string) o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithLastUpdatedLt(lastUpdatedLt *string) *DcimVirtualChassisListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimVirtualChassisListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -549,6 +628,17 @@ func (o *DcimVirtualChassisListParams) SetLastUpdatedLte(lastUpdatedLte *string) o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithLastUpdatedn(lastUpdatedn *string) *DcimVirtualChassisListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithLimit(limit *int64) *DcimVirtualChassisListParams { o.SetLimit(limit) @@ -725,6 +815,17 @@ func (o *DcimVirtualChassisListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) WithOrdering(ordering *string) *DcimVirtualChassisListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the dcim virtual chassis list params +func (o *DcimVirtualChassisListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithQ(q *string) *DcimVirtualChassisListParams { o.SetQ(q) @@ -959,6 +1060,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -976,6 +1094,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -993,6 +1128,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Domain != nil { // query param domain @@ -1282,6 +1434,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1299,6 +1468,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1316,6 +1502,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1588,6 +1791,23 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_client.go index 119deacf0..400e5a9aa 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_client.go @@ -410,7 +410,7 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa } /* -ExtrasConfigContextsList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasConfigContextsList extras config contexts list API */ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasConfigContextsListOK, error) { // TODO: Validate the params before sending @@ -839,7 +839,7 @@ func (a *Client) ExtrasCustomFieldsDelete(params *ExtrasCustomFieldsDeleteParams } /* -ExtrasCustomFieldsList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasCustomFieldsList extras custom fields list API */ func (a *Client) ExtrasCustomFieldsList(params *ExtrasCustomFieldsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasCustomFieldsListOK, error) { // TODO: Validate the params before sending @@ -1190,7 +1190,7 @@ func (a *Client) ExtrasCustomLinksDelete(params *ExtrasCustomLinksDeleteParams, } /* -ExtrasCustomLinksList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasCustomLinksList extras custom links list API */ func (a *Client) ExtrasCustomLinksList(params *ExtrasCustomLinksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasCustomLinksListOK, error) { // TODO: Validate the params before sending @@ -1541,7 +1541,7 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete } /* -ExtrasExportTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasExportTemplatesList extras export templates list API */ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasExportTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1892,7 +1892,7 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele } /* -ExtrasImageAttachmentsList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasImageAttachmentsList extras image attachments list API */ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasImageAttachmentsListOK, error) { // TODO: Validate the params before sending @@ -2321,7 +2321,7 @@ func (a *Client) ExtrasJournalEntriesDelete(params *ExtrasJournalEntriesDeletePa } /* -ExtrasJournalEntriesList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasJournalEntriesList extras journal entries list API */ func (a *Client) ExtrasJournalEntriesList(params *ExtrasJournalEntriesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasJournalEntriesListOK, error) { // TODO: Validate the params before sending @@ -2945,7 +2945,7 @@ func (a *Client) ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runti } /* -ExtrasTagsList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasTagsList extras tags list API */ func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasTagsListOK, error) { // TODO: Validate the params before sending @@ -3296,7 +3296,7 @@ func (a *Client) ExtrasWebhooksDelete(params *ExtrasWebhooksDeleteParams, authIn } /* -ExtrasWebhooksList Overrides ListModelMixin to allow processing ExportTemplates. +ExtrasWebhooksList extras webhooks list API */ func (a *Client) ExtrasWebhooksList(params *ExtrasWebhooksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtrasWebhooksListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_config_contexts_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_config_contexts_list_parameters.go index 4011a3e49..c5c516455 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_config_contexts_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_config_contexts_list_parameters.go @@ -110,12 +110,21 @@ type ExtrasConfigContextsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DeviceTypeID. DeviceTypeID *string @@ -146,18 +155,39 @@ type ExtrasConfigContextsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. */ Limit *int64 + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + // Name. Name *string @@ -194,6 +224,12 @@ type ExtrasConfigContextsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Platform. Platform *string @@ -467,6 +503,17 @@ func (o *ExtrasConfigContextsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithCreatedGt(createdGt *string) *ExtrasConfigContextsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithCreatedGte(createdGte *string) *ExtrasConfigContextsListParams { o.SetCreatedGte(createdGte) @@ -478,6 +525,17 @@ func (o *ExtrasConfigContextsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithCreatedLt(createdLt *string) *ExtrasConfigContextsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithCreatedLte(createdLte *string) *ExtrasConfigContextsListParams { o.SetCreatedLte(createdLte) @@ -489,6 +547,17 @@ func (o *ExtrasConfigContextsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithCreatedn(createdn *string) *ExtrasConfigContextsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDeviceTypeID adds the deviceTypeID to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithDeviceTypeID(deviceTypeID *string) *ExtrasConfigContextsListParams { o.SetDeviceTypeID(deviceTypeID) @@ -599,6 +668,17 @@ func (o *ExtrasConfigContextsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *ExtrasConfigContextsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *ExtrasConfigContextsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -610,6 +690,17 @@ func (o *ExtrasConfigContextsListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *ExtrasConfigContextsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *ExtrasConfigContextsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -621,6 +712,17 @@ func (o *ExtrasConfigContextsListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLastUpdatedn(lastUpdatedn *string) *ExtrasConfigContextsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithLimit(limit *int64) *ExtrasConfigContextsListParams { o.SetLimit(limit) @@ -632,6 +734,50 @@ func (o *ExtrasConfigContextsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithLocation adds the location to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLocation(location *string) *ExtrasConfigContextsListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLocationn(locationn *string) *ExtrasConfigContextsListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLocationID(locationID *string) *ExtrasConfigContextsListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithLocationIDn(locationIDn *string) *ExtrasConfigContextsListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + // WithName adds the name to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithName(name *string) *ExtrasConfigContextsListParams { o.SetName(name) @@ -753,6 +899,17 @@ func (o *ExtrasConfigContextsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithOrdering(ordering *string) *ExtrasConfigContextsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPlatform adds the platform to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithPlatform(platform *string) *ExtrasConfigContextsListParams { o.SetPlatform(platform) @@ -1311,6 +1468,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1328,6 +1502,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1345,6 +1536,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DeviceTypeID != nil { // query param device_type_id @@ -1515,6 +1723,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1532,6 +1757,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1549,6 +1791,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1566,6 +1825,74 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + if o.Name != nil { // query param name @@ -1753,6 +2080,23 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Platform != nil { // query param platform diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_content_types_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_content_types_list_parameters.go index e3fc8008a..b442fb113 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_content_types_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_content_types_list_parameters.go @@ -98,6 +98,12 @@ type ExtrasContentTypesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -209,6 +215,17 @@ func (o *ExtrasContentTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras content types list params +func (o *ExtrasContentTypesListParams) WithOrdering(ordering *string) *ExtrasContentTypesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras content types list params +func (o *ExtrasContentTypesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras content types list params func (o *ExtrasContentTypesListParams) WithQ(q *string) *ExtrasContentTypesListParams { o.SetQ(q) @@ -313,6 +330,23 @@ func (o *ExtrasContentTypesListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_fields_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_fields_list_parameters.go index 66a631956..794638387 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_fields_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_fields_list_parameters.go @@ -161,6 +161,36 @@ type ExtrasCustomFieldsListParams struct { // FilterLogicn. FilterLogicn *string + // GroupName. + GroupName *string + + // GroupNameIc. + GroupNameIc *string + + // GroupNameIe. + GroupNameIe *string + + // GroupNameIew. + GroupNameIew *string + + // GroupNameIsw. + GroupNameIsw *string + + // GroupNamen. + GroupNamen *string + + // GroupNameNic. + GroupNameNic *string + + // GroupNameNie. + GroupNameNie *string + + // GroupNameNiew. + GroupNameNiew *string + + // GroupNameNisw. + GroupNameNisw *string + // ID. ID *string @@ -221,6 +251,12 @@ type ExtrasCustomFieldsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -233,6 +269,12 @@ type ExtrasCustomFieldsListParams struct { // Typen. Typen *string + // UIVisibility. + UIVisibility *string + + // UIVisibilityn. + UIVisibilityn *string + // Weight. Weight *string @@ -612,6 +654,116 @@ func (o *ExtrasCustomFieldsListParams) SetFilterLogicn(filterLogicn *string) { o.FilterLogicn = filterLogicn } +// WithGroupName adds the groupName to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupName(groupName *string) *ExtrasCustomFieldsListParams { + o.SetGroupName(groupName) + return o +} + +// SetGroupName adds the groupName to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupName(groupName *string) { + o.GroupName = groupName +} + +// WithGroupNameIc adds the groupNameIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameIc(groupNameIc *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameIc(groupNameIc) + return o +} + +// SetGroupNameIc adds the groupNameIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameIc(groupNameIc *string) { + o.GroupNameIc = groupNameIc +} + +// WithGroupNameIe adds the groupNameIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameIe(groupNameIe *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameIe(groupNameIe) + return o +} + +// SetGroupNameIe adds the groupNameIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameIe(groupNameIe *string) { + o.GroupNameIe = groupNameIe +} + +// WithGroupNameIew adds the groupNameIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameIew(groupNameIew *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameIew(groupNameIew) + return o +} + +// SetGroupNameIew adds the groupNameIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameIew(groupNameIew *string) { + o.GroupNameIew = groupNameIew +} + +// WithGroupNameIsw adds the groupNameIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameIsw(groupNameIsw *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameIsw(groupNameIsw) + return o +} + +// SetGroupNameIsw adds the groupNameIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameIsw(groupNameIsw *string) { + o.GroupNameIsw = groupNameIsw +} + +// WithGroupNamen adds the groupNamen to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNamen(groupNamen *string) *ExtrasCustomFieldsListParams { + o.SetGroupNamen(groupNamen) + return o +} + +// SetGroupNamen adds the groupNameN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNamen(groupNamen *string) { + o.GroupNamen = groupNamen +} + +// WithGroupNameNic adds the groupNameNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameNic(groupNameNic *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameNic(groupNameNic) + return o +} + +// SetGroupNameNic adds the groupNameNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameNic(groupNameNic *string) { + o.GroupNameNic = groupNameNic +} + +// WithGroupNameNie adds the groupNameNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameNie(groupNameNie *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameNie(groupNameNie) + return o +} + +// SetGroupNameNie adds the groupNameNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameNie(groupNameNie *string) { + o.GroupNameNie = groupNameNie +} + +// WithGroupNameNiew adds the groupNameNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameNiew(groupNameNiew *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameNiew(groupNameNiew) + return o +} + +// SetGroupNameNiew adds the groupNameNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameNiew(groupNameNiew *string) { + o.GroupNameNiew = groupNameNiew +} + +// WithGroupNameNisw adds the groupNameNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithGroupNameNisw(groupNameNisw *string) *ExtrasCustomFieldsListParams { + o.SetGroupNameNisw(groupNameNisw) + return o +} + +// SetGroupNameNisw adds the groupNameNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetGroupNameNisw(groupNameNisw *string) { + o.GroupNameNisw = groupNameNisw +} + // WithID adds the id to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithID(id *string) *ExtrasCustomFieldsListParams { o.SetID(id) @@ -810,6 +962,17 @@ func (o *ExtrasCustomFieldsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithOrdering(ordering *string) *ExtrasCustomFieldsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithQ(q *string) *ExtrasCustomFieldsListParams { o.SetQ(q) @@ -854,6 +1017,28 @@ func (o *ExtrasCustomFieldsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithUIVisibility adds the uIVisibility to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithUIVisibility(uIVisibility *string) *ExtrasCustomFieldsListParams { + o.SetUIVisibility(uIVisibility) + return o +} + +// SetUIVisibility adds the uiVisibility to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetUIVisibility(uIVisibility *string) { + o.UIVisibility = uIVisibility +} + +// WithUIVisibilityn adds the uIVisibilityn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithUIVisibilityn(uIVisibilityn *string) *ExtrasCustomFieldsListParams { + o.SetUIVisibilityn(uIVisibilityn) + return o +} + +// SetUIVisibilityn adds the uiVisibilityN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetUIVisibilityn(uIVisibilityn *string) { + o.UIVisibilityn = uIVisibilityn +} + // WithWeight adds the weight to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithWeight(weight *string) *ExtrasCustomFieldsListParams { o.SetWeight(weight) @@ -1404,6 +1589,176 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.GroupName != nil { + + // query param group_name + var qrGroupName string + + if o.GroupName != nil { + qrGroupName = *o.GroupName + } + qGroupName := qrGroupName + if qGroupName != "" { + + if err := r.SetQueryParam("group_name", qGroupName); err != nil { + return err + } + } + } + + if o.GroupNameIc != nil { + + // query param group_name__ic + var qrGroupNameIc string + + if o.GroupNameIc != nil { + qrGroupNameIc = *o.GroupNameIc + } + qGroupNameIc := qrGroupNameIc + if qGroupNameIc != "" { + + if err := r.SetQueryParam("group_name__ic", qGroupNameIc); err != nil { + return err + } + } + } + + if o.GroupNameIe != nil { + + // query param group_name__ie + var qrGroupNameIe string + + if o.GroupNameIe != nil { + qrGroupNameIe = *o.GroupNameIe + } + qGroupNameIe := qrGroupNameIe + if qGroupNameIe != "" { + + if err := r.SetQueryParam("group_name__ie", qGroupNameIe); err != nil { + return err + } + } + } + + if o.GroupNameIew != nil { + + // query param group_name__iew + var qrGroupNameIew string + + if o.GroupNameIew != nil { + qrGroupNameIew = *o.GroupNameIew + } + qGroupNameIew := qrGroupNameIew + if qGroupNameIew != "" { + + if err := r.SetQueryParam("group_name__iew", qGroupNameIew); err != nil { + return err + } + } + } + + if o.GroupNameIsw != nil { + + // query param group_name__isw + var qrGroupNameIsw string + + if o.GroupNameIsw != nil { + qrGroupNameIsw = *o.GroupNameIsw + } + qGroupNameIsw := qrGroupNameIsw + if qGroupNameIsw != "" { + + if err := r.SetQueryParam("group_name__isw", qGroupNameIsw); err != nil { + return err + } + } + } + + if o.GroupNamen != nil { + + // query param group_name__n + var qrGroupNamen string + + if o.GroupNamen != nil { + qrGroupNamen = *o.GroupNamen + } + qGroupNamen := qrGroupNamen + if qGroupNamen != "" { + + if err := r.SetQueryParam("group_name__n", qGroupNamen); err != nil { + return err + } + } + } + + if o.GroupNameNic != nil { + + // query param group_name__nic + var qrGroupNameNic string + + if o.GroupNameNic != nil { + qrGroupNameNic = *o.GroupNameNic + } + qGroupNameNic := qrGroupNameNic + if qGroupNameNic != "" { + + if err := r.SetQueryParam("group_name__nic", qGroupNameNic); err != nil { + return err + } + } + } + + if o.GroupNameNie != nil { + + // query param group_name__nie + var qrGroupNameNie string + + if o.GroupNameNie != nil { + qrGroupNameNie = *o.GroupNameNie + } + qGroupNameNie := qrGroupNameNie + if qGroupNameNie != "" { + + if err := r.SetQueryParam("group_name__nie", qGroupNameNie); err != nil { + return err + } + } + } + + if o.GroupNameNiew != nil { + + // query param group_name__niew + var qrGroupNameNiew string + + if o.GroupNameNiew != nil { + qrGroupNameNiew = *o.GroupNameNiew + } + qGroupNameNiew := qrGroupNameNiew + if qGroupNameNiew != "" { + + if err := r.SetQueryParam("group_name__niew", qGroupNameNiew); err != nil { + return err + } + } + } + + if o.GroupNameNisw != nil { + + // query param group_name__nisw + var qrGroupNameNisw string + + if o.GroupNameNisw != nil { + qrGroupNameNisw = *o.GroupNameNisw + } + qGroupNameNisw := qrGroupNameNisw + if qGroupNameNisw != "" { + + if err := r.SetQueryParam("group_name__nisw", qGroupNameNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1710,6 +2065,23 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -1778,6 +2150,40 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.UIVisibility != nil { + + // query param ui_visibility + var qrUIVisibility string + + if o.UIVisibility != nil { + qrUIVisibility = *o.UIVisibility + } + qUIVisibility := qrUIVisibility + if qUIVisibility != "" { + + if err := r.SetQueryParam("ui_visibility", qUIVisibility); err != nil { + return err + } + } + } + + if o.UIVisibilityn != nil { + + // query param ui_visibility__n + var qrUIVisibilityn string + + if o.UIVisibilityn != nil { + qrUIVisibilityn = *o.UIVisibilityn + } + qUIVisibilityn := qrUIVisibilityn + if qUIVisibilityn != "" { + + if err := r.SetQueryParam("ui_visibility__n", qUIVisibilityn); err != nil { + return err + } + } + } + if o.Weight != nil { // query param weight diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_links_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_links_list_parameters.go index f2fa0374c..6fdc1d877 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_links_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_custom_links_list_parameters.go @@ -239,6 +239,12 @@ type ExtrasCustomLinksListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -885,6 +891,17 @@ func (o *ExtrasCustomLinksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras custom links list params +func (o *ExtrasCustomLinksListParams) WithOrdering(ordering *string) *ExtrasCustomLinksListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras custom links list params +func (o *ExtrasCustomLinksListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithQ(q *string) *ExtrasCustomLinksListParams { o.SetQ(q) @@ -1854,6 +1871,23 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_export_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_export_templates_list_parameters.go index 9da2c85ff..7f6c3a910 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_export_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_export_templates_list_parameters.go @@ -173,6 +173,12 @@ type ExtrasExportTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -559,6 +565,17 @@ func (o *ExtrasExportTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithOrdering(ordering *string) *ExtrasExportTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras export templates list params func (o *ExtrasExportTemplatesListParams) WithQ(q *string) *ExtrasExportTemplatesListParams { o.SetQ(q) @@ -1088,6 +1105,23 @@ func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_image_attachments_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_image_attachments_list_parameters.go index a2b69ca18..2a6ae5345 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_image_attachments_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_image_attachments_list_parameters.go @@ -170,6 +170,12 @@ type ExtrasImageAttachmentsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -545,6 +551,17 @@ func (o *ExtrasImageAttachmentsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras image attachments list params +func (o *ExtrasImageAttachmentsListParams) WithOrdering(ordering *string) *ExtrasImageAttachmentsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras image attachments list params +func (o *ExtrasImageAttachmentsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras image attachments list params func (o *ExtrasImageAttachmentsListParams) WithQ(q *string) *ExtrasImageAttachmentsListParams { o.SetQ(q) @@ -1057,6 +1074,23 @@ func (o *ExtrasImageAttachmentsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_job_results_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_job_results_list_parameters.go index 4c4b11d7e..8c09cad88 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_job_results_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_job_results_list_parameters.go @@ -149,6 +149,12 @@ type ExtrasJobResultsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -459,6 +465,17 @@ func (o *ExtrasJobResultsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras job results list params +func (o *ExtrasJobResultsListParams) WithOrdering(ordering *string) *ExtrasJobResultsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras job results list params +func (o *ExtrasJobResultsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras job results list params func (o *ExtrasJobResultsListParams) WithQ(q *string) *ExtrasJobResultsListParams { o.SetQ(q) @@ -896,6 +913,23 @@ func (o *ExtrasJobResultsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_journal_entries_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_journal_entries_list_parameters.go index 86c8442c8..a610a0300 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_journal_entries_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_journal_entries_list_parameters.go @@ -110,12 +110,6 @@ type ExtrasJournalEntriesListParams struct { // Created. Created *string - // CreatedGte. - CreatedGte *string - - // CreatedLte. - CreatedLte *string - // CreatedBy. CreatedBy *string @@ -155,12 +149,21 @@ type ExtrasJournalEntriesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -173,6 +176,12 @@ type ExtrasJournalEntriesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -356,28 +365,6 @@ func (o *ExtrasJournalEntriesListParams) SetCreated(created *string) { o.Created = created } -// WithCreatedGte adds the createdGte to the extras journal entries list params -func (o *ExtrasJournalEntriesListParams) WithCreatedGte(createdGte *string) *ExtrasJournalEntriesListParams { - o.SetCreatedGte(createdGte) - return o -} - -// SetCreatedGte adds the createdGte to the extras journal entries list params -func (o *ExtrasJournalEntriesListParams) SetCreatedGte(createdGte *string) { - o.CreatedGte = createdGte -} - -// WithCreatedLte adds the createdLte to the extras journal entries list params -func (o *ExtrasJournalEntriesListParams) WithCreatedLte(createdLte *string) *ExtrasJournalEntriesListParams { - o.SetCreatedLte(createdLte) - return o -} - -// SetCreatedLte adds the createdLte to the extras journal entries list params -func (o *ExtrasJournalEntriesListParams) SetCreatedLte(createdLte *string) { - o.CreatedLte = createdLte -} - // WithCreatedBy adds the createdBy to the extras journal entries list params func (o *ExtrasJournalEntriesListParams) WithCreatedBy(createdBy *string) *ExtrasJournalEntriesListParams { o.SetCreatedBy(createdBy) @@ -521,6 +508,17 @@ func (o *ExtrasJournalEntriesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *ExtrasJournalEntriesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the extras journal entries list params func (o *ExtrasJournalEntriesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *ExtrasJournalEntriesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -532,6 +530,17 @@ func (o *ExtrasJournalEntriesListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *ExtrasJournalEntriesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the extras journal entries list params func (o *ExtrasJournalEntriesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *ExtrasJournalEntriesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -543,6 +552,17 @@ func (o *ExtrasJournalEntriesListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithLastUpdatedn(lastUpdatedn *string) *ExtrasJournalEntriesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the extras journal entries list params func (o *ExtrasJournalEntriesListParams) WithLimit(limit *int64) *ExtrasJournalEntriesListParams { o.SetLimit(limit) @@ -565,6 +585,17 @@ func (o *ExtrasJournalEntriesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithOrdering(ordering *string) *ExtrasJournalEntriesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras journal entries list params func (o *ExtrasJournalEntriesListParams) WithQ(q *string) *ExtrasJournalEntriesListParams { o.SetQ(q) @@ -793,40 +824,6 @@ func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.CreatedGte != nil { - - // query param created__gte - var qrCreatedGte string - - if o.CreatedGte != nil { - qrCreatedGte = *o.CreatedGte - } - qCreatedGte := qrCreatedGte - if qCreatedGte != "" { - - if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { - return err - } - } - } - - if o.CreatedLte != nil { - - // query param created__lte - var qrCreatedLte string - - if o.CreatedLte != nil { - qrCreatedLte = *o.CreatedLte - } - qCreatedLte := qrCreatedLte - if qCreatedLte != "" { - - if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { - return err - } - } - } - if o.CreatedBy != nil { // query param created_by @@ -1048,6 +1045,23 @@ func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1065,6 +1079,23 @@ func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1082,6 +1113,23 @@ func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1116,6 +1164,23 @@ func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_object_changes_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_object_changes_list_parameters.go index 335e93fa3..2fb68ec95 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_object_changes_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_object_changes_list_parameters.go @@ -173,6 +173,12 @@ type ExtrasObjectChangesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -607,6 +613,17 @@ func (o *ExtrasObjectChangesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras object changes list params +func (o *ExtrasObjectChangesListParams) WithOrdering(ordering *string) *ExtrasObjectChangesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras object changes list params +func (o *ExtrasObjectChangesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras object changes list params func (o *ExtrasObjectChangesListParams) WithQ(q *string) *ExtrasObjectChangesListParams { o.SetQ(q) @@ -1312,6 +1329,23 @@ func (o *ExtrasObjectChangesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_tags_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_tags_list_parameters.go index 570226579..e6c170173 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_tags_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_tags_list_parameters.go @@ -116,12 +116,21 @@ type ExtrasTagsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -173,12 +182,21 @@ type ExtrasTagsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -221,6 +239,12 @@ type ExtrasTagsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -450,6 +474,17 @@ func (o *ExtrasTagsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the extras tags list params +func (o *ExtrasTagsListParams) WithCreatedGt(createdGt *string) *ExtrasTagsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the extras tags list params +func (o *ExtrasTagsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the extras tags list params func (o *ExtrasTagsListParams) WithCreatedGte(createdGte *string) *ExtrasTagsListParams { o.SetCreatedGte(createdGte) @@ -461,6 +496,17 @@ func (o *ExtrasTagsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the extras tags list params +func (o *ExtrasTagsListParams) WithCreatedLt(createdLt *string) *ExtrasTagsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the extras tags list params +func (o *ExtrasTagsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the extras tags list params func (o *ExtrasTagsListParams) WithCreatedLte(createdLte *string) *ExtrasTagsListParams { o.SetCreatedLte(createdLte) @@ -472,6 +518,17 @@ func (o *ExtrasTagsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the extras tags list params +func (o *ExtrasTagsListParams) WithCreatedn(createdn *string) *ExtrasTagsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the extras tags list params +func (o *ExtrasTagsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the extras tags list params func (o *ExtrasTagsListParams) WithDescription(description *string) *ExtrasTagsListParams { o.SetDescription(description) @@ -659,6 +716,17 @@ func (o *ExtrasTagsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the extras tags list params +func (o *ExtrasTagsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *ExtrasTagsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the extras tags list params +func (o *ExtrasTagsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the extras tags list params func (o *ExtrasTagsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *ExtrasTagsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -670,6 +738,17 @@ func (o *ExtrasTagsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the extras tags list params +func (o *ExtrasTagsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *ExtrasTagsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the extras tags list params +func (o *ExtrasTagsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the extras tags list params func (o *ExtrasTagsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *ExtrasTagsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -681,6 +760,17 @@ func (o *ExtrasTagsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the extras tags list params +func (o *ExtrasTagsListParams) WithLastUpdatedn(lastUpdatedn *string) *ExtrasTagsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the extras tags list params +func (o *ExtrasTagsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the extras tags list params func (o *ExtrasTagsListParams) WithLimit(limit *int64) *ExtrasTagsListParams { o.SetLimit(limit) @@ -813,6 +903,17 @@ func (o *ExtrasTagsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras tags list params +func (o *ExtrasTagsListParams) WithOrdering(ordering *string) *ExtrasTagsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras tags list params +func (o *ExtrasTagsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the extras tags list params func (o *ExtrasTagsListParams) WithQ(q *string) *ExtrasTagsListParams { o.SetQ(q) @@ -1163,6 +1264,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1180,6 +1298,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1197,6 +1332,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1486,6 +1638,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1503,6 +1672,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1520,6 +1706,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1724,6 +1927,23 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_webhooks_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_webhooks_list_parameters.go index 9c1c85ca7..34e7634ed 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_webhooks_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/extras/extras_webhooks_list_parameters.go @@ -254,6 +254,12 @@ type ExtrasWebhooksListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // PayloadURL. PayloadURL *string @@ -1009,6 +1015,17 @@ func (o *ExtrasWebhooksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the extras webhooks list params +func (o *ExtrasWebhooksListParams) WithOrdering(ordering *string) *ExtrasWebhooksListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the extras webhooks list params +func (o *ExtrasWebhooksListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPayloadURL adds the payloadURL to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithPayloadURL(payloadURL *string) *ExtrasWebhooksListParams { o.SetPayloadURL(payloadURL) @@ -2261,6 +2278,23 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.PayloadURL != nil { // query param payload_url diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_aggregates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_aggregates_list_parameters.go index 0de480eb6..baf8ec735 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_aggregates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_aggregates_list_parameters.go @@ -80,12 +80,21 @@ type IpamAggregatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // DateAdded. DateAdded *string @@ -158,12 +167,21 @@ type IpamAggregatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -176,6 +194,12 @@ type IpamAggregatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Prefix. Prefix *string @@ -288,6 +312,17 @@ func (o *IpamAggregatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreatedGt(createdGt *string) *IpamAggregatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam aggregates list params func (o *IpamAggregatesListParams) WithCreatedGte(createdGte *string) *IpamAggregatesListParams { o.SetCreatedGte(createdGte) @@ -299,6 +334,17 @@ func (o *IpamAggregatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreatedLt(createdLt *string) *IpamAggregatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam aggregates list params func (o *IpamAggregatesListParams) WithCreatedLte(createdLte *string) *IpamAggregatesListParams { o.SetCreatedLte(createdLte) @@ -310,6 +356,17 @@ func (o *IpamAggregatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithCreatedn(createdn *string) *IpamAggregatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDateAdded adds the dateAdded to the ipam aggregates list params func (o *IpamAggregatesListParams) WithDateAdded(dateAdded *string) *IpamAggregatesListParams { o.SetDateAdded(dateAdded) @@ -574,6 +631,17 @@ func (o *IpamAggregatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamAggregatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam aggregates list params func (o *IpamAggregatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamAggregatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -585,6 +653,17 @@ func (o *IpamAggregatesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamAggregatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam aggregates list params func (o *IpamAggregatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamAggregatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -596,6 +675,17 @@ func (o *IpamAggregatesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamAggregatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam aggregates list params func (o *IpamAggregatesListParams) WithLimit(limit *int64) *IpamAggregatesListParams { o.SetLimit(limit) @@ -618,6 +708,17 @@ func (o *IpamAggregatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithOrdering(ordering *string) *IpamAggregatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPrefix adds the prefix to the ipam aggregates list params func (o *IpamAggregatesListParams) WithPrefix(prefix *string) *IpamAggregatesListParams { o.SetPrefix(prefix) @@ -819,6 +920,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -836,6 +954,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -853,6 +988,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.DateAdded != nil { // query param date_added @@ -1261,6 +1413,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1278,6 +1447,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1295,6 +1481,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1329,6 +1532,23 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Prefix != nil { // query param prefix diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_asns_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_asns_list_parameters.go index 3e990663a..5f1f659db 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_asns_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_asns_list_parameters.go @@ -98,12 +98,21 @@ type IpamAsnsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type IpamAsnsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -173,6 +191,12 @@ type IpamAsnsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -360,6 +384,17 @@ func (o *IpamAsnsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam asns list params +func (o *IpamAsnsListParams) WithCreatedGt(createdGt *string) *IpamAsnsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam asns list params +func (o *IpamAsnsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam asns list params func (o *IpamAsnsListParams) WithCreatedGte(createdGte *string) *IpamAsnsListParams { o.SetCreatedGte(createdGte) @@ -371,6 +406,17 @@ func (o *IpamAsnsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam asns list params +func (o *IpamAsnsListParams) WithCreatedLt(createdLt *string) *IpamAsnsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam asns list params +func (o *IpamAsnsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam asns list params func (o *IpamAsnsListParams) WithCreatedLte(createdLte *string) *IpamAsnsListParams { o.SetCreatedLte(createdLte) @@ -382,6 +428,17 @@ func (o *IpamAsnsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam asns list params +func (o *IpamAsnsListParams) WithCreatedn(createdn *string) *IpamAsnsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam asns list params +func (o *IpamAsnsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam asns list params func (o *IpamAsnsListParams) WithDescription(description *string) *IpamAsnsListParams { o.SetDescription(description) @@ -569,6 +626,17 @@ func (o *IpamAsnsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamAsnsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam asns list params func (o *IpamAsnsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamAsnsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -580,6 +648,17 @@ func (o *IpamAsnsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamAsnsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam asns list params func (o *IpamAsnsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamAsnsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -591,6 +670,17 @@ func (o *IpamAsnsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamAsnsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam asns list params func (o *IpamAsnsListParams) WithLimit(limit *int64) *IpamAsnsListParams { o.SetLimit(limit) @@ -613,6 +703,17 @@ func (o *IpamAsnsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam asns list params +func (o *IpamAsnsListParams) WithOrdering(ordering *string) *IpamAsnsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam asns list params +func (o *IpamAsnsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam asns list params func (o *IpamAsnsListParams) WithQ(q *string) *IpamAsnsListParams { o.SetQ(q) @@ -949,6 +1050,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -966,6 +1084,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -983,6 +1118,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1272,6 +1424,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1289,6 +1458,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1306,6 +1492,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1340,6 +1543,23 @@ func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_client.go index 21bfb218f..d2207704c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_client.go @@ -157,6 +157,42 @@ type ClientService interface { IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesUpdateOK, error) + IpamL2vpnTerminationsBulkDelete(params *IpamL2vpnTerminationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkDeleteNoContent, error) + + IpamL2vpnTerminationsBulkPartialUpdate(params *IpamL2vpnTerminationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkPartialUpdateOK, error) + + IpamL2vpnTerminationsBulkUpdate(params *IpamL2vpnTerminationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkUpdateOK, error) + + IpamL2vpnTerminationsCreate(params *IpamL2vpnTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsCreateCreated, error) + + IpamL2vpnTerminationsDelete(params *IpamL2vpnTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsDeleteNoContent, error) + + IpamL2vpnTerminationsList(params *IpamL2vpnTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsListOK, error) + + IpamL2vpnTerminationsPartialUpdate(params *IpamL2vpnTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsPartialUpdateOK, error) + + IpamL2vpnTerminationsRead(params *IpamL2vpnTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsReadOK, error) + + IpamL2vpnTerminationsUpdate(params *IpamL2vpnTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsUpdateOK, error) + + IpamL2vpnsBulkDelete(params *IpamL2vpnsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkDeleteNoContent, error) + + IpamL2vpnsBulkPartialUpdate(params *IpamL2vpnsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkPartialUpdateOK, error) + + IpamL2vpnsBulkUpdate(params *IpamL2vpnsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkUpdateOK, error) + + IpamL2vpnsCreate(params *IpamL2vpnsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsCreateCreated, error) + + IpamL2vpnsDelete(params *IpamL2vpnsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsDeleteNoContent, error) + + IpamL2vpnsList(params *IpamL2vpnsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsListOK, error) + + IpamL2vpnsPartialUpdate(params *IpamL2vpnsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsPartialUpdateOK, error) + + IpamL2vpnsRead(params *IpamL2vpnsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsReadOK, error) + + IpamL2vpnsUpdate(params *IpamL2vpnsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsUpdateOK, error) + IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsCreateCreated, error) IpamPrefixesAvailableIpsList(params *IpamPrefixesAvailableIpsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsListOK, error) @@ -530,7 +566,7 @@ func (a *Client) IpamAggregatesDelete(params *IpamAggregatesDeleteParams, authIn } /* -IpamAggregatesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamAggregatesList ipam aggregates list API */ func (a *Client) IpamAggregatesList(params *IpamAggregatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAggregatesListOK, error) { // TODO: Validate the params before sending @@ -881,7 +917,7 @@ func (a *Client) IpamAsnsDelete(params *IpamAsnsDeleteParams, authInfo runtime.C } /* -IpamAsnsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamAsnsList ipam asns list API */ func (a *Client) IpamAsnsList(params *IpamAsnsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsListOK, error) { // TODO: Validate the params before sending @@ -1232,7 +1268,7 @@ func (a *Client) IpamFhrpGroupAssignmentsDelete(params *IpamFhrpGroupAssignments } /* -IpamFhrpGroupAssignmentsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamFhrpGroupAssignmentsList ipam fhrp group assignments list API */ func (a *Client) IpamFhrpGroupAssignmentsList(params *IpamFhrpGroupAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsListOK, error) { // TODO: Validate the params before sending @@ -1583,7 +1619,7 @@ func (a *Client) IpamFhrpGroupsDelete(params *IpamFhrpGroupsDeleteParams, authIn } /* -IpamFhrpGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamFhrpGroupsList ipam fhrp groups list API */ func (a *Client) IpamFhrpGroupsList(params *IpamFhrpGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsListOK, error) { // TODO: Validate the params before sending @@ -1934,7 +1970,7 @@ func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, auth } /* -IpamIPAddressesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamIPAddressesList ipam ip addresses list API */ func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesListOK, error) { // TODO: Validate the params before sending @@ -2363,7 +2399,7 @@ func (a *Client) IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo r } /* -IpamIPRangesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamIPRangesList ipam ip ranges list API */ func (a *Client) IpamIPRangesList(params *IpamIPRangesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesListOK, error) { // TODO: Validate the params before sending @@ -2518,6 +2554,708 @@ func (a *Client) IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo r panic(msg) } +/* +IpamL2vpnTerminationsBulkDelete ipam l2vpn terminations bulk delete API +*/ +func (a *Client) IpamL2vpnTerminationsBulkDelete(params *IpamL2vpnTerminationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/l2vpn-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsBulkDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsBulkPartialUpdate ipam l2vpn terminations bulk partial update API +*/ +func (a *Client) IpamL2vpnTerminationsBulkPartialUpdate(params *IpamL2vpnTerminationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/l2vpn-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsBulkPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsBulkUpdate ipam l2vpn terminations bulk update API +*/ +func (a *Client) IpamL2vpnTerminationsBulkUpdate(params *IpamL2vpnTerminationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_bulk_update", + Method: "PUT", + PathPattern: "/ipam/l2vpn-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsBulkUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsCreate ipam l2vpn terminations create API +*/ +func (a *Client) IpamL2vpnTerminationsCreate(params *IpamL2vpnTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_create", + Method: "POST", + PathPattern: "/ipam/l2vpn-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsDelete ipam l2vpn terminations delete API +*/ +func (a *Client) IpamL2vpnTerminationsDelete(params *IpamL2vpnTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_delete", + Method: "DELETE", + PathPattern: "/ipam/l2vpn-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsList ipam l2vpn terminations list API +*/ +func (a *Client) IpamL2vpnTerminationsList(params *IpamL2vpnTerminationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_list", + Method: "GET", + PathPattern: "/ipam/l2vpn-terminations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsPartialUpdate ipam l2vpn terminations partial update API +*/ +func (a *Client) IpamL2vpnTerminationsPartialUpdate(params *IpamL2vpnTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_partial_update", + Method: "PATCH", + PathPattern: "/ipam/l2vpn-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsRead ipam l2vpn terminations read API +*/ +func (a *Client) IpamL2vpnTerminationsRead(params *IpamL2vpnTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_read", + Method: "GET", + PathPattern: "/ipam/l2vpn-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnTerminationsUpdate ipam l2vpn terminations update API +*/ +func (a *Client) IpamL2vpnTerminationsUpdate(params *IpamL2vpnTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnTerminationsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnTerminationsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpn-terminations_update", + Method: "PUT", + PathPattern: "/ipam/l2vpn-terminations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnTerminationsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnTerminationsUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpn-terminations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsBulkDelete ipam l2vpns bulk delete API +*/ +func (a *Client) IpamL2vpnsBulkDelete(params *IpamL2vpnsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/l2vpns/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsBulkDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsBulkPartialUpdate ipam l2vpns bulk partial update API +*/ +func (a *Client) IpamL2vpnsBulkPartialUpdate(params *IpamL2vpnsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/l2vpns/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsBulkPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsBulkUpdate ipam l2vpns bulk update API +*/ +func (a *Client) IpamL2vpnsBulkUpdate(params *IpamL2vpnsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_bulk_update", + Method: "PUT", + PathPattern: "/ipam/l2vpns/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsBulkUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsCreate ipam l2vpns create API +*/ +func (a *Client) IpamL2vpnsCreate(params *IpamL2vpnsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_create", + Method: "POST", + PathPattern: "/ipam/l2vpns/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsDelete ipam l2vpns delete API +*/ +func (a *Client) IpamL2vpnsDelete(params *IpamL2vpnsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_delete", + Method: "DELETE", + PathPattern: "/ipam/l2vpns/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsList ipam l2vpns list API +*/ +func (a *Client) IpamL2vpnsList(params *IpamL2vpnsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_list", + Method: "GET", + PathPattern: "/ipam/l2vpns/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsPartialUpdate ipam l2vpns partial update API +*/ +func (a *Client) IpamL2vpnsPartialUpdate(params *IpamL2vpnsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_partial_update", + Method: "PATCH", + PathPattern: "/ipam/l2vpns/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsPartialUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsRead ipam l2vpns read API +*/ +func (a *Client) IpamL2vpnsRead(params *IpamL2vpnsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_read", + Method: "GET", + PathPattern: "/ipam/l2vpns/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsReadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +IpamL2vpnsUpdate ipam l2vpns update API +*/ +func (a *Client) IpamL2vpnsUpdate(params *IpamL2vpnsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamL2vpnsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamL2vpnsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_l2vpns_update", + Method: "PUT", + PathPattern: "/ipam/l2vpns/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IpamL2vpnsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamL2vpnsUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ipam_l2vpns_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* IpamPrefixesAvailableIpsCreate ipam prefixes available ips create API */ @@ -2870,7 +3608,7 @@ func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo r } /* -IpamPrefixesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamPrefixesList ipam prefixes list API */ func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesListOK, error) { // TODO: Validate the params before sending @@ -3221,7 +3959,7 @@ func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.C } /* -IpamRirsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamRirsList ipam rirs list API */ func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsListOK, error) { // TODO: Validate the params before sending @@ -3572,7 +4310,7 @@ func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime } /* -IpamRolesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamRolesList ipam roles list API */ func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesListOK, error) { // TODO: Validate the params before sending @@ -3923,7 +4661,7 @@ func (a *Client) IpamRouteTargetsDelete(params *IpamRouteTargetsDeleteParams, au } /* -IpamRouteTargetsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamRouteTargetsList ipam route targets list API */ func (a *Client) IpamRouteTargetsList(params *IpamRouteTargetsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsListOK, error) { // TODO: Validate the params before sending @@ -4274,7 +5012,7 @@ func (a *Client) IpamServiceTemplatesDelete(params *IpamServiceTemplatesDeletePa } /* -IpamServiceTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamServiceTemplatesList ipam service templates list API */ func (a *Client) IpamServiceTemplatesList(params *IpamServiceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesListOK, error) { // TODO: Validate the params before sending @@ -4625,7 +5363,7 @@ func (a *Client) IpamServicesDelete(params *IpamServicesDeleteParams, authInfo r } /* -IpamServicesList Overrides ListModelMixin to allow processing ExportTemplates. +IpamServicesList ipam services list API */ func (a *Client) IpamServicesList(params *IpamServicesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServicesListOK, error) { // TODO: Validate the params before sending @@ -5054,7 +5792,7 @@ func (a *Client) IpamVlanGroupsDelete(params *IpamVlanGroupsDeleteParams, authIn } /* -IpamVlanGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamVlanGroupsList ipam vlan groups list API */ func (a *Client) IpamVlanGroupsList(params *IpamVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsListOK, error) { // TODO: Validate the params before sending @@ -5405,7 +6143,7 @@ func (a *Client) IpamVlansDelete(params *IpamVlansDeleteParams, authInfo runtime } /* -IpamVlansList Overrides ListModelMixin to allow processing ExportTemplates. +IpamVlansList ipam vlans list API */ func (a *Client) IpamVlansList(params *IpamVlansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlansListOK, error) { // TODO: Validate the params before sending @@ -5756,7 +6494,7 @@ func (a *Client) IpamVrfsDelete(params *IpamVrfsDeleteParams, authInfo runtime.C } /* -IpamVrfsList Overrides ListModelMixin to allow processing ExportTemplates. +IpamVrfsList ipam vrfs list API */ func (a *Client) IpamVrfsList(params *IpamVrfsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVrfsListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go index 4b7f27435..4b977f74b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go @@ -80,12 +80,21 @@ type IpamFhrpGroupAssignmentsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Device. Device *string @@ -143,12 +152,21 @@ type IpamFhrpGroupAssignmentsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -161,6 +179,12 @@ type IpamFhrpGroupAssignmentsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Priority. Priority *string @@ -249,6 +273,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedGt(createdGt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedGte(createdGte *string) *IpamFhrpGroupAssignmentsListParams { o.SetCreatedGte(createdGte) @@ -260,6 +295,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedLt(createdLt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedLte(createdLte *string) *IpamFhrpGroupAssignmentsListParams { o.SetCreatedLte(createdLte) @@ -271,6 +317,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedn(createdn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDevice adds the device to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithDevice(device *string) *IpamFhrpGroupAssignmentsListParams { o.SetDevice(device) @@ -480,6 +537,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdated(lastUpdated *string) o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamFhrpGroupAssignmentsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -491,6 +559,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedGte(lastUpdatedGte *s o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamFhrpGroupAssignmentsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -502,6 +581,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedLte(lastUpdatedLte *s o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithLimit(limit *int64) *IpamFhrpGroupAssignmentsListParams { o.SetLimit(limit) @@ -524,6 +614,17 @@ func (o *IpamFhrpGroupAssignmentsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithOrdering(ordering *string) *IpamFhrpGroupAssignmentsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPriority adds the priority to the ipam fhrp group assignments list params func (o *IpamFhrpGroupAssignmentsListParams) WithPriority(priority *string) *IpamFhrpGroupAssignmentsListParams { o.SetPriority(priority) @@ -637,6 +738,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -654,6 +772,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -671,6 +806,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Device != nil { // query param device @@ -994,6 +1146,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1011,6 +1180,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1028,6 +1214,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1062,6 +1265,23 @@ func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Priority != nil { // query param priority diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go index c18687f64..0e1c23518 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go @@ -116,12 +116,21 @@ type IpamFhrpGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // GroupID. GroupID *string @@ -161,12 +170,21 @@ type IpamFhrpGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -179,6 +197,12 @@ type IpamFhrpGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Protocol. Protocol *string @@ -393,6 +417,17 @@ func (o *IpamFhrpGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreatedGt(createdGt *string) *IpamFhrpGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithCreatedGte(createdGte *string) *IpamFhrpGroupsListParams { o.SetCreatedGte(createdGte) @@ -404,6 +439,17 @@ func (o *IpamFhrpGroupsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreatedLt(createdLt *string) *IpamFhrpGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithCreatedLte(createdLte *string) *IpamFhrpGroupsListParams { o.SetCreatedLte(createdLte) @@ -415,6 +461,17 @@ func (o *IpamFhrpGroupsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreatedn(createdn *string) *IpamFhrpGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithGroupID adds the groupID to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithGroupID(groupID *string) *IpamFhrpGroupsListParams { o.SetGroupID(groupID) @@ -558,6 +615,17 @@ func (o *IpamFhrpGroupsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamFhrpGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamFhrpGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -569,6 +637,17 @@ func (o *IpamFhrpGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamFhrpGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamFhrpGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -580,6 +659,17 @@ func (o *IpamFhrpGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamFhrpGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithLimit(limit *int64) *IpamFhrpGroupsListParams { o.SetLimit(limit) @@ -602,6 +692,17 @@ func (o *IpamFhrpGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithOrdering(ordering *string) *IpamFhrpGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithProtocol adds the protocol to the ipam fhrp groups list params func (o *IpamFhrpGroupsListParams) WithProtocol(protocol *string) *IpamFhrpGroupsListParams { o.SetProtocol(protocol) @@ -897,6 +998,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -914,6 +1032,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -931,6 +1066,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.GroupID != nil { // query param group_id @@ -1152,6 +1304,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1169,6 +1338,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1186,6 +1372,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1220,6 +1423,23 @@ func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Protocol != nil { // query param protocol diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_addresses_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_addresses_list_parameters.go index 198a7125a..439f731d2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_addresses_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_addresses_list_parameters.go @@ -86,12 +86,21 @@ type IpamIPAddressesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -200,12 +209,21 @@ type IpamIPAddressesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -221,6 +239,12 @@ type IpamIPAddressesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -391,6 +415,17 @@ func (o *IpamIPAddressesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreatedGt(createdGt *string) *IpamIPAddressesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithCreatedGte(createdGte *string) *IpamIPAddressesListParams { o.SetCreatedGte(createdGte) @@ -402,6 +437,17 @@ func (o *IpamIPAddressesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreatedLt(createdLt *string) *IpamIPAddressesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithCreatedLte(createdLte *string) *IpamIPAddressesListParams { o.SetCreatedLte(createdLte) @@ -413,6 +459,17 @@ func (o *IpamIPAddressesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithCreatedn(createdn *string) *IpamIPAddressesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithDescription(description *string) *IpamIPAddressesListParams { o.SetDescription(description) @@ -809,6 +866,17 @@ func (o *IpamIPAddressesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamIPAddressesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamIPAddressesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -820,6 +888,17 @@ func (o *IpamIPAddressesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamIPAddressesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamIPAddressesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -831,6 +910,17 @@ func (o *IpamIPAddressesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamIPAddressesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithLimit(limit *int64) *IpamIPAddressesListParams { o.SetLimit(limit) @@ -864,6 +954,17 @@ func (o *IpamIPAddressesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithOrdering(ordering *string) *IpamIPAddressesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithParent(parent *string) *IpamIPAddressesListParams { o.SetParent(parent) @@ -1231,6 +1332,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1248,6 +1366,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1265,6 +1400,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1877,6 +2029,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1894,6 +2063,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1911,6 +2097,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1962,6 +2165,23 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_ranges_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_ranges_list_parameters.go index cf346317d..5a016d836 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_ranges_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_ip_ranges_list_parameters.go @@ -83,12 +83,21 @@ type IpamIPRangesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -143,12 +152,21 @@ type IpamIPRangesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -161,6 +179,12 @@ type IpamIPRangesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -299,6 +323,17 @@ func (o *IpamIPRangesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreatedGt(createdGt *string) *IpamIPRangesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithCreatedGte(createdGte *string) *IpamIPRangesListParams { o.SetCreatedGte(createdGte) @@ -310,6 +345,17 @@ func (o *IpamIPRangesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreatedLt(createdLt *string) *IpamIPRangesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithCreatedLte(createdLte *string) *IpamIPRangesListParams { o.SetCreatedLte(createdLte) @@ -321,6 +367,17 @@ func (o *IpamIPRangesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithCreatedn(createdn *string) *IpamIPRangesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithDescription(description *string) *IpamIPRangesListParams { o.SetDescription(description) @@ -519,6 +576,17 @@ func (o *IpamIPRangesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamIPRangesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamIPRangesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -530,6 +598,17 @@ func (o *IpamIPRangesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamIPRangesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamIPRangesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -541,6 +620,17 @@ func (o *IpamIPRangesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamIPRangesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithLimit(limit *int64) *IpamIPRangesListParams { o.SetLimit(limit) @@ -563,6 +653,17 @@ func (o *IpamIPRangesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithOrdering(ordering *string) *IpamIPRangesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithQ(q *string) *IpamIPRangesListParams { o.SetQ(q) @@ -836,6 +937,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -853,6 +971,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -870,6 +1005,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1176,6 +1328,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1193,6 +1362,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1210,6 +1396,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1244,6 +1447,23 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_parameters.go new file mode 100644 index 000000000..175930406 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_parameters.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewIpamL2vpnTerminationsBulkDeleteParams creates a new IpamL2vpnTerminationsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsBulkDeleteParams() *IpamL2vpnTerminationsBulkDeleteParams { + return &IpamL2vpnTerminationsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsBulkDeleteParamsWithTimeout creates a new IpamL2vpnTerminationsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkDeleteParams { + return &IpamL2vpnTerminationsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsBulkDeleteParamsWithContext creates a new IpamL2vpnTerminationsBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsBulkDeleteParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsBulkDeleteParams { + return &IpamL2vpnTerminationsBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsBulkDeleteParamsWithHTTPClient creates a new IpamL2vpnTerminationsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkDeleteParams { + return &IpamL2vpnTerminationsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsBulkDeleteParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkDeleteParams) WithDefaults() *IpamL2vpnTerminationsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk delete params +func (o *IpamL2vpnTerminationsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsBulkDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_responses.go new file mode 100644 index 000000000..1bc5adf7a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamL2vpnTerminationsBulkDeleteReader is a Reader for the IpamL2vpnTerminationsBulkDelete structure. +type IpamL2vpnTerminationsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamL2vpnTerminationsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsBulkDeleteNoContent creates a IpamL2vpnTerminationsBulkDeleteNoContent with default headers values +func NewIpamL2vpnTerminationsBulkDeleteNoContent() *IpamL2vpnTerminationsBulkDeleteNoContent { + return &IpamL2vpnTerminationsBulkDeleteNoContent{} +} + +/* +IpamL2vpnTerminationsBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamL2vpnTerminationsBulkDeleteNoContent ipam l2vpn terminations bulk delete no content +*/ +type IpamL2vpnTerminationsBulkDeleteNoContent struct { +} + +// IsSuccess returns true when this ipam l2vpn terminations bulk delete no content response has a 2xx status code +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations bulk delete no content response has a 3xx status code +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations bulk delete no content response has a 4xx status code +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations bulk delete no content response has a 5xx status code +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations bulk delete no content response a status code equal to that given +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkDeleteNoContent ", 204) +} + +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkDeleteNoContent ", 204) +} + +func (o *IpamL2vpnTerminationsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_parameters.go new file mode 100644 index 000000000..958454f28 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnTerminationsBulkPartialUpdateParams creates a new IpamL2vpnTerminationsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsBulkPartialUpdateParams() *IpamL2vpnTerminationsBulkPartialUpdateParams { + return &IpamL2vpnTerminationsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithTimeout creates a new IpamL2vpnTerminationsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkPartialUpdateParams { + return &IpamL2vpnTerminationsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithContext creates a new IpamL2vpnTerminationsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsBulkPartialUpdateParams { + return &IpamL2vpnTerminationsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithHTTPClient creates a new IpamL2vpnTerminationsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkPartialUpdateParams { + return &IpamL2vpnTerminationsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableL2VPNTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WithDefaults() *IpamL2vpnTerminationsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WithData(data *models.WritableL2VPNTermination) *IpamL2vpnTerminationsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpn terminations bulk partial update params +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) SetData(data *models.WritableL2VPNTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_responses.go new file mode 100644 index 000000000..a3b92b83d --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsBulkPartialUpdateReader is a Reader for the IpamL2vpnTerminationsBulkPartialUpdate structure. +type IpamL2vpnTerminationsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsBulkPartialUpdateOK creates a IpamL2vpnTerminationsBulkPartialUpdateOK with default headers values +func NewIpamL2vpnTerminationsBulkPartialUpdateOK() *IpamL2vpnTerminationsBulkPartialUpdateOK { + return &IpamL2vpnTerminationsBulkPartialUpdateOK{} +} + +/* +IpamL2vpnTerminationsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsBulkPartialUpdateOK ipam l2vpn terminations bulk partial update o k +*/ +type IpamL2vpnTerminationsBulkPartialUpdateOK struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations bulk partial update o k response has a 2xx status code +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations bulk partial update o k response has a 3xx status code +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations bulk partial update o k response has a 4xx status code +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations bulk partial update o k response has a 5xx status code +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations bulk partial update o k response a status code equal to that given +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_parameters.go new file mode 100644 index 000000000..5a3003875 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnTerminationsBulkUpdateParams creates a new IpamL2vpnTerminationsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsBulkUpdateParams() *IpamL2vpnTerminationsBulkUpdateParams { + return &IpamL2vpnTerminationsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsBulkUpdateParamsWithTimeout creates a new IpamL2vpnTerminationsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkUpdateParams { + return &IpamL2vpnTerminationsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsBulkUpdateParamsWithContext creates a new IpamL2vpnTerminationsBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsBulkUpdateParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsBulkUpdateParams { + return &IpamL2vpnTerminationsBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsBulkUpdateParamsWithHTTPClient creates a new IpamL2vpnTerminationsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkUpdateParams { + return &IpamL2vpnTerminationsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsBulkUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsBulkUpdateParams struct { + + // Data. + Data *models.WritableL2VPNTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkUpdateParams) WithDefaults() *IpamL2vpnTerminationsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) WithData(data *models.WritableL2VPNTermination) *IpamL2vpnTerminationsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpn terminations bulk update params +func (o *IpamL2vpnTerminationsBulkUpdateParams) SetData(data *models.WritableL2VPNTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_responses.go new file mode 100644 index 000000000..bc6cbfb1e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_bulk_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsBulkUpdateReader is a Reader for the IpamL2vpnTerminationsBulkUpdate structure. +type IpamL2vpnTerminationsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsBulkUpdateOK creates a IpamL2vpnTerminationsBulkUpdateOK with default headers values +func NewIpamL2vpnTerminationsBulkUpdateOK() *IpamL2vpnTerminationsBulkUpdateOK { + return &IpamL2vpnTerminationsBulkUpdateOK{} +} + +/* +IpamL2vpnTerminationsBulkUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsBulkUpdateOK ipam l2vpn terminations bulk update o k +*/ +type IpamL2vpnTerminationsBulkUpdateOK struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations bulk update o k response has a 2xx status code +func (o *IpamL2vpnTerminationsBulkUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations bulk update o k response has a 3xx status code +func (o *IpamL2vpnTerminationsBulkUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations bulk update o k response has a 4xx status code +func (o *IpamL2vpnTerminationsBulkUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations bulk update o k response has a 5xx status code +func (o *IpamL2vpnTerminationsBulkUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations bulk update o k response a status code equal to that given +func (o *IpamL2vpnTerminationsBulkUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsBulkUpdateOK) String() string { + return fmt.Sprintf("[PUT /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsBulkUpdateOK) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_parameters.go new file mode 100644 index 000000000..5d9dab2f9 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnTerminationsCreateParams creates a new IpamL2vpnTerminationsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsCreateParams() *IpamL2vpnTerminationsCreateParams { + return &IpamL2vpnTerminationsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsCreateParamsWithTimeout creates a new IpamL2vpnTerminationsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsCreateParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsCreateParams { + return &IpamL2vpnTerminationsCreateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsCreateParamsWithContext creates a new IpamL2vpnTerminationsCreateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsCreateParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsCreateParams { + return &IpamL2vpnTerminationsCreateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsCreateParamsWithHTTPClient creates a new IpamL2vpnTerminationsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsCreateParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsCreateParams { + return &IpamL2vpnTerminationsCreateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsCreateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations create operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsCreateParams struct { + + // Data. + Data *models.WritableL2VPNTermination + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsCreateParams) WithDefaults() *IpamL2vpnTerminationsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) WithData(data *models.WritableL2VPNTermination) *IpamL2vpnTerminationsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpn terminations create params +func (o *IpamL2vpnTerminationsCreateParams) SetData(data *models.WritableL2VPNTermination) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_responses.go new file mode 100644 index 000000000..d40e1b9b6 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_create_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsCreateReader is a Reader for the IpamL2vpnTerminationsCreate structure. +type IpamL2vpnTerminationsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamL2vpnTerminationsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsCreateCreated creates a IpamL2vpnTerminationsCreateCreated with default headers values +func NewIpamL2vpnTerminationsCreateCreated() *IpamL2vpnTerminationsCreateCreated { + return &IpamL2vpnTerminationsCreateCreated{} +} + +/* +IpamL2vpnTerminationsCreateCreated describes a response with status code 201, with default header values. + +IpamL2vpnTerminationsCreateCreated ipam l2vpn terminations create created +*/ +type IpamL2vpnTerminationsCreateCreated struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations create created response has a 2xx status code +func (o *IpamL2vpnTerminationsCreateCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations create created response has a 3xx status code +func (o *IpamL2vpnTerminationsCreateCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations create created response has a 4xx status code +func (o *IpamL2vpnTerminationsCreateCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations create created response has a 5xx status code +func (o *IpamL2vpnTerminationsCreateCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations create created response a status code equal to that given +func (o *IpamL2vpnTerminationsCreateCreated) IsCode(code int) bool { + return code == 201 +} + +func (o *IpamL2vpnTerminationsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsCreateCreated %+v", 201, o.Payload) +} + +func (o *IpamL2vpnTerminationsCreateCreated) String() string { + return fmt.Sprintf("[POST /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsCreateCreated %+v", 201, o.Payload) +} + +func (o *IpamL2vpnTerminationsCreateCreated) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_parameters.go new file mode 100644 index 000000000..71e2a68e1 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnTerminationsDeleteParams creates a new IpamL2vpnTerminationsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsDeleteParams() *IpamL2vpnTerminationsDeleteParams { + return &IpamL2vpnTerminationsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsDeleteParamsWithTimeout creates a new IpamL2vpnTerminationsDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsDeleteParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsDeleteParams { + return &IpamL2vpnTerminationsDeleteParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsDeleteParamsWithContext creates a new IpamL2vpnTerminationsDeleteParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsDeleteParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsDeleteParams { + return &IpamL2vpnTerminationsDeleteParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsDeleteParamsWithHTTPClient creates a new IpamL2vpnTerminationsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsDeleteParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsDeleteParams { + return &IpamL2vpnTerminationsDeleteParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsDeleteParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations delete operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsDeleteParams struct { + + /* ID. + + A unique integer value identifying this L2VPN termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsDeleteParams) WithDefaults() *IpamL2vpnTerminationsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) WithID(id int64) *IpamL2vpnTerminationsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpn terminations delete params +func (o *IpamL2vpnTerminationsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_responses.go new file mode 100644 index 000000000..6872ac463 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamL2vpnTerminationsDeleteReader is a Reader for the IpamL2vpnTerminationsDelete structure. +type IpamL2vpnTerminationsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamL2vpnTerminationsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsDeleteNoContent creates a IpamL2vpnTerminationsDeleteNoContent with default headers values +func NewIpamL2vpnTerminationsDeleteNoContent() *IpamL2vpnTerminationsDeleteNoContent { + return &IpamL2vpnTerminationsDeleteNoContent{} +} + +/* +IpamL2vpnTerminationsDeleteNoContent describes a response with status code 204, with default header values. + +IpamL2vpnTerminationsDeleteNoContent ipam l2vpn terminations delete no content +*/ +type IpamL2vpnTerminationsDeleteNoContent struct { +} + +// IsSuccess returns true when this ipam l2vpn terminations delete no content response has a 2xx status code +func (o *IpamL2vpnTerminationsDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations delete no content response has a 3xx status code +func (o *IpamL2vpnTerminationsDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations delete no content response has a 4xx status code +func (o *IpamL2vpnTerminationsDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations delete no content response has a 5xx status code +func (o *IpamL2vpnTerminationsDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations delete no content response a status code equal to that given +func (o *IpamL2vpnTerminationsDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *IpamL2vpnTerminationsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsDeleteNoContent ", 204) +} + +func (o *IpamL2vpnTerminationsDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsDeleteNoContent ", 204) +} + +func (o *IpamL2vpnTerminationsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_parameters.go new file mode 100644 index 000000000..ed9e6054a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_parameters.go @@ -0,0 +1,2076 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnTerminationsListParams creates a new IpamL2vpnTerminationsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsListParams() *IpamL2vpnTerminationsListParams { + return &IpamL2vpnTerminationsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsListParamsWithTimeout creates a new IpamL2vpnTerminationsListParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsListParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsListParams { + return &IpamL2vpnTerminationsListParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsListParamsWithContext creates a new IpamL2vpnTerminationsListParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsListParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsListParams { + return &IpamL2vpnTerminationsListParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsListParamsWithHTTPClient creates a new IpamL2vpnTerminationsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsListParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsListParams { + return &IpamL2vpnTerminationsListParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsListParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations list operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsListParams struct { + + // AssignedObjectType. + AssignedObjectType *string + + // AssignedObjectTypen. + AssignedObjectTypen *string + + // AssignedObjectTypeID. + AssignedObjectTypeID *string + + // AssignedObjectTypeIDn. + AssignedObjectTypeIDn *string + + // Created. + Created *string + + // CreatedGt. + CreatedGt *string + + // CreatedGte. + CreatedGte *string + + // CreatedLt. + CreatedLt *string + + // CreatedLte. + CreatedLte *string + + // Createdn. + Createdn *string + + // Device. + Device *string + + // Devicen. + Devicen *string + + // DeviceID. + DeviceID *string + + // DeviceIDn. + DeviceIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Interface. + Interface *string + + // Interfacen. + Interfacen *string + + // InterfaceID. + InterfaceID *string + + // InterfaceIDn. + InterfaceIDn *string + + // L2vpn. + L2vpn *string + + // L2vpnn. + L2vpnn *string + + // L2vpnID. + L2vpnID *string + + // L2vpnIDn. + L2vpnIDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGt. + LastUpdatedGt *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLt. + LastUpdatedLt *string + + // LastUpdatedLte. + LastUpdatedLte *string + + // LastUpdatedn. + LastUpdatedn *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + + // Q. + Q *string + + // Region. + Region *string + + // RegionID. + RegionID *string + + // Site. + Site *string + + // SiteID. + SiteID *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // VirtualMachine. + VirtualMachine *string + + // VirtualMachinen. + VirtualMachinen *string + + // VirtualMachineID. + VirtualMachineID *string + + // VirtualMachineIDn. + VirtualMachineIDn *string + + // Vlan. + Vlan *string + + // Vlann. + Vlann *string + + // VlanID. + VlanID *string + + // VlanIDn. + VlanIDn *string + + // VlanVid. + VlanVid *float64 + + // VlanVidGt. + VlanVidGt *float64 + + // VlanVidGte. + VlanVidGte *float64 + + // VlanVidLt. + VlanVidLt *float64 + + // VlanVidLte. + VlanVidLte *float64 + + // VlanVidn. + VlanVidn *float64 + + // Vminterface. + Vminterface *string + + // Vminterfacen. + Vminterfacen *string + + // VminterfaceID. + VminterfaceID *string + + // VminterfaceIDn. + VminterfaceIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsListParams) WithDefaults() *IpamL2vpnTerminationsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAssignedObjectType adds the assignedObjectType to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithAssignedObjectType(assignedObjectType *string) *IpamL2vpnTerminationsListParams { + o.SetAssignedObjectType(assignedObjectType) + return o +} + +// SetAssignedObjectType adds the assignedObjectType to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetAssignedObjectType(assignedObjectType *string) { + o.AssignedObjectType = assignedObjectType +} + +// WithAssignedObjectTypen adds the assignedObjectTypen to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithAssignedObjectTypen(assignedObjectTypen *string) *IpamL2vpnTerminationsListParams { + o.SetAssignedObjectTypen(assignedObjectTypen) + return o +} + +// SetAssignedObjectTypen adds the assignedObjectTypeN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetAssignedObjectTypen(assignedObjectTypen *string) { + o.AssignedObjectTypen = assignedObjectTypen +} + +// WithAssignedObjectTypeID adds the assignedObjectTypeID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithAssignedObjectTypeID(assignedObjectTypeID *string) *IpamL2vpnTerminationsListParams { + o.SetAssignedObjectTypeID(assignedObjectTypeID) + return o +} + +// SetAssignedObjectTypeID adds the assignedObjectTypeId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetAssignedObjectTypeID(assignedObjectTypeID *string) { + o.AssignedObjectTypeID = assignedObjectTypeID +} + +// WithAssignedObjectTypeIDn adds the assignedObjectTypeIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithAssignedObjectTypeIDn(assignedObjectTypeIDn *string) *IpamL2vpnTerminationsListParams { + o.SetAssignedObjectTypeIDn(assignedObjectTypeIDn) + return o +} + +// SetAssignedObjectTypeIDn adds the assignedObjectTypeIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetAssignedObjectTypeIDn(assignedObjectTypeIDn *string) { + o.AssignedObjectTypeIDn = assignedObjectTypeIDn +} + +// WithCreated adds the created to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreated(created *string) *IpamL2vpnTerminationsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGt adds the createdGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreatedGt(createdGt *string) *IpamL2vpnTerminationsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + +// WithCreatedGte adds the createdGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreatedGte(createdGte *string) *IpamL2vpnTerminationsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLt adds the createdLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreatedLt(createdLt *string) *IpamL2vpnTerminationsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + +// WithCreatedLte adds the createdLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreatedLte(createdLte *string) *IpamL2vpnTerminationsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithCreatedn adds the createdn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithCreatedn(createdn *string) *IpamL2vpnTerminationsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + +// WithDevice adds the device to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithDevice(device *string) *IpamL2vpnTerminationsListParams { + o.SetDevice(device) + return o +} + +// SetDevice adds the device to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetDevice(device *string) { + o.Device = device +} + +// WithDevicen adds the devicen to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithDevicen(devicen *string) *IpamL2vpnTerminationsListParams { + o.SetDevicen(devicen) + return o +} + +// SetDevicen adds the deviceN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetDevicen(devicen *string) { + o.Devicen = devicen +} + +// WithDeviceID adds the deviceID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithDeviceID(deviceID *string) *IpamL2vpnTerminationsListParams { + o.SetDeviceID(deviceID) + return o +} + +// SetDeviceID adds the deviceId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetDeviceID(deviceID *string) { + o.DeviceID = deviceID +} + +// WithDeviceIDn adds the deviceIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithDeviceIDn(deviceIDn *string) *IpamL2vpnTerminationsListParams { + o.SetDeviceIDn(deviceIDn) + return o +} + +// SetDeviceIDn adds the deviceIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetDeviceIDn(deviceIDn *string) { + o.DeviceIDn = deviceIDn +} + +// WithID adds the id to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithID(id *string) *IpamL2vpnTerminationsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithIDGt(iDGt *string) *IpamL2vpnTerminationsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithIDGte(iDGte *string) *IpamL2vpnTerminationsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithIDLt(iDLt *string) *IpamL2vpnTerminationsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithIDLte(iDLte *string) *IpamL2vpnTerminationsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithIDn(iDn *string) *IpamL2vpnTerminationsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithInterface adds the interfaceVar to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithInterface(interfaceVar *string) *IpamL2vpnTerminationsListParams { + o.SetInterface(interfaceVar) + return o +} + +// SetInterface adds the interface to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetInterface(interfaceVar *string) { + o.Interface = interfaceVar +} + +// WithInterfacen adds the interfacen to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithInterfacen(interfacen *string) *IpamL2vpnTerminationsListParams { + o.SetInterfacen(interfacen) + return o +} + +// SetInterfacen adds the interfaceN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetInterfacen(interfacen *string) { + o.Interfacen = interfacen +} + +// WithInterfaceID adds the interfaceID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithInterfaceID(interfaceID *string) *IpamL2vpnTerminationsListParams { + o.SetInterfaceID(interfaceID) + return o +} + +// SetInterfaceID adds the interfaceId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetInterfaceID(interfaceID *string) { + o.InterfaceID = interfaceID +} + +// WithInterfaceIDn adds the interfaceIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithInterfaceIDn(interfaceIDn *string) *IpamL2vpnTerminationsListParams { + o.SetInterfaceIDn(interfaceIDn) + return o +} + +// SetInterfaceIDn adds the interfaceIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetInterfaceIDn(interfaceIDn *string) { + o.InterfaceIDn = interfaceIDn +} + +// WithL2vpn adds the l2vpn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithL2vpn(l2vpn *string) *IpamL2vpnTerminationsListParams { + o.SetL2vpn(l2vpn) + return o +} + +// SetL2vpn adds the l2vpn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetL2vpn(l2vpn *string) { + o.L2vpn = l2vpn +} + +// WithL2vpnn adds the l2vpnn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithL2vpnn(l2vpnn *string) *IpamL2vpnTerminationsListParams { + o.SetL2vpnn(l2vpnn) + return o +} + +// SetL2vpnn adds the l2vpnN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetL2vpnn(l2vpnn *string) { + o.L2vpnn = l2vpnn +} + +// WithL2vpnID adds the l2vpnID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithL2vpnID(l2vpnID *string) *IpamL2vpnTerminationsListParams { + o.SetL2vpnID(l2vpnID) + return o +} + +// SetL2vpnID adds the l2vpnId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetL2vpnID(l2vpnID *string) { + o.L2vpnID = l2vpnID +} + +// WithL2vpnIDn adds the l2vpnIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithL2vpnIDn(l2vpnIDn *string) *IpamL2vpnTerminationsListParams { + o.SetL2vpnIDn(l2vpnIDn) + return o +} + +// SetL2vpnIDn adds the l2vpnIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetL2vpnIDn(l2vpnIDn *string) { + o.L2vpnIDn = l2vpnIDn +} + +// WithLastUpdated adds the lastUpdated to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdated(lastUpdated *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLastUpdatedn adds the lastUpdatedn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamL2vpnTerminationsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + +// WithLimit adds the limit to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithLimit(limit *int64) *IpamL2vpnTerminationsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithOffset(offset *int64) *IpamL2vpnTerminationsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrdering adds the ordering to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithOrdering(ordering *string) *IpamL2vpnTerminationsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + +// WithQ adds the q to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithQ(q *string) *IpamL2vpnTerminationsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetQ(q *string) { + o.Q = q +} + +// WithRegion adds the region to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithRegion(region *string) *IpamL2vpnTerminationsListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionID adds the regionID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithRegionID(regionID *string) *IpamL2vpnTerminationsListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithSite adds the site to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithSite(site *string) *IpamL2vpnTerminationsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiteID adds the siteID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithSiteID(siteID *string) *IpamL2vpnTerminationsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + +// WithTag adds the tag to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithTag(tag *string) *IpamL2vpnTerminationsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithTagn(tagn *string) *IpamL2vpnTerminationsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithVirtualMachine adds the virtualMachine to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVirtualMachine(virtualMachine *string) *IpamL2vpnTerminationsListParams { + o.SetVirtualMachine(virtualMachine) + return o +} + +// SetVirtualMachine adds the virtualMachine to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVirtualMachine(virtualMachine *string) { + o.VirtualMachine = virtualMachine +} + +// WithVirtualMachinen adds the virtualMachinen to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVirtualMachinen(virtualMachinen *string) *IpamL2vpnTerminationsListParams { + o.SetVirtualMachinen(virtualMachinen) + return o +} + +// SetVirtualMachinen adds the virtualMachineN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVirtualMachinen(virtualMachinen *string) { + o.VirtualMachinen = virtualMachinen +} + +// WithVirtualMachineID adds the virtualMachineID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVirtualMachineID(virtualMachineID *string) *IpamL2vpnTerminationsListParams { + o.SetVirtualMachineID(virtualMachineID) + return o +} + +// SetVirtualMachineID adds the virtualMachineId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVirtualMachineID(virtualMachineID *string) { + o.VirtualMachineID = virtualMachineID +} + +// WithVirtualMachineIDn adds the virtualMachineIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVirtualMachineIDn(virtualMachineIDn *string) *IpamL2vpnTerminationsListParams { + o.SetVirtualMachineIDn(virtualMachineIDn) + return o +} + +// SetVirtualMachineIDn adds the virtualMachineIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVirtualMachineIDn(virtualMachineIDn *string) { + o.VirtualMachineIDn = virtualMachineIDn +} + +// WithVlan adds the vlan to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlan(vlan *string) *IpamL2vpnTerminationsListParams { + o.SetVlan(vlan) + return o +} + +// SetVlan adds the vlan to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlan(vlan *string) { + o.Vlan = vlan +} + +// WithVlann adds the vlann to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlann(vlann *string) *IpamL2vpnTerminationsListParams { + o.SetVlann(vlann) + return o +} + +// SetVlann adds the vlanN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlann(vlann *string) { + o.Vlann = vlann +} + +// WithVlanID adds the vlanID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanID(vlanID *string) *IpamL2vpnTerminationsListParams { + o.SetVlanID(vlanID) + return o +} + +// SetVlanID adds the vlanId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanID(vlanID *string) { + o.VlanID = vlanID +} + +// WithVlanIDn adds the vlanIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanIDn(vlanIDn *string) *IpamL2vpnTerminationsListParams { + o.SetVlanIDn(vlanIDn) + return o +} + +// SetVlanIDn adds the vlanIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanIDn(vlanIDn *string) { + o.VlanIDn = vlanIDn +} + +// WithVlanVid adds the vlanVid to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVid(vlanVid *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVid(vlanVid) + return o +} + +// SetVlanVid adds the vlanVid to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVid(vlanVid *float64) { + o.VlanVid = vlanVid +} + +// WithVlanVidGt adds the vlanVidGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVidGt(vlanVidGt *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVidGt(vlanVidGt) + return o +} + +// SetVlanVidGt adds the vlanVidGt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVidGt(vlanVidGt *float64) { + o.VlanVidGt = vlanVidGt +} + +// WithVlanVidGte adds the vlanVidGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVidGte(vlanVidGte *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVidGte(vlanVidGte) + return o +} + +// SetVlanVidGte adds the vlanVidGte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVidGte(vlanVidGte *float64) { + o.VlanVidGte = vlanVidGte +} + +// WithVlanVidLt adds the vlanVidLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVidLt(vlanVidLt *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVidLt(vlanVidLt) + return o +} + +// SetVlanVidLt adds the vlanVidLt to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVidLt(vlanVidLt *float64) { + o.VlanVidLt = vlanVidLt +} + +// WithVlanVidLte adds the vlanVidLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVidLte(vlanVidLte *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVidLte(vlanVidLte) + return o +} + +// SetVlanVidLte adds the vlanVidLte to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVidLte(vlanVidLte *float64) { + o.VlanVidLte = vlanVidLte +} + +// WithVlanVidn adds the vlanVidn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVlanVidn(vlanVidn *float64) *IpamL2vpnTerminationsListParams { + o.SetVlanVidn(vlanVidn) + return o +} + +// SetVlanVidn adds the vlanVidN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVlanVidn(vlanVidn *float64) { + o.VlanVidn = vlanVidn +} + +// WithVminterface adds the vminterface to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVminterface(vminterface *string) *IpamL2vpnTerminationsListParams { + o.SetVminterface(vminterface) + return o +} + +// SetVminterface adds the vminterface to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVminterface(vminterface *string) { + o.Vminterface = vminterface +} + +// WithVminterfacen adds the vminterfacen to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVminterfacen(vminterfacen *string) *IpamL2vpnTerminationsListParams { + o.SetVminterfacen(vminterfacen) + return o +} + +// SetVminterfacen adds the vminterfaceN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVminterfacen(vminterfacen *string) { + o.Vminterfacen = vminterfacen +} + +// WithVminterfaceID adds the vminterfaceID to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVminterfaceID(vminterfaceID *string) *IpamL2vpnTerminationsListParams { + o.SetVminterfaceID(vminterfaceID) + return o +} + +// SetVminterfaceID adds the vminterfaceId to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVminterfaceID(vminterfaceID *string) { + o.VminterfaceID = vminterfaceID +} + +// WithVminterfaceIDn adds the vminterfaceIDn to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) WithVminterfaceIDn(vminterfaceIDn *string) *IpamL2vpnTerminationsListParams { + o.SetVminterfaceIDn(vminterfaceIDn) + return o +} + +// SetVminterfaceIDn adds the vminterfaceIdN to the ipam l2vpn terminations list params +func (o *IpamL2vpnTerminationsListParams) SetVminterfaceIDn(vminterfaceIDn *string) { + o.VminterfaceIDn = vminterfaceIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AssignedObjectType != nil { + + // query param assigned_object_type + var qrAssignedObjectType string + + if o.AssignedObjectType != nil { + qrAssignedObjectType = *o.AssignedObjectType + } + qAssignedObjectType := qrAssignedObjectType + if qAssignedObjectType != "" { + + if err := r.SetQueryParam("assigned_object_type", qAssignedObjectType); err != nil { + return err + } + } + } + + if o.AssignedObjectTypen != nil { + + // query param assigned_object_type__n + var qrAssignedObjectTypen string + + if o.AssignedObjectTypen != nil { + qrAssignedObjectTypen = *o.AssignedObjectTypen + } + qAssignedObjectTypen := qrAssignedObjectTypen + if qAssignedObjectTypen != "" { + + if err := r.SetQueryParam("assigned_object_type__n", qAssignedObjectTypen); err != nil { + return err + } + } + } + + if o.AssignedObjectTypeID != nil { + + // query param assigned_object_type_id + var qrAssignedObjectTypeID string + + if o.AssignedObjectTypeID != nil { + qrAssignedObjectTypeID = *o.AssignedObjectTypeID + } + qAssignedObjectTypeID := qrAssignedObjectTypeID + if qAssignedObjectTypeID != "" { + + if err := r.SetQueryParam("assigned_object_type_id", qAssignedObjectTypeID); err != nil { + return err + } + } + } + + if o.AssignedObjectTypeIDn != nil { + + // query param assigned_object_type_id__n + var qrAssignedObjectTypeIDn string + + if o.AssignedObjectTypeIDn != nil { + qrAssignedObjectTypeIDn = *o.AssignedObjectTypeIDn + } + qAssignedObjectTypeIDn := qrAssignedObjectTypeIDn + if qAssignedObjectTypeIDn != "" { + + if err := r.SetQueryParam("assigned_object_type_id__n", qAssignedObjectTypeIDn); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + + if o.Device != nil { + + // query param device + var qrDevice string + + if o.Device != nil { + qrDevice = *o.Device + } + qDevice := qrDevice + if qDevice != "" { + + if err := r.SetQueryParam("device", qDevice); err != nil { + return err + } + } + } + + if o.Devicen != nil { + + // query param device__n + var qrDevicen string + + if o.Devicen != nil { + qrDevicen = *o.Devicen + } + qDevicen := qrDevicen + if qDevicen != "" { + + if err := r.SetQueryParam("device__n", qDevicen); err != nil { + return err + } + } + } + + if o.DeviceID != nil { + + // query param device_id + var qrDeviceID string + + if o.DeviceID != nil { + qrDeviceID = *o.DeviceID + } + qDeviceID := qrDeviceID + if qDeviceID != "" { + + if err := r.SetQueryParam("device_id", qDeviceID); err != nil { + return err + } + } + } + + if o.DeviceIDn != nil { + + // query param device_id__n + var qrDeviceIDn string + + if o.DeviceIDn != nil { + qrDeviceIDn = *o.DeviceIDn + } + qDeviceIDn := qrDeviceIDn + if qDeviceIDn != "" { + + if err := r.SetQueryParam("device_id__n", qDeviceIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Interface != nil { + + // query param interface + var qrInterface string + + if o.Interface != nil { + qrInterface = *o.Interface + } + qInterface := qrInterface + if qInterface != "" { + + if err := r.SetQueryParam("interface", qInterface); err != nil { + return err + } + } + } + + if o.Interfacen != nil { + + // query param interface__n + var qrInterfacen string + + if o.Interfacen != nil { + qrInterfacen = *o.Interfacen + } + qInterfacen := qrInterfacen + if qInterfacen != "" { + + if err := r.SetQueryParam("interface__n", qInterfacen); err != nil { + return err + } + } + } + + if o.InterfaceID != nil { + + // query param interface_id + var qrInterfaceID string + + if o.InterfaceID != nil { + qrInterfaceID = *o.InterfaceID + } + qInterfaceID := qrInterfaceID + if qInterfaceID != "" { + + if err := r.SetQueryParam("interface_id", qInterfaceID); err != nil { + return err + } + } + } + + if o.InterfaceIDn != nil { + + // query param interface_id__n + var qrInterfaceIDn string + + if o.InterfaceIDn != nil { + qrInterfaceIDn = *o.InterfaceIDn + } + qInterfaceIDn := qrInterfaceIDn + if qInterfaceIDn != "" { + + if err := r.SetQueryParam("interface_id__n", qInterfaceIDn); err != nil { + return err + } + } + } + + if o.L2vpn != nil { + + // query param l2vpn + var qrL2vpn string + + if o.L2vpn != nil { + qrL2vpn = *o.L2vpn + } + qL2vpn := qrL2vpn + if qL2vpn != "" { + + if err := r.SetQueryParam("l2vpn", qL2vpn); err != nil { + return err + } + } + } + + if o.L2vpnn != nil { + + // query param l2vpn__n + var qrL2vpnn string + + if o.L2vpnn != nil { + qrL2vpnn = *o.L2vpnn + } + qL2vpnn := qrL2vpnn + if qL2vpnn != "" { + + if err := r.SetQueryParam("l2vpn__n", qL2vpnn); err != nil { + return err + } + } + } + + if o.L2vpnID != nil { + + // query param l2vpn_id + var qrL2vpnID string + + if o.L2vpnID != nil { + qrL2vpnID = *o.L2vpnID + } + qL2vpnID := qrL2vpnID + if qL2vpnID != "" { + + if err := r.SetQueryParam("l2vpn_id", qL2vpnID); err != nil { + return err + } + } + } + + if o.L2vpnIDn != nil { + + // query param l2vpn_id__n + var qrL2vpnIDn string + + if o.L2vpnIDn != nil { + qrL2vpnIDn = *o.L2vpnIDn + } + qL2vpnIDn := qrL2vpnIDn + if qL2vpnIDn != "" { + + if err := r.SetQueryParam("l2vpn_id__n", qL2vpnIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Region != nil { + + // query param region + var qrRegion string + + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + } + + if o.Site != nil { + + // query param site + var qrSite string + + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + } + + if o.Tag != nil { + + // query param tag + var qrTag string + + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + } + + if o.VirtualMachine != nil { + + // query param virtual_machine + var qrVirtualMachine string + + if o.VirtualMachine != nil { + qrVirtualMachine = *o.VirtualMachine + } + qVirtualMachine := qrVirtualMachine + if qVirtualMachine != "" { + + if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil { + return err + } + } + } + + if o.VirtualMachinen != nil { + + // query param virtual_machine__n + var qrVirtualMachinen string + + if o.VirtualMachinen != nil { + qrVirtualMachinen = *o.VirtualMachinen + } + qVirtualMachinen := qrVirtualMachinen + if qVirtualMachinen != "" { + + if err := r.SetQueryParam("virtual_machine__n", qVirtualMachinen); err != nil { + return err + } + } + } + + if o.VirtualMachineID != nil { + + // query param virtual_machine_id + var qrVirtualMachineID string + + if o.VirtualMachineID != nil { + qrVirtualMachineID = *o.VirtualMachineID + } + qVirtualMachineID := qrVirtualMachineID + if qVirtualMachineID != "" { + + if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil { + return err + } + } + } + + if o.VirtualMachineIDn != nil { + + // query param virtual_machine_id__n + var qrVirtualMachineIDn string + + if o.VirtualMachineIDn != nil { + qrVirtualMachineIDn = *o.VirtualMachineIDn + } + qVirtualMachineIDn := qrVirtualMachineIDn + if qVirtualMachineIDn != "" { + + if err := r.SetQueryParam("virtual_machine_id__n", qVirtualMachineIDn); err != nil { + return err + } + } + } + + if o.Vlan != nil { + + // query param vlan + var qrVlan string + + if o.Vlan != nil { + qrVlan = *o.Vlan + } + qVlan := qrVlan + if qVlan != "" { + + if err := r.SetQueryParam("vlan", qVlan); err != nil { + return err + } + } + } + + if o.Vlann != nil { + + // query param vlan__n + var qrVlann string + + if o.Vlann != nil { + qrVlann = *o.Vlann + } + qVlann := qrVlann + if qVlann != "" { + + if err := r.SetQueryParam("vlan__n", qVlann); err != nil { + return err + } + } + } + + if o.VlanID != nil { + + // query param vlan_id + var qrVlanID string + + if o.VlanID != nil { + qrVlanID = *o.VlanID + } + qVlanID := qrVlanID + if qVlanID != "" { + + if err := r.SetQueryParam("vlan_id", qVlanID); err != nil { + return err + } + } + } + + if o.VlanIDn != nil { + + // query param vlan_id__n + var qrVlanIDn string + + if o.VlanIDn != nil { + qrVlanIDn = *o.VlanIDn + } + qVlanIDn := qrVlanIDn + if qVlanIDn != "" { + + if err := r.SetQueryParam("vlan_id__n", qVlanIDn); err != nil { + return err + } + } + } + + if o.VlanVid != nil { + + // query param vlan_vid + var qrVlanVid float64 + + if o.VlanVid != nil { + qrVlanVid = *o.VlanVid + } + qVlanVid := swag.FormatFloat64(qrVlanVid) + if qVlanVid != "" { + + if err := r.SetQueryParam("vlan_vid", qVlanVid); err != nil { + return err + } + } + } + + if o.VlanVidGt != nil { + + // query param vlan_vid__gt + var qrVlanVidGt float64 + + if o.VlanVidGt != nil { + qrVlanVidGt = *o.VlanVidGt + } + qVlanVidGt := swag.FormatFloat64(qrVlanVidGt) + if qVlanVidGt != "" { + + if err := r.SetQueryParam("vlan_vid__gt", qVlanVidGt); err != nil { + return err + } + } + } + + if o.VlanVidGte != nil { + + // query param vlan_vid__gte + var qrVlanVidGte float64 + + if o.VlanVidGte != nil { + qrVlanVidGte = *o.VlanVidGte + } + qVlanVidGte := swag.FormatFloat64(qrVlanVidGte) + if qVlanVidGte != "" { + + if err := r.SetQueryParam("vlan_vid__gte", qVlanVidGte); err != nil { + return err + } + } + } + + if o.VlanVidLt != nil { + + // query param vlan_vid__lt + var qrVlanVidLt float64 + + if o.VlanVidLt != nil { + qrVlanVidLt = *o.VlanVidLt + } + qVlanVidLt := swag.FormatFloat64(qrVlanVidLt) + if qVlanVidLt != "" { + + if err := r.SetQueryParam("vlan_vid__lt", qVlanVidLt); err != nil { + return err + } + } + } + + if o.VlanVidLte != nil { + + // query param vlan_vid__lte + var qrVlanVidLte float64 + + if o.VlanVidLte != nil { + qrVlanVidLte = *o.VlanVidLte + } + qVlanVidLte := swag.FormatFloat64(qrVlanVidLte) + if qVlanVidLte != "" { + + if err := r.SetQueryParam("vlan_vid__lte", qVlanVidLte); err != nil { + return err + } + } + } + + if o.VlanVidn != nil { + + // query param vlan_vid__n + var qrVlanVidn float64 + + if o.VlanVidn != nil { + qrVlanVidn = *o.VlanVidn + } + qVlanVidn := swag.FormatFloat64(qrVlanVidn) + if qVlanVidn != "" { + + if err := r.SetQueryParam("vlan_vid__n", qVlanVidn); err != nil { + return err + } + } + } + + if o.Vminterface != nil { + + // query param vminterface + var qrVminterface string + + if o.Vminterface != nil { + qrVminterface = *o.Vminterface + } + qVminterface := qrVminterface + if qVminterface != "" { + + if err := r.SetQueryParam("vminterface", qVminterface); err != nil { + return err + } + } + } + + if o.Vminterfacen != nil { + + // query param vminterface__n + var qrVminterfacen string + + if o.Vminterfacen != nil { + qrVminterfacen = *o.Vminterfacen + } + qVminterfacen := qrVminterfacen + if qVminterfacen != "" { + + if err := r.SetQueryParam("vminterface__n", qVminterfacen); err != nil { + return err + } + } + } + + if o.VminterfaceID != nil { + + // query param vminterface_id + var qrVminterfaceID string + + if o.VminterfaceID != nil { + qrVminterfaceID = *o.VminterfaceID + } + qVminterfaceID := qrVminterfaceID + if qVminterfaceID != "" { + + if err := r.SetQueryParam("vminterface_id", qVminterfaceID); err != nil { + return err + } + } + } + + if o.VminterfaceIDn != nil { + + // query param vminterface_id__n + var qrVminterfaceIDn string + + if o.VminterfaceIDn != nil { + qrVminterfaceIDn = *o.VminterfaceIDn + } + qVminterfaceIDn := qrVminterfaceIDn + if qVminterfaceIDn != "" { + + if err := r.SetQueryParam("vminterface_id__n", qVminterfaceIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_responses.go new file mode 100644 index 000000000..86470b92e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_list_responses.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsListReader is a Reader for the IpamL2vpnTerminationsList structure. +type IpamL2vpnTerminationsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsListOK creates a IpamL2vpnTerminationsListOK with default headers values +func NewIpamL2vpnTerminationsListOK() *IpamL2vpnTerminationsListOK { + return &IpamL2vpnTerminationsListOK{} +} + +/* +IpamL2vpnTerminationsListOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsListOK ipam l2vpn terminations list o k +*/ +type IpamL2vpnTerminationsListOK struct { + Payload *IpamL2vpnTerminationsListOKBody +} + +// IsSuccess returns true when this ipam l2vpn terminations list o k response has a 2xx status code +func (o *IpamL2vpnTerminationsListOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations list o k response has a 3xx status code +func (o *IpamL2vpnTerminationsListOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations list o k response has a 4xx status code +func (o *IpamL2vpnTerminationsListOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations list o k response has a 5xx status code +func (o *IpamL2vpnTerminationsListOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations list o k response a status code equal to that given +func (o *IpamL2vpnTerminationsListOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsListOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsListOK) String() string { + return fmt.Sprintf("[GET /ipam/l2vpn-terminations/][%d] ipamL2vpnTerminationsListOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsListOK) GetPayload() *IpamL2vpnTerminationsListOKBody { + return o.Payload +} + +func (o *IpamL2vpnTerminationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamL2vpnTerminationsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +IpamL2vpnTerminationsListOKBody ipam l2vpn terminations list o k body +swagger:model IpamL2vpnTerminationsListOKBody +*/ +type IpamL2vpnTerminationsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.L2VPNTermination `json:"results"` +} + +// Validate validates this ipam l2vpn terminations list o k body +func (o *IpamL2vpnTerminationsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamL2vpnTerminationsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamL2vpnTerminationsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnTerminationsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamL2vpnTerminationsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnTerminationsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamL2vpnTerminationsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnTerminationsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamL2vpnTerminationsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamL2vpnTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamL2vpnTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam l2vpn terminations list o k body based on the context it is used +func (o *IpamL2vpnTerminationsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamL2vpnTerminationsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamL2vpnTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamL2vpnTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamL2vpnTerminationsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamL2vpnTerminationsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamL2vpnTerminationsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_parameters.go new file mode 100644 index 000000000..adc959390 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnTerminationsPartialUpdateParams creates a new IpamL2vpnTerminationsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsPartialUpdateParams() *IpamL2vpnTerminationsPartialUpdateParams { + return &IpamL2vpnTerminationsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsPartialUpdateParamsWithTimeout creates a new IpamL2vpnTerminationsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsPartialUpdateParams { + return &IpamL2vpnTerminationsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsPartialUpdateParamsWithContext creates a new IpamL2vpnTerminationsPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsPartialUpdateParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsPartialUpdateParams { + return &IpamL2vpnTerminationsPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsPartialUpdateParamsWithHTTPClient creates a new IpamL2vpnTerminationsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsPartialUpdateParams { + return &IpamL2vpnTerminationsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsPartialUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsPartialUpdateParams struct { + + // Data. + Data *models.WritableL2VPNTermination + + /* ID. + + A unique integer value identifying this L2VPN termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithDefaults() *IpamL2vpnTerminationsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithData(data *models.WritableL2VPNTermination) *IpamL2vpnTerminationsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetData(data *models.WritableL2VPNTermination) { + o.Data = data +} + +// WithID adds the id to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) WithID(id int64) *IpamL2vpnTerminationsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpn terminations partial update params +func (o *IpamL2vpnTerminationsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_responses.go new file mode 100644 index 000000000..4f7ae0fd2 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsPartialUpdateReader is a Reader for the IpamL2vpnTerminationsPartialUpdate structure. +type IpamL2vpnTerminationsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsPartialUpdateOK creates a IpamL2vpnTerminationsPartialUpdateOK with default headers values +func NewIpamL2vpnTerminationsPartialUpdateOK() *IpamL2vpnTerminationsPartialUpdateOK { + return &IpamL2vpnTerminationsPartialUpdateOK{} +} + +/* +IpamL2vpnTerminationsPartialUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsPartialUpdateOK ipam l2vpn terminations partial update o k +*/ +type IpamL2vpnTerminationsPartialUpdateOK struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations partial update o k response has a 2xx status code +func (o *IpamL2vpnTerminationsPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations partial update o k response has a 3xx status code +func (o *IpamL2vpnTerminationsPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations partial update o k response has a 4xx status code +func (o *IpamL2vpnTerminationsPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations partial update o k response has a 5xx status code +func (o *IpamL2vpnTerminationsPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations partial update o k response a status code equal to that given +func (o *IpamL2vpnTerminationsPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsPartialUpdateOK) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_parameters.go new file mode 100644 index 000000000..5ebb41339 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnTerminationsReadParams creates a new IpamL2vpnTerminationsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsReadParams() *IpamL2vpnTerminationsReadParams { + return &IpamL2vpnTerminationsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsReadParamsWithTimeout creates a new IpamL2vpnTerminationsReadParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsReadParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsReadParams { + return &IpamL2vpnTerminationsReadParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsReadParamsWithContext creates a new IpamL2vpnTerminationsReadParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsReadParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsReadParams { + return &IpamL2vpnTerminationsReadParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsReadParamsWithHTTPClient creates a new IpamL2vpnTerminationsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsReadParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsReadParams { + return &IpamL2vpnTerminationsReadParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsReadParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations read operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsReadParams struct { + + /* ID. + + A unique integer value identifying this L2VPN termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsReadParams) WithDefaults() *IpamL2vpnTerminationsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) WithID(id int64) *IpamL2vpnTerminationsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpn terminations read params +func (o *IpamL2vpnTerminationsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_responses.go new file mode 100644 index 000000000..70be9cc12 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_read_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsReadReader is a Reader for the IpamL2vpnTerminationsRead structure. +type IpamL2vpnTerminationsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsReadOK creates a IpamL2vpnTerminationsReadOK with default headers values +func NewIpamL2vpnTerminationsReadOK() *IpamL2vpnTerminationsReadOK { + return &IpamL2vpnTerminationsReadOK{} +} + +/* +IpamL2vpnTerminationsReadOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsReadOK ipam l2vpn terminations read o k +*/ +type IpamL2vpnTerminationsReadOK struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations read o k response has a 2xx status code +func (o *IpamL2vpnTerminationsReadOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations read o k response has a 3xx status code +func (o *IpamL2vpnTerminationsReadOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations read o k response has a 4xx status code +func (o *IpamL2vpnTerminationsReadOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations read o k response has a 5xx status code +func (o *IpamL2vpnTerminationsReadOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations read o k response a status code equal to that given +func (o *IpamL2vpnTerminationsReadOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsReadOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsReadOK) String() string { + return fmt.Sprintf("[GET /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsReadOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsReadOK) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_parameters.go new file mode 100644 index 000000000..6a0131d0a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnTerminationsUpdateParams creates a new IpamL2vpnTerminationsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnTerminationsUpdateParams() *IpamL2vpnTerminationsUpdateParams { + return &IpamL2vpnTerminationsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnTerminationsUpdateParamsWithTimeout creates a new IpamL2vpnTerminationsUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnTerminationsUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnTerminationsUpdateParams { + return &IpamL2vpnTerminationsUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnTerminationsUpdateParamsWithContext creates a new IpamL2vpnTerminationsUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnTerminationsUpdateParamsWithContext(ctx context.Context) *IpamL2vpnTerminationsUpdateParams { + return &IpamL2vpnTerminationsUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnTerminationsUpdateParamsWithHTTPClient creates a new IpamL2vpnTerminationsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnTerminationsUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnTerminationsUpdateParams { + return &IpamL2vpnTerminationsUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnTerminationsUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpn terminations update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnTerminationsUpdateParams struct { + + // Data. + Data *models.WritableL2VPNTermination + + /* ID. + + A unique integer value identifying this L2VPN termination. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpn terminations update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsUpdateParams) WithDefaults() *IpamL2vpnTerminationsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpn terminations update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnTerminationsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnTerminationsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) WithContext(ctx context.Context) *IpamL2vpnTerminationsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnTerminationsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) WithData(data *models.WritableL2VPNTermination) *IpamL2vpnTerminationsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) SetData(data *models.WritableL2VPNTermination) { + o.Data = data +} + +// WithID adds the id to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) WithID(id int64) *IpamL2vpnTerminationsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpn terminations update params +func (o *IpamL2vpnTerminationsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnTerminationsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_responses.go new file mode 100644 index 000000000..17bde18f1 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpn_terminations_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnTerminationsUpdateReader is a Reader for the IpamL2vpnTerminationsUpdate structure. +type IpamL2vpnTerminationsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnTerminationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnTerminationsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnTerminationsUpdateOK creates a IpamL2vpnTerminationsUpdateOK with default headers values +func NewIpamL2vpnTerminationsUpdateOK() *IpamL2vpnTerminationsUpdateOK { + return &IpamL2vpnTerminationsUpdateOK{} +} + +/* +IpamL2vpnTerminationsUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnTerminationsUpdateOK ipam l2vpn terminations update o k +*/ +type IpamL2vpnTerminationsUpdateOK struct { + Payload *models.L2VPNTermination +} + +// IsSuccess returns true when this ipam l2vpn terminations update o k response has a 2xx status code +func (o *IpamL2vpnTerminationsUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpn terminations update o k response has a 3xx status code +func (o *IpamL2vpnTerminationsUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpn terminations update o k response has a 4xx status code +func (o *IpamL2vpnTerminationsUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpn terminations update o k response has a 5xx status code +func (o *IpamL2vpnTerminationsUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpn terminations update o k response a status code equal to that given +func (o *IpamL2vpnTerminationsUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnTerminationsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsUpdateOK) String() string { + return fmt.Sprintf("[PUT /ipam/l2vpn-terminations/{id}/][%d] ipamL2vpnTerminationsUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnTerminationsUpdateOK) GetPayload() *models.L2VPNTermination { + return o.Payload +} + +func (o *IpamL2vpnTerminationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPNTermination) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_parameters.go new file mode 100644 index 000000000..b0fe5be88 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_parameters.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewIpamL2vpnsBulkDeleteParams creates a new IpamL2vpnsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsBulkDeleteParams() *IpamL2vpnsBulkDeleteParams { + return &IpamL2vpnsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsBulkDeleteParamsWithTimeout creates a new IpamL2vpnsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamL2vpnsBulkDeleteParams { + return &IpamL2vpnsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsBulkDeleteParamsWithContext creates a new IpamL2vpnsBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsBulkDeleteParamsWithContext(ctx context.Context) *IpamL2vpnsBulkDeleteParams { + return &IpamL2vpnsBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsBulkDeleteParamsWithHTTPClient creates a new IpamL2vpnsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamL2vpnsBulkDeleteParams { + return &IpamL2vpnsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsBulkDeleteParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkDeleteParams) WithDefaults() *IpamL2vpnsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamL2vpnsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) WithContext(ctx context.Context) *IpamL2vpnsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamL2vpnsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns bulk delete params +func (o *IpamL2vpnsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsBulkDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_responses.go new file mode 100644 index 000000000..f9f648edb --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamL2vpnsBulkDeleteReader is a Reader for the IpamL2vpnsBulkDelete structure. +type IpamL2vpnsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamL2vpnsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsBulkDeleteNoContent creates a IpamL2vpnsBulkDeleteNoContent with default headers values +func NewIpamL2vpnsBulkDeleteNoContent() *IpamL2vpnsBulkDeleteNoContent { + return &IpamL2vpnsBulkDeleteNoContent{} +} + +/* +IpamL2vpnsBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamL2vpnsBulkDeleteNoContent ipam l2vpns bulk delete no content +*/ +type IpamL2vpnsBulkDeleteNoContent struct { +} + +// IsSuccess returns true when this ipam l2vpns bulk delete no content response has a 2xx status code +func (o *IpamL2vpnsBulkDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns bulk delete no content response has a 3xx status code +func (o *IpamL2vpnsBulkDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns bulk delete no content response has a 4xx status code +func (o *IpamL2vpnsBulkDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns bulk delete no content response has a 5xx status code +func (o *IpamL2vpnsBulkDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns bulk delete no content response a status code equal to that given +func (o *IpamL2vpnsBulkDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *IpamL2vpnsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/l2vpns/][%d] ipamL2vpnsBulkDeleteNoContent ", 204) +} + +func (o *IpamL2vpnsBulkDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /ipam/l2vpns/][%d] ipamL2vpnsBulkDeleteNoContent ", 204) +} + +func (o *IpamL2vpnsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_parameters.go new file mode 100644 index 000000000..a6a6d9b29 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnsBulkPartialUpdateParams creates a new IpamL2vpnsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsBulkPartialUpdateParams() *IpamL2vpnsBulkPartialUpdateParams { + return &IpamL2vpnsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsBulkPartialUpdateParamsWithTimeout creates a new IpamL2vpnsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnsBulkPartialUpdateParams { + return &IpamL2vpnsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsBulkPartialUpdateParamsWithContext creates a new IpamL2vpnsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamL2vpnsBulkPartialUpdateParams { + return &IpamL2vpnsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsBulkPartialUpdateParamsWithHTTPClient creates a new IpamL2vpnsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnsBulkPartialUpdateParams { + return &IpamL2vpnsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableL2VPN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkPartialUpdateParams) WithDefaults() *IpamL2vpnsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamL2vpnsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) WithData(data *models.WritableL2VPN) *IpamL2vpnsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpns bulk partial update params +func (o *IpamL2vpnsBulkPartialUpdateParams) SetData(data *models.WritableL2VPN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_responses.go new file mode 100644 index 000000000..7e0d96c10 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsBulkPartialUpdateReader is a Reader for the IpamL2vpnsBulkPartialUpdate structure. +type IpamL2vpnsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsBulkPartialUpdateOK creates a IpamL2vpnsBulkPartialUpdateOK with default headers values +func NewIpamL2vpnsBulkPartialUpdateOK() *IpamL2vpnsBulkPartialUpdateOK { + return &IpamL2vpnsBulkPartialUpdateOK{} +} + +/* +IpamL2vpnsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnsBulkPartialUpdateOK ipam l2vpns bulk partial update o k +*/ +type IpamL2vpnsBulkPartialUpdateOK struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns bulk partial update o k response has a 2xx status code +func (o *IpamL2vpnsBulkPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns bulk partial update o k response has a 3xx status code +func (o *IpamL2vpnsBulkPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns bulk partial update o k response has a 4xx status code +func (o *IpamL2vpnsBulkPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns bulk partial update o k response has a 5xx status code +func (o *IpamL2vpnsBulkPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns bulk partial update o k response a status code equal to that given +func (o *IpamL2vpnsBulkPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/l2vpns/][%d] ipamL2vpnsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsBulkPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /ipam/l2vpns/][%d] ipamL2vpnsBulkPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsBulkPartialUpdateOK) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_parameters.go new file mode 100644 index 000000000..02a776be3 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnsBulkUpdateParams creates a new IpamL2vpnsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsBulkUpdateParams() *IpamL2vpnsBulkUpdateParams { + return &IpamL2vpnsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsBulkUpdateParamsWithTimeout creates a new IpamL2vpnsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnsBulkUpdateParams { + return &IpamL2vpnsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsBulkUpdateParamsWithContext creates a new IpamL2vpnsBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsBulkUpdateParamsWithContext(ctx context.Context) *IpamL2vpnsBulkUpdateParams { + return &IpamL2vpnsBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsBulkUpdateParamsWithHTTPClient creates a new IpamL2vpnsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnsBulkUpdateParams { + return &IpamL2vpnsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsBulkUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsBulkUpdateParams struct { + + // Data. + Data *models.WritableL2VPN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkUpdateParams) WithDefaults() *IpamL2vpnsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) WithContext(ctx context.Context) *IpamL2vpnsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) WithData(data *models.WritableL2VPN) *IpamL2vpnsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpns bulk update params +func (o *IpamL2vpnsBulkUpdateParams) SetData(data *models.WritableL2VPN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_responses.go new file mode 100644 index 000000000..8f8709176 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_bulk_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsBulkUpdateReader is a Reader for the IpamL2vpnsBulkUpdate structure. +type IpamL2vpnsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsBulkUpdateOK creates a IpamL2vpnsBulkUpdateOK with default headers values +func NewIpamL2vpnsBulkUpdateOK() *IpamL2vpnsBulkUpdateOK { + return &IpamL2vpnsBulkUpdateOK{} +} + +/* +IpamL2vpnsBulkUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnsBulkUpdateOK ipam l2vpns bulk update o k +*/ +type IpamL2vpnsBulkUpdateOK struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns bulk update o k response has a 2xx status code +func (o *IpamL2vpnsBulkUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns bulk update o k response has a 3xx status code +func (o *IpamL2vpnsBulkUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns bulk update o k response has a 4xx status code +func (o *IpamL2vpnsBulkUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns bulk update o k response has a 5xx status code +func (o *IpamL2vpnsBulkUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns bulk update o k response a status code equal to that given +func (o *IpamL2vpnsBulkUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/l2vpns/][%d] ipamL2vpnsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsBulkUpdateOK) String() string { + return fmt.Sprintf("[PUT /ipam/l2vpns/][%d] ipamL2vpnsBulkUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsBulkUpdateOK) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_parameters.go new file mode 100644 index 000000000..e5e689d6d --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnsCreateParams creates a new IpamL2vpnsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsCreateParams() *IpamL2vpnsCreateParams { + return &IpamL2vpnsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsCreateParamsWithTimeout creates a new IpamL2vpnsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsCreateParamsWithTimeout(timeout time.Duration) *IpamL2vpnsCreateParams { + return &IpamL2vpnsCreateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsCreateParamsWithContext creates a new IpamL2vpnsCreateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsCreateParamsWithContext(ctx context.Context) *IpamL2vpnsCreateParams { + return &IpamL2vpnsCreateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsCreateParamsWithHTTPClient creates a new IpamL2vpnsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsCreateParamsWithHTTPClient(client *http.Client) *IpamL2vpnsCreateParams { + return &IpamL2vpnsCreateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsCreateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns create operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsCreateParams struct { + + // Data. + Data *models.WritableL2VPN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsCreateParams) WithDefaults() *IpamL2vpnsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) WithTimeout(timeout time.Duration) *IpamL2vpnsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) WithContext(ctx context.Context) *IpamL2vpnsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) WithHTTPClient(client *http.Client) *IpamL2vpnsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) WithData(data *models.WritableL2VPN) *IpamL2vpnsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpns create params +func (o *IpamL2vpnsCreateParams) SetData(data *models.WritableL2VPN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_responses.go new file mode 100644 index 000000000..ed9bb69c5 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_create_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsCreateReader is a Reader for the IpamL2vpnsCreate structure. +type IpamL2vpnsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamL2vpnsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsCreateCreated creates a IpamL2vpnsCreateCreated with default headers values +func NewIpamL2vpnsCreateCreated() *IpamL2vpnsCreateCreated { + return &IpamL2vpnsCreateCreated{} +} + +/* +IpamL2vpnsCreateCreated describes a response with status code 201, with default header values. + +IpamL2vpnsCreateCreated ipam l2vpns create created +*/ +type IpamL2vpnsCreateCreated struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns create created response has a 2xx status code +func (o *IpamL2vpnsCreateCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns create created response has a 3xx status code +func (o *IpamL2vpnsCreateCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns create created response has a 4xx status code +func (o *IpamL2vpnsCreateCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns create created response has a 5xx status code +func (o *IpamL2vpnsCreateCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns create created response a status code equal to that given +func (o *IpamL2vpnsCreateCreated) IsCode(code int) bool { + return code == 201 +} + +func (o *IpamL2vpnsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/l2vpns/][%d] ipamL2vpnsCreateCreated %+v", 201, o.Payload) +} + +func (o *IpamL2vpnsCreateCreated) String() string { + return fmt.Sprintf("[POST /ipam/l2vpns/][%d] ipamL2vpnsCreateCreated %+v", 201, o.Payload) +} + +func (o *IpamL2vpnsCreateCreated) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_parameters.go new file mode 100644 index 000000000..9421f58a1 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnsDeleteParams creates a new IpamL2vpnsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsDeleteParams() *IpamL2vpnsDeleteParams { + return &IpamL2vpnsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsDeleteParamsWithTimeout creates a new IpamL2vpnsDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsDeleteParamsWithTimeout(timeout time.Duration) *IpamL2vpnsDeleteParams { + return &IpamL2vpnsDeleteParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsDeleteParamsWithContext creates a new IpamL2vpnsDeleteParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsDeleteParamsWithContext(ctx context.Context) *IpamL2vpnsDeleteParams { + return &IpamL2vpnsDeleteParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsDeleteParamsWithHTTPClient creates a new IpamL2vpnsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsDeleteParamsWithHTTPClient(client *http.Client) *IpamL2vpnsDeleteParams { + return &IpamL2vpnsDeleteParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsDeleteParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns delete operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsDeleteParams struct { + + /* ID. + + A unique integer value identifying this L2VPN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsDeleteParams) WithDefaults() *IpamL2vpnsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) WithTimeout(timeout time.Duration) *IpamL2vpnsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) WithContext(ctx context.Context) *IpamL2vpnsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) WithHTTPClient(client *http.Client) *IpamL2vpnsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) WithID(id int64) *IpamL2vpnsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpns delete params +func (o *IpamL2vpnsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_responses.go new file mode 100644 index 000000000..08edc2b0c --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_delete_responses.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamL2vpnsDeleteReader is a Reader for the IpamL2vpnsDelete structure. +type IpamL2vpnsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamL2vpnsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsDeleteNoContent creates a IpamL2vpnsDeleteNoContent with default headers values +func NewIpamL2vpnsDeleteNoContent() *IpamL2vpnsDeleteNoContent { + return &IpamL2vpnsDeleteNoContent{} +} + +/* +IpamL2vpnsDeleteNoContent describes a response with status code 204, with default header values. + +IpamL2vpnsDeleteNoContent ipam l2vpns delete no content +*/ +type IpamL2vpnsDeleteNoContent struct { +} + +// IsSuccess returns true when this ipam l2vpns delete no content response has a 2xx status code +func (o *IpamL2vpnsDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns delete no content response has a 3xx status code +func (o *IpamL2vpnsDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns delete no content response has a 4xx status code +func (o *IpamL2vpnsDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns delete no content response has a 5xx status code +func (o *IpamL2vpnsDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns delete no content response a status code equal to that given +func (o *IpamL2vpnsDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +func (o *IpamL2vpnsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/l2vpns/{id}/][%d] ipamL2vpnsDeleteNoContent ", 204) +} + +func (o *IpamL2vpnsDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /ipam/l2vpns/{id}/][%d] ipamL2vpnsDeleteNoContent ", 204) +} + +func (o *IpamL2vpnsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_parameters.go new file mode 100644 index 000000000..ff3f543f8 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_parameters.go @@ -0,0 +1,2572 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnsListParams creates a new IpamL2vpnsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsListParams() *IpamL2vpnsListParams { + return &IpamL2vpnsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsListParamsWithTimeout creates a new IpamL2vpnsListParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsListParamsWithTimeout(timeout time.Duration) *IpamL2vpnsListParams { + return &IpamL2vpnsListParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsListParamsWithContext creates a new IpamL2vpnsListParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsListParamsWithContext(ctx context.Context) *IpamL2vpnsListParams { + return &IpamL2vpnsListParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsListParamsWithHTTPClient creates a new IpamL2vpnsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsListParamsWithHTTPClient(client *http.Client) *IpamL2vpnsListParams { + return &IpamL2vpnsListParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsListParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns list operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsListParams struct { + + // Created. + Created *string + + // CreatedGt. + CreatedGt *string + + // CreatedGte. + CreatedGte *string + + // CreatedLt. + CreatedLt *string + + // CreatedLte. + CreatedLte *string + + // Createdn. + Createdn *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ExportTarget. + ExportTarget *string + + // ExportTargetn. + ExportTargetn *string + + // ExportTargetID. + ExportTargetID *string + + // ExportTargetIDn. + ExportTargetIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Identifier. + Identifier *string + + // IdentifierGt. + IdentifierGt *string + + // IdentifierGte. + IdentifierGte *string + + // IdentifierLt. + IdentifierLt *string + + // IdentifierLte. + IdentifierLte *string + + // Identifiern. + Identifiern *string + + // ImportTarget. + ImportTarget *string + + // ImportTargetn. + ImportTargetn *string + + // ImportTargetID. + ImportTargetID *string + + // ImportTargetIDn. + ImportTargetIDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGt. + LastUpdatedGt *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLt. + LastUpdatedLt *string + + // LastUpdatedLte. + LastUpdatedLte *string + + // LastUpdatedn. + LastUpdatedn *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + + // Q. + Q *string + + // Slug. + Slug *string + + // SlugIc. + SlugIc *string + + // SlugIe. + SlugIe *string + + // SlugIew. + SlugIew *string + + // SlugIsw. + SlugIsw *string + + // Slugn. + Slugn *string + + // SlugNic. + SlugNic *string + + // SlugNie. + SlugNie *string + + // SlugNiew. + SlugNiew *string + + // SlugNisw. + SlugNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + + // Type. + Type *string + + // Typen. + Typen *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsListParams) WithDefaults() *IpamL2vpnsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTimeout(timeout time.Duration) *IpamL2vpnsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithContext(ctx context.Context) *IpamL2vpnsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithHTTPClient(client *http.Client) *IpamL2vpnsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreated(created *string) *IpamL2vpnsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGt adds the createdGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreatedGt(createdGt *string) *IpamL2vpnsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + +// WithCreatedGte adds the createdGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreatedGte(createdGte *string) *IpamL2vpnsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLt adds the createdLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreatedLt(createdLt *string) *IpamL2vpnsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + +// WithCreatedLte adds the createdLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreatedLte(createdLte *string) *IpamL2vpnsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithCreatedn adds the createdn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithCreatedn(createdn *string) *IpamL2vpnsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + +// WithDescription adds the description to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescription(description *string) *IpamL2vpnsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionIc(descriptionIc *string) *IpamL2vpnsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionIe(descriptionIe *string) *IpamL2vpnsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionIew(descriptionIew *string) *IpamL2vpnsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionIsw(descriptionIsw *string) *IpamL2vpnsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionn(descriptionn *string) *IpamL2vpnsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionNic(descriptionNic *string) *IpamL2vpnsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionNie(descriptionNie *string) *IpamL2vpnsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionNiew(descriptionNiew *string) *IpamL2vpnsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithDescriptionNisw(descriptionNisw *string) *IpamL2vpnsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithExportTarget adds the exportTarget to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithExportTarget(exportTarget *string) *IpamL2vpnsListParams { + o.SetExportTarget(exportTarget) + return o +} + +// SetExportTarget adds the exportTarget to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetExportTarget(exportTarget *string) { + o.ExportTarget = exportTarget +} + +// WithExportTargetn adds the exportTargetn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithExportTargetn(exportTargetn *string) *IpamL2vpnsListParams { + o.SetExportTargetn(exportTargetn) + return o +} + +// SetExportTargetn adds the exportTargetN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetExportTargetn(exportTargetn *string) { + o.ExportTargetn = exportTargetn +} + +// WithExportTargetID adds the exportTargetID to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithExportTargetID(exportTargetID *string) *IpamL2vpnsListParams { + o.SetExportTargetID(exportTargetID) + return o +} + +// SetExportTargetID adds the exportTargetId to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetExportTargetID(exportTargetID *string) { + o.ExportTargetID = exportTargetID +} + +// WithExportTargetIDn adds the exportTargetIDn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithExportTargetIDn(exportTargetIDn *string) *IpamL2vpnsListParams { + o.SetExportTargetIDn(exportTargetIDn) + return o +} + +// SetExportTargetIDn adds the exportTargetIdN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetExportTargetIDn(exportTargetIDn *string) { + o.ExportTargetIDn = exportTargetIDn +} + +// WithID adds the id to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithID(id *string) *IpamL2vpnsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIDGt(iDGt *string) *IpamL2vpnsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIDGte(iDGte *string) *IpamL2vpnsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIDLt(iDLt *string) *IpamL2vpnsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIDLte(iDLte *string) *IpamL2vpnsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIDn(iDn *string) *IpamL2vpnsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithIdentifier adds the identifier to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifier(identifier *string) *IpamL2vpnsListParams { + o.SetIdentifier(identifier) + return o +} + +// SetIdentifier adds the identifier to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifier(identifier *string) { + o.Identifier = identifier +} + +// WithIdentifierGt adds the identifierGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifierGt(identifierGt *string) *IpamL2vpnsListParams { + o.SetIdentifierGt(identifierGt) + return o +} + +// SetIdentifierGt adds the identifierGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifierGt(identifierGt *string) { + o.IdentifierGt = identifierGt +} + +// WithIdentifierGte adds the identifierGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifierGte(identifierGte *string) *IpamL2vpnsListParams { + o.SetIdentifierGte(identifierGte) + return o +} + +// SetIdentifierGte adds the identifierGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifierGte(identifierGte *string) { + o.IdentifierGte = identifierGte +} + +// WithIdentifierLt adds the identifierLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifierLt(identifierLt *string) *IpamL2vpnsListParams { + o.SetIdentifierLt(identifierLt) + return o +} + +// SetIdentifierLt adds the identifierLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifierLt(identifierLt *string) { + o.IdentifierLt = identifierLt +} + +// WithIdentifierLte adds the identifierLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifierLte(identifierLte *string) *IpamL2vpnsListParams { + o.SetIdentifierLte(identifierLte) + return o +} + +// SetIdentifierLte adds the identifierLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifierLte(identifierLte *string) { + o.IdentifierLte = identifierLte +} + +// WithIdentifiern adds the identifiern to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithIdentifiern(identifiern *string) *IpamL2vpnsListParams { + o.SetIdentifiern(identifiern) + return o +} + +// SetIdentifiern adds the identifierN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetIdentifiern(identifiern *string) { + o.Identifiern = identifiern +} + +// WithImportTarget adds the importTarget to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithImportTarget(importTarget *string) *IpamL2vpnsListParams { + o.SetImportTarget(importTarget) + return o +} + +// SetImportTarget adds the importTarget to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetImportTarget(importTarget *string) { + o.ImportTarget = importTarget +} + +// WithImportTargetn adds the importTargetn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithImportTargetn(importTargetn *string) *IpamL2vpnsListParams { + o.SetImportTargetn(importTargetn) + return o +} + +// SetImportTargetn adds the importTargetN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetImportTargetn(importTargetn *string) { + o.ImportTargetn = importTargetn +} + +// WithImportTargetID adds the importTargetID to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithImportTargetID(importTargetID *string) *IpamL2vpnsListParams { + o.SetImportTargetID(importTargetID) + return o +} + +// SetImportTargetID adds the importTargetId to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetImportTargetID(importTargetID *string) { + o.ImportTargetID = importTargetID +} + +// WithImportTargetIDn adds the importTargetIDn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithImportTargetIDn(importTargetIDn *string) *IpamL2vpnsListParams { + o.SetImportTargetIDn(importTargetIDn) + return o +} + +// SetImportTargetIDn adds the importTargetIdN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetImportTargetIDn(importTargetIDn *string) { + o.ImportTargetIDn = importTargetIDn +} + +// WithLastUpdated adds the lastUpdated to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdated(lastUpdated *string) *IpamL2vpnsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamL2vpnsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamL2vpnsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamL2vpnsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamL2vpnsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLastUpdatedn adds the lastUpdatedn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamL2vpnsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + +// WithLimit adds the limit to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithLimit(limit *int64) *IpamL2vpnsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithName(name *string) *IpamL2vpnsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameIc(nameIc *string) *IpamL2vpnsListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameIe(nameIe *string) *IpamL2vpnsListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameIew(nameIew *string) *IpamL2vpnsListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameIsw(nameIsw *string) *IpamL2vpnsListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNamen(namen *string) *IpamL2vpnsListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameNic(nameNic *string) *IpamL2vpnsListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameNie(nameNie *string) *IpamL2vpnsListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameNiew(nameNiew *string) *IpamL2vpnsListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithNameNisw(nameNisw *string) *IpamL2vpnsListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithOffset(offset *int64) *IpamL2vpnsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrdering adds the ordering to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithOrdering(ordering *string) *IpamL2vpnsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + +// WithQ adds the q to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithQ(q *string) *IpamL2vpnsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetQ(q *string) { + o.Q = q +} + +// WithSlug adds the slug to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlug(slug *string) *IpamL2vpnsListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlug(slug *string) { + o.Slug = slug +} + +// WithSlugIc adds the slugIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugIc(slugIc *string) *IpamL2vpnsListParams { + o.SetSlugIc(slugIc) + return o +} + +// SetSlugIc adds the slugIc to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugIc(slugIc *string) { + o.SlugIc = slugIc +} + +// WithSlugIe adds the slugIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugIe(slugIe *string) *IpamL2vpnsListParams { + o.SetSlugIe(slugIe) + return o +} + +// SetSlugIe adds the slugIe to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugIe(slugIe *string) { + o.SlugIe = slugIe +} + +// WithSlugIew adds the slugIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugIew(slugIew *string) *IpamL2vpnsListParams { + o.SetSlugIew(slugIew) + return o +} + +// SetSlugIew adds the slugIew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugIew(slugIew *string) { + o.SlugIew = slugIew +} + +// WithSlugIsw adds the slugIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugIsw(slugIsw *string) *IpamL2vpnsListParams { + o.SetSlugIsw(slugIsw) + return o +} + +// SetSlugIsw adds the slugIsw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugIsw(slugIsw *string) { + o.SlugIsw = slugIsw +} + +// WithSlugn adds the slugn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugn(slugn *string) *IpamL2vpnsListParams { + o.SetSlugn(slugn) + return o +} + +// SetSlugn adds the slugN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugn(slugn *string) { + o.Slugn = slugn +} + +// WithSlugNic adds the slugNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugNic(slugNic *string) *IpamL2vpnsListParams { + o.SetSlugNic(slugNic) + return o +} + +// SetSlugNic adds the slugNic to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugNic(slugNic *string) { + o.SlugNic = slugNic +} + +// WithSlugNie adds the slugNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugNie(slugNie *string) *IpamL2vpnsListParams { + o.SetSlugNie(slugNie) + return o +} + +// SetSlugNie adds the slugNie to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugNie(slugNie *string) { + o.SlugNie = slugNie +} + +// WithSlugNiew adds the slugNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugNiew(slugNiew *string) *IpamL2vpnsListParams { + o.SetSlugNiew(slugNiew) + return o +} + +// SetSlugNiew adds the slugNiew to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugNiew(slugNiew *string) { + o.SlugNiew = slugNiew +} + +// WithSlugNisw adds the slugNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithSlugNisw(slugNisw *string) *IpamL2vpnsListParams { + o.SetSlugNisw(slugNisw) + return o +} + +// SetSlugNisw adds the slugNisw to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetSlugNisw(slugNisw *string) { + o.SlugNisw = slugNisw +} + +// WithTag adds the tag to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTag(tag *string) *IpamL2vpnsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTagn(tagn *string) *IpamL2vpnsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithTenant adds the tenant to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenant(tenant *string) *IpamL2vpnsListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantn(tenantn *string) *IpamL2vpnsListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantGroup(tenantGroup *string) *IpamL2vpnsListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantGroupn(tenantGroupn *string) *IpamL2vpnsListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantGroupID(tenantGroupID *string) *IpamL2vpnsListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantGroupIDn(tenantGroupIDn *string) *IpamL2vpnsListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantID(tenantID *string) *IpamL2vpnsListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTenantIDn(tenantIDn *string) *IpamL2vpnsListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + +// WithType adds the typeVar to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithType(typeVar *string) *IpamL2vpnsListParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetType(typeVar *string) { + o.Type = typeVar +} + +// WithTypen adds the typen to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) WithTypen(typen *string) *IpamL2vpnsListParams { + o.SetTypen(typen) + return o +} + +// SetTypen adds the typeN to the ipam l2vpns list params +func (o *IpamL2vpnsListParams) SetTypen(typen *string) { + o.Typen = typen +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ExportTarget != nil { + + // query param export_target + var qrExportTarget string + + if o.ExportTarget != nil { + qrExportTarget = *o.ExportTarget + } + qExportTarget := qrExportTarget + if qExportTarget != "" { + + if err := r.SetQueryParam("export_target", qExportTarget); err != nil { + return err + } + } + } + + if o.ExportTargetn != nil { + + // query param export_target__n + var qrExportTargetn string + + if o.ExportTargetn != nil { + qrExportTargetn = *o.ExportTargetn + } + qExportTargetn := qrExportTargetn + if qExportTargetn != "" { + + if err := r.SetQueryParam("export_target__n", qExportTargetn); err != nil { + return err + } + } + } + + if o.ExportTargetID != nil { + + // query param export_target_id + var qrExportTargetID string + + if o.ExportTargetID != nil { + qrExportTargetID = *o.ExportTargetID + } + qExportTargetID := qrExportTargetID + if qExportTargetID != "" { + + if err := r.SetQueryParam("export_target_id", qExportTargetID); err != nil { + return err + } + } + } + + if o.ExportTargetIDn != nil { + + // query param export_target_id__n + var qrExportTargetIDn string + + if o.ExportTargetIDn != nil { + qrExportTargetIDn = *o.ExportTargetIDn + } + qExportTargetIDn := qrExportTargetIDn + if qExportTargetIDn != "" { + + if err := r.SetQueryParam("export_target_id__n", qExportTargetIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Identifier != nil { + + // query param identifier + var qrIdentifier string + + if o.Identifier != nil { + qrIdentifier = *o.Identifier + } + qIdentifier := qrIdentifier + if qIdentifier != "" { + + if err := r.SetQueryParam("identifier", qIdentifier); err != nil { + return err + } + } + } + + if o.IdentifierGt != nil { + + // query param identifier__gt + var qrIdentifierGt string + + if o.IdentifierGt != nil { + qrIdentifierGt = *o.IdentifierGt + } + qIdentifierGt := qrIdentifierGt + if qIdentifierGt != "" { + + if err := r.SetQueryParam("identifier__gt", qIdentifierGt); err != nil { + return err + } + } + } + + if o.IdentifierGte != nil { + + // query param identifier__gte + var qrIdentifierGte string + + if o.IdentifierGte != nil { + qrIdentifierGte = *o.IdentifierGte + } + qIdentifierGte := qrIdentifierGte + if qIdentifierGte != "" { + + if err := r.SetQueryParam("identifier__gte", qIdentifierGte); err != nil { + return err + } + } + } + + if o.IdentifierLt != nil { + + // query param identifier__lt + var qrIdentifierLt string + + if o.IdentifierLt != nil { + qrIdentifierLt = *o.IdentifierLt + } + qIdentifierLt := qrIdentifierLt + if qIdentifierLt != "" { + + if err := r.SetQueryParam("identifier__lt", qIdentifierLt); err != nil { + return err + } + } + } + + if o.IdentifierLte != nil { + + // query param identifier__lte + var qrIdentifierLte string + + if o.IdentifierLte != nil { + qrIdentifierLte = *o.IdentifierLte + } + qIdentifierLte := qrIdentifierLte + if qIdentifierLte != "" { + + if err := r.SetQueryParam("identifier__lte", qIdentifierLte); err != nil { + return err + } + } + } + + if o.Identifiern != nil { + + // query param identifier__n + var qrIdentifiern string + + if o.Identifiern != nil { + qrIdentifiern = *o.Identifiern + } + qIdentifiern := qrIdentifiern + if qIdentifiern != "" { + + if err := r.SetQueryParam("identifier__n", qIdentifiern); err != nil { + return err + } + } + } + + if o.ImportTarget != nil { + + // query param import_target + var qrImportTarget string + + if o.ImportTarget != nil { + qrImportTarget = *o.ImportTarget + } + qImportTarget := qrImportTarget + if qImportTarget != "" { + + if err := r.SetQueryParam("import_target", qImportTarget); err != nil { + return err + } + } + } + + if o.ImportTargetn != nil { + + // query param import_target__n + var qrImportTargetn string + + if o.ImportTargetn != nil { + qrImportTargetn = *o.ImportTargetn + } + qImportTargetn := qrImportTargetn + if qImportTargetn != "" { + + if err := r.SetQueryParam("import_target__n", qImportTargetn); err != nil { + return err + } + } + } + + if o.ImportTargetID != nil { + + // query param import_target_id + var qrImportTargetID string + + if o.ImportTargetID != nil { + qrImportTargetID = *o.ImportTargetID + } + qImportTargetID := qrImportTargetID + if qImportTargetID != "" { + + if err := r.SetQueryParam("import_target_id", qImportTargetID); err != nil { + return err + } + } + } + + if o.ImportTargetIDn != nil { + + // query param import_target_id__n + var qrImportTargetIDn string + + if o.ImportTargetIDn != nil { + qrImportTargetIDn = *o.ImportTargetIDn + } + qImportTargetIDn := qrImportTargetIDn + if qImportTargetIDn != "" { + + if err := r.SetQueryParam("import_target_id__n", qImportTargetIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Slug != nil { + + // query param slug + var qrSlug string + + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + } + + if o.SlugIc != nil { + + // query param slug__ic + var qrSlugIc string + + if o.SlugIc != nil { + qrSlugIc = *o.SlugIc + } + qSlugIc := qrSlugIc + if qSlugIc != "" { + + if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { + return err + } + } + } + + if o.SlugIe != nil { + + // query param slug__ie + var qrSlugIe string + + if o.SlugIe != nil { + qrSlugIe = *o.SlugIe + } + qSlugIe := qrSlugIe + if qSlugIe != "" { + + if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { + return err + } + } + } + + if o.SlugIew != nil { + + // query param slug__iew + var qrSlugIew string + + if o.SlugIew != nil { + qrSlugIew = *o.SlugIew + } + qSlugIew := qrSlugIew + if qSlugIew != "" { + + if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { + return err + } + } + } + + if o.SlugIsw != nil { + + // query param slug__isw + var qrSlugIsw string + + if o.SlugIsw != nil { + qrSlugIsw = *o.SlugIsw + } + qSlugIsw := qrSlugIsw + if qSlugIsw != "" { + + if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { + return err + } + } + } + + if o.Slugn != nil { + + // query param slug__n + var qrSlugn string + + if o.Slugn != nil { + qrSlugn = *o.Slugn + } + qSlugn := qrSlugn + if qSlugn != "" { + + if err := r.SetQueryParam("slug__n", qSlugn); err != nil { + return err + } + } + } + + if o.SlugNic != nil { + + // query param slug__nic + var qrSlugNic string + + if o.SlugNic != nil { + qrSlugNic = *o.SlugNic + } + qSlugNic := qrSlugNic + if qSlugNic != "" { + + if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { + return err + } + } + } + + if o.SlugNie != nil { + + // query param slug__nie + var qrSlugNie string + + if o.SlugNie != nil { + qrSlugNie = *o.SlugNie + } + qSlugNie := qrSlugNie + if qSlugNie != "" { + + if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { + return err + } + } + } + + if o.SlugNiew != nil { + + // query param slug__niew + var qrSlugNiew string + + if o.SlugNiew != nil { + qrSlugNiew = *o.SlugNiew + } + qSlugNiew := qrSlugNiew + if qSlugNiew != "" { + + if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { + return err + } + } + } + + if o.SlugNisw != nil { + + // query param slug__nisw + var qrSlugNisw string + + if o.SlugNisw != nil { + qrSlugNisw = *o.SlugNisw + } + qSlugNisw := qrSlugNisw + if qSlugNisw != "" { + + if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { + return err + } + } + } + + if o.Tag != nil { + + // query param tag + var qrTag string + + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + } + + if o.Tenant != nil { + + // query param tenant + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + + if o.Type != nil { + + // query param type + var qrType string + + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + } + + if o.Typen != nil { + + // query param type__n + var qrTypen string + + if o.Typen != nil { + qrTypen = *o.Typen + } + qTypen := qrTypen + if qTypen != "" { + + if err := r.SetQueryParam("type__n", qTypen); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_responses.go new file mode 100644 index 000000000..e83dfd03a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_list_responses.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsListReader is a Reader for the IpamL2vpnsList structure. +type IpamL2vpnsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsListOK creates a IpamL2vpnsListOK with default headers values +func NewIpamL2vpnsListOK() *IpamL2vpnsListOK { + return &IpamL2vpnsListOK{} +} + +/* +IpamL2vpnsListOK describes a response with status code 200, with default header values. + +IpamL2vpnsListOK ipam l2vpns list o k +*/ +type IpamL2vpnsListOK struct { + Payload *IpamL2vpnsListOKBody +} + +// IsSuccess returns true when this ipam l2vpns list o k response has a 2xx status code +func (o *IpamL2vpnsListOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns list o k response has a 3xx status code +func (o *IpamL2vpnsListOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns list o k response has a 4xx status code +func (o *IpamL2vpnsListOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns list o k response has a 5xx status code +func (o *IpamL2vpnsListOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns list o k response a status code equal to that given +func (o *IpamL2vpnsListOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/l2vpns/][%d] ipamL2vpnsListOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsListOK) String() string { + return fmt.Sprintf("[GET /ipam/l2vpns/][%d] ipamL2vpnsListOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsListOK) GetPayload() *IpamL2vpnsListOKBody { + return o.Payload +} + +func (o *IpamL2vpnsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamL2vpnsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +IpamL2vpnsListOKBody ipam l2vpns list o k body +swagger:model IpamL2vpnsListOKBody +*/ +type IpamL2vpnsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.L2VPN `json:"results"` +} + +// Validate validates this ipam l2vpns list o k body +func (o *IpamL2vpnsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamL2vpnsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamL2vpnsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamL2vpnsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamL2vpnsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamL2vpnsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamL2vpnsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamL2vpnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamL2vpnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam l2vpns list o k body based on the context it is used +func (o *IpamL2vpnsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamL2vpnsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamL2vpnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamL2vpnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamL2vpnsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamL2vpnsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamL2vpnsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_parameters.go new file mode 100644 index 000000000..9ce72a62a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnsPartialUpdateParams creates a new IpamL2vpnsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsPartialUpdateParams() *IpamL2vpnsPartialUpdateParams { + return &IpamL2vpnsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsPartialUpdateParamsWithTimeout creates a new IpamL2vpnsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnsPartialUpdateParams { + return &IpamL2vpnsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsPartialUpdateParamsWithContext creates a new IpamL2vpnsPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsPartialUpdateParamsWithContext(ctx context.Context) *IpamL2vpnsPartialUpdateParams { + return &IpamL2vpnsPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsPartialUpdateParamsWithHTTPClient creates a new IpamL2vpnsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnsPartialUpdateParams { + return &IpamL2vpnsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsPartialUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsPartialUpdateParams struct { + + // Data. + Data *models.WritableL2VPN + + /* ID. + + A unique integer value identifying this L2VPN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsPartialUpdateParams) WithDefaults() *IpamL2vpnsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) WithContext(ctx context.Context) *IpamL2vpnsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) WithData(data *models.WritableL2VPN) *IpamL2vpnsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) SetData(data *models.WritableL2VPN) { + o.Data = data +} + +// WithID adds the id to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) WithID(id int64) *IpamL2vpnsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpns partial update params +func (o *IpamL2vpnsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_responses.go new file mode 100644 index 000000000..cdb08213a --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_partial_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsPartialUpdateReader is a Reader for the IpamL2vpnsPartialUpdate structure. +type IpamL2vpnsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsPartialUpdateOK creates a IpamL2vpnsPartialUpdateOK with default headers values +func NewIpamL2vpnsPartialUpdateOK() *IpamL2vpnsPartialUpdateOK { + return &IpamL2vpnsPartialUpdateOK{} +} + +/* +IpamL2vpnsPartialUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnsPartialUpdateOK ipam l2vpns partial update o k +*/ +type IpamL2vpnsPartialUpdateOK struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns partial update o k response has a 2xx status code +func (o *IpamL2vpnsPartialUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns partial update o k response has a 3xx status code +func (o *IpamL2vpnsPartialUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns partial update o k response has a 4xx status code +func (o *IpamL2vpnsPartialUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns partial update o k response has a 5xx status code +func (o *IpamL2vpnsPartialUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns partial update o k response a status code equal to that given +func (o *IpamL2vpnsPartialUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/l2vpns/{id}/][%d] ipamL2vpnsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsPartialUpdateOK) String() string { + return fmt.Sprintf("[PATCH /ipam/l2vpns/{id}/][%d] ipamL2vpnsPartialUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsPartialUpdateOK) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_parameters.go new file mode 100644 index 000000000..e20f22cdc --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewIpamL2vpnsReadParams creates a new IpamL2vpnsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsReadParams() *IpamL2vpnsReadParams { + return &IpamL2vpnsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsReadParamsWithTimeout creates a new IpamL2vpnsReadParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsReadParamsWithTimeout(timeout time.Duration) *IpamL2vpnsReadParams { + return &IpamL2vpnsReadParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsReadParamsWithContext creates a new IpamL2vpnsReadParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsReadParamsWithContext(ctx context.Context) *IpamL2vpnsReadParams { + return &IpamL2vpnsReadParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsReadParamsWithHTTPClient creates a new IpamL2vpnsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsReadParamsWithHTTPClient(client *http.Client) *IpamL2vpnsReadParams { + return &IpamL2vpnsReadParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsReadParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns read operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsReadParams struct { + + /* ID. + + A unique integer value identifying this L2VPN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsReadParams) WithDefaults() *IpamL2vpnsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) WithTimeout(timeout time.Duration) *IpamL2vpnsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) WithContext(ctx context.Context) *IpamL2vpnsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) WithHTTPClient(client *http.Client) *IpamL2vpnsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) WithID(id int64) *IpamL2vpnsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpns read params +func (o *IpamL2vpnsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_responses.go new file mode 100644 index 000000000..b08a13cea --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_read_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsReadReader is a Reader for the IpamL2vpnsRead structure. +type IpamL2vpnsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsReadOK creates a IpamL2vpnsReadOK with default headers values +func NewIpamL2vpnsReadOK() *IpamL2vpnsReadOK { + return &IpamL2vpnsReadOK{} +} + +/* +IpamL2vpnsReadOK describes a response with status code 200, with default header values. + +IpamL2vpnsReadOK ipam l2vpns read o k +*/ +type IpamL2vpnsReadOK struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns read o k response has a 2xx status code +func (o *IpamL2vpnsReadOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns read o k response has a 3xx status code +func (o *IpamL2vpnsReadOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns read o k response has a 4xx status code +func (o *IpamL2vpnsReadOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns read o k response has a 5xx status code +func (o *IpamL2vpnsReadOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns read o k response a status code equal to that given +func (o *IpamL2vpnsReadOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/l2vpns/{id}/][%d] ipamL2vpnsReadOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsReadOK) String() string { + return fmt.Sprintf("[GET /ipam/l2vpns/{id}/][%d] ipamL2vpnsReadOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsReadOK) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_parameters.go new file mode 100644 index 000000000..43df540eb --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_parameters.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// NewIpamL2vpnsUpdateParams creates a new IpamL2vpnsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamL2vpnsUpdateParams() *IpamL2vpnsUpdateParams { + return &IpamL2vpnsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamL2vpnsUpdateParamsWithTimeout creates a new IpamL2vpnsUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamL2vpnsUpdateParamsWithTimeout(timeout time.Duration) *IpamL2vpnsUpdateParams { + return &IpamL2vpnsUpdateParams{ + timeout: timeout, + } +} + +// NewIpamL2vpnsUpdateParamsWithContext creates a new IpamL2vpnsUpdateParams object +// with the ability to set a context for a request. +func NewIpamL2vpnsUpdateParamsWithContext(ctx context.Context) *IpamL2vpnsUpdateParams { + return &IpamL2vpnsUpdateParams{ + Context: ctx, + } +} + +// NewIpamL2vpnsUpdateParamsWithHTTPClient creates a new IpamL2vpnsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamL2vpnsUpdateParamsWithHTTPClient(client *http.Client) *IpamL2vpnsUpdateParams { + return &IpamL2vpnsUpdateParams{ + HTTPClient: client, + } +} + +/* +IpamL2vpnsUpdateParams contains all the parameters to send to the API endpoint + + for the ipam l2vpns update operation. + + Typically these are written to a http.Request. +*/ +type IpamL2vpnsUpdateParams struct { + + // Data. + Data *models.WritableL2VPN + + /* ID. + + A unique integer value identifying this L2VPN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam l2vpns update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsUpdateParams) WithDefaults() *IpamL2vpnsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam l2vpns update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamL2vpnsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) WithTimeout(timeout time.Duration) *IpamL2vpnsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) WithContext(ctx context.Context) *IpamL2vpnsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) WithHTTPClient(client *http.Client) *IpamL2vpnsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) WithData(data *models.WritableL2VPN) *IpamL2vpnsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) SetData(data *models.WritableL2VPN) { + o.Data = data +} + +// WithID adds the id to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) WithID(id int64) *IpamL2vpnsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam l2vpns update params +func (o *IpamL2vpnsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamL2vpnsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_responses.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_responses.go new file mode 100644 index 000000000..962f1a8c2 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_l2vpns_update_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/smutel/go-netbox/v3/netbox/models" +) + +// IpamL2vpnsUpdateReader is a Reader for the IpamL2vpnsUpdate structure. +type IpamL2vpnsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamL2vpnsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamL2vpnsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamL2vpnsUpdateOK creates a IpamL2vpnsUpdateOK with default headers values +func NewIpamL2vpnsUpdateOK() *IpamL2vpnsUpdateOK { + return &IpamL2vpnsUpdateOK{} +} + +/* +IpamL2vpnsUpdateOK describes a response with status code 200, with default header values. + +IpamL2vpnsUpdateOK ipam l2vpns update o k +*/ +type IpamL2vpnsUpdateOK struct { + Payload *models.L2VPN +} + +// IsSuccess returns true when this ipam l2vpns update o k response has a 2xx status code +func (o *IpamL2vpnsUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ipam l2vpns update o k response has a 3xx status code +func (o *IpamL2vpnsUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ipam l2vpns update o k response has a 4xx status code +func (o *IpamL2vpnsUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ipam l2vpns update o k response has a 5xx status code +func (o *IpamL2vpnsUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ipam l2vpns update o k response a status code equal to that given +func (o *IpamL2vpnsUpdateOK) IsCode(code int) bool { + return code == 200 +} + +func (o *IpamL2vpnsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/l2vpns/{id}/][%d] ipamL2vpnsUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsUpdateOK) String() string { + return fmt.Sprintf("[PUT /ipam/l2vpns/{id}/][%d] ipamL2vpnsUpdateOK %+v", 200, o.Payload) +} + +func (o *IpamL2vpnsUpdateOK) GetPayload() *models.L2VPN { + return o.Payload +} + +func (o *IpamL2vpnsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.L2VPN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_prefixes_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_prefixes_list_parameters.go index 89e86fe9f..c7b5fedd7 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_prefixes_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_prefixes_list_parameters.go @@ -101,12 +101,21 @@ type IpamPrefixesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Depth. Depth *string @@ -182,12 +191,21 @@ type IpamPrefixesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -212,6 +230,12 @@ type IpamPrefixesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Prefix. Prefix *string @@ -491,6 +515,17 @@ func (o *IpamPrefixesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreatedGt(createdGt *string) *IpamPrefixesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam prefixes list params func (o *IpamPrefixesListParams) WithCreatedGte(createdGte *string) *IpamPrefixesListParams { o.SetCreatedGte(createdGte) @@ -502,6 +537,17 @@ func (o *IpamPrefixesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreatedLt(createdLt *string) *IpamPrefixesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam prefixes list params func (o *IpamPrefixesListParams) WithCreatedLte(createdLte *string) *IpamPrefixesListParams { o.SetCreatedLte(createdLte) @@ -513,6 +559,17 @@ func (o *IpamPrefixesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithCreatedn(createdn *string) *IpamPrefixesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDepth adds the depth to the ipam prefixes list params func (o *IpamPrefixesListParams) WithDepth(depth *string) *IpamPrefixesListParams { o.SetDepth(depth) @@ -788,6 +845,17 @@ func (o *IpamPrefixesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamPrefixesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam prefixes list params func (o *IpamPrefixesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamPrefixesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -799,6 +867,17 @@ func (o *IpamPrefixesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamPrefixesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam prefixes list params func (o *IpamPrefixesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamPrefixesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -810,6 +889,17 @@ func (o *IpamPrefixesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamPrefixesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam prefixes list params func (o *IpamPrefixesListParams) WithLimit(limit *int64) *IpamPrefixesListParams { o.SetLimit(limit) @@ -876,6 +966,17 @@ func (o *IpamPrefixesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithOrdering(ordering *string) *IpamPrefixesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPrefix adds the prefix to the ipam prefixes list params func (o *IpamPrefixesListParams) WithPrefix(prefix *string) *IpamPrefixesListParams { o.SetPrefix(prefix) @@ -1526,6 +1627,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1543,6 +1661,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1560,6 +1695,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Depth != nil { // query param depth @@ -1985,6 +2137,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2002,6 +2171,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2019,6 +2205,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2121,6 +2324,23 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Prefix != nil { // query param prefix diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_rirs_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_rirs_list_parameters.go index 56cbc5768..13f9d2ad2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_rirs_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_rirs_list_parameters.go @@ -80,12 +80,21 @@ type IpamRirsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -140,12 +149,21 @@ type IpamRirsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -188,6 +206,12 @@ type IpamRirsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -291,6 +315,17 @@ func (o *IpamRirsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam rirs list params +func (o *IpamRirsListParams) WithCreatedGt(createdGt *string) *IpamRirsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam rirs list params +func (o *IpamRirsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam rirs list params func (o *IpamRirsListParams) WithCreatedGte(createdGte *string) *IpamRirsListParams { o.SetCreatedGte(createdGte) @@ -302,6 +337,17 @@ func (o *IpamRirsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam rirs list params +func (o *IpamRirsListParams) WithCreatedLt(createdLt *string) *IpamRirsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam rirs list params +func (o *IpamRirsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam rirs list params func (o *IpamRirsListParams) WithCreatedLte(createdLte *string) *IpamRirsListParams { o.SetCreatedLte(createdLte) @@ -313,6 +359,17 @@ func (o *IpamRirsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam rirs list params +func (o *IpamRirsListParams) WithCreatedn(createdn *string) *IpamRirsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam rirs list params +func (o *IpamRirsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam rirs list params func (o *IpamRirsListParams) WithDescription(description *string) *IpamRirsListParams { o.SetDescription(description) @@ -511,6 +568,17 @@ func (o *IpamRirsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam rirs list params +func (o *IpamRirsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamRirsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam rirs list params +func (o *IpamRirsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam rirs list params func (o *IpamRirsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamRirsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -522,6 +590,17 @@ func (o *IpamRirsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam rirs list params +func (o *IpamRirsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamRirsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam rirs list params +func (o *IpamRirsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam rirs list params func (o *IpamRirsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamRirsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -533,6 +612,17 @@ func (o *IpamRirsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam rirs list params +func (o *IpamRirsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamRirsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam rirs list params +func (o *IpamRirsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam rirs list params func (o *IpamRirsListParams) WithLimit(limit *int64) *IpamRirsListParams { o.SetLimit(limit) @@ -665,6 +755,17 @@ func (o *IpamRirsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam rirs list params +func (o *IpamRirsListParams) WithOrdering(ordering *string) *IpamRirsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam rirs list params +func (o *IpamRirsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam rirs list params func (o *IpamRirsListParams) WithQ(q *string) *IpamRirsListParams { o.SetQ(q) @@ -833,6 +934,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -850,6 +968,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -867,6 +1002,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1173,6 +1325,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1190,6 +1359,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1207,6 +1393,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1411,6 +1614,23 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_roles_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_roles_list_parameters.go index c64dbd83c..ff947a42c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_roles_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_roles_list_parameters.go @@ -80,12 +80,21 @@ type IpamRolesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type IpamRolesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type IpamRolesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -288,6 +312,17 @@ func (o *IpamRolesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam roles list params +func (o *IpamRolesListParams) WithCreatedGt(createdGt *string) *IpamRolesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam roles list params +func (o *IpamRolesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam roles list params func (o *IpamRolesListParams) WithCreatedGte(createdGte *string) *IpamRolesListParams { o.SetCreatedGte(createdGte) @@ -299,6 +334,17 @@ func (o *IpamRolesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam roles list params +func (o *IpamRolesListParams) WithCreatedLt(createdLt *string) *IpamRolesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam roles list params +func (o *IpamRolesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam roles list params func (o *IpamRolesListParams) WithCreatedLte(createdLte *string) *IpamRolesListParams { o.SetCreatedLte(createdLte) @@ -310,6 +356,17 @@ func (o *IpamRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam roles list params +func (o *IpamRolesListParams) WithCreatedn(createdn *string) *IpamRolesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam roles list params +func (o *IpamRolesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam roles list params func (o *IpamRolesListParams) WithDescription(description *string) *IpamRolesListParams { o.SetDescription(description) @@ -497,6 +554,17 @@ func (o *IpamRolesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam roles list params +func (o *IpamRolesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamRolesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam roles list params +func (o *IpamRolesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam roles list params func (o *IpamRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamRolesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -508,6 +576,17 @@ func (o *IpamRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam roles list params +func (o *IpamRolesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamRolesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam roles list params +func (o *IpamRolesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam roles list params func (o *IpamRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamRolesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -519,6 +598,17 @@ func (o *IpamRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam roles list params +func (o *IpamRolesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamRolesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam roles list params +func (o *IpamRolesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam roles list params func (o *IpamRolesListParams) WithLimit(limit *int64) *IpamRolesListParams { o.SetLimit(limit) @@ -651,6 +741,17 @@ func (o *IpamRolesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam roles list params +func (o *IpamRolesListParams) WithOrdering(ordering *string) *IpamRolesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam roles list params +func (o *IpamRolesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam roles list params func (o *IpamRolesListParams) WithQ(q *string) *IpamRolesListParams { o.SetQ(q) @@ -819,6 +920,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -836,6 +954,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -853,6 +988,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1142,6 +1294,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1159,6 +1328,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1176,6 +1362,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1380,6 +1583,23 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_route_targets_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_route_targets_list_parameters.go index bf05a1572..f9a1e41e2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_route_targets_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_route_targets_list_parameters.go @@ -80,12 +80,21 @@ type IpamRouteTargetsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -161,12 +170,21 @@ type IpamRouteTargetsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -209,6 +227,12 @@ type IpamRouteTargetsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -306,6 +330,17 @@ func (o *IpamRouteTargetsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithCreatedGt(createdGt *string) *IpamRouteTargetsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithCreatedGte(createdGte *string) *IpamRouteTargetsListParams { o.SetCreatedGte(createdGte) @@ -317,6 +352,17 @@ func (o *IpamRouteTargetsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithCreatedLt(createdLt *string) *IpamRouteTargetsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithCreatedLte(createdLte *string) *IpamRouteTargetsListParams { o.SetCreatedLte(createdLte) @@ -328,6 +374,17 @@ func (o *IpamRouteTargetsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithCreatedn(createdn *string) *IpamRouteTargetsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithDescription(description *string) *IpamRouteTargetsListParams { o.SetDescription(description) @@ -603,6 +660,17 @@ func (o *IpamRouteTargetsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamRouteTargetsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamRouteTargetsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -614,6 +682,17 @@ func (o *IpamRouteTargetsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamRouteTargetsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamRouteTargetsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -625,6 +704,17 @@ func (o *IpamRouteTargetsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamRouteTargetsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithLimit(limit *int64) *IpamRouteTargetsListParams { o.SetLimit(limit) @@ -757,6 +847,17 @@ func (o *IpamRouteTargetsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithOrdering(ordering *string) *IpamRouteTargetsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithQ(q *string) *IpamRouteTargetsListParams { o.SetQ(q) @@ -903,6 +1004,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -920,6 +1038,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -937,6 +1072,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1362,6 +1514,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1379,6 +1548,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1396,6 +1582,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1600,6 +1803,23 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_service_templates_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_service_templates_list_parameters.go index 6a3e996b3..3e8ca8a13 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_service_templates_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_service_templates_list_parameters.go @@ -80,12 +80,21 @@ type IpamServiceTemplatesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -107,12 +116,21 @@ type IpamServiceTemplatesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -155,6 +173,12 @@ type IpamServiceTemplatesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Port. Port *float64 @@ -237,6 +261,17 @@ func (o *IpamServiceTemplatesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreatedGt(createdGt *string) *IpamServiceTemplatesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithCreatedGte(createdGte *string) *IpamServiceTemplatesListParams { o.SetCreatedGte(createdGte) @@ -248,6 +283,17 @@ func (o *IpamServiceTemplatesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreatedLt(createdLt *string) *IpamServiceTemplatesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithCreatedLte(createdLte *string) *IpamServiceTemplatesListParams { o.SetCreatedLte(createdLte) @@ -259,6 +305,17 @@ func (o *IpamServiceTemplatesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreatedn(createdn *string) *IpamServiceTemplatesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithID(id *string) *IpamServiceTemplatesListParams { o.SetID(id) @@ -336,6 +393,17 @@ func (o *IpamServiceTemplatesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamServiceTemplatesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamServiceTemplatesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -347,6 +415,17 @@ func (o *IpamServiceTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamServiceTemplatesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamServiceTemplatesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -358,6 +437,17 @@ func (o *IpamServiceTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamServiceTemplatesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithLimit(limit *int64) *IpamServiceTemplatesListParams { o.SetLimit(limit) @@ -490,6 +580,17 @@ func (o *IpamServiceTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithOrdering(ordering *string) *IpamServiceTemplatesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPort adds the port to the ipam service templates list params func (o *IpamServiceTemplatesListParams) WithPort(port *float64) *IpamServiceTemplatesListParams { o.SetPort(port) @@ -581,6 +682,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -598,6 +716,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -615,6 +750,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -734,6 +886,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -751,6 +920,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -768,6 +954,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -972,6 +1175,23 @@ func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Port != nil { // query param port diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_services_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_services_list_parameters.go index 3f6a9b9cb..946709567 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_services_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_services_list_parameters.go @@ -80,12 +80,21 @@ type IpamServicesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -149,12 +158,21 @@ type IpamServicesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -197,6 +215,12 @@ type IpamServicesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Port. Port *float64 @@ -291,6 +315,17 @@ func (o *IpamServicesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam services list params +func (o *IpamServicesListParams) WithCreatedGt(createdGt *string) *IpamServicesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam services list params +func (o *IpamServicesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam services list params func (o *IpamServicesListParams) WithCreatedGte(createdGte *string) *IpamServicesListParams { o.SetCreatedGte(createdGte) @@ -302,6 +337,17 @@ func (o *IpamServicesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam services list params +func (o *IpamServicesListParams) WithCreatedLt(createdLt *string) *IpamServicesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam services list params +func (o *IpamServicesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam services list params func (o *IpamServicesListParams) WithCreatedLte(createdLte *string) *IpamServicesListParams { o.SetCreatedLte(createdLte) @@ -313,6 +359,17 @@ func (o *IpamServicesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam services list params +func (o *IpamServicesListParams) WithCreatedn(createdn *string) *IpamServicesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam services list params +func (o *IpamServicesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam services list params func (o *IpamServicesListParams) WithDescription(description *string) *IpamServicesListParams { o.SetDescription(description) @@ -544,6 +601,17 @@ func (o *IpamServicesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamServicesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam services list params func (o *IpamServicesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamServicesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -555,6 +623,17 @@ func (o *IpamServicesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamServicesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam services list params func (o *IpamServicesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamServicesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -566,6 +645,17 @@ func (o *IpamServicesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam services list params +func (o *IpamServicesListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamServicesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam services list params +func (o *IpamServicesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam services list params func (o *IpamServicesListParams) WithLimit(limit *int64) *IpamServicesListParams { o.SetLimit(limit) @@ -698,6 +788,17 @@ func (o *IpamServicesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam services list params +func (o *IpamServicesListParams) WithOrdering(ordering *string) *IpamServicesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam services list params +func (o *IpamServicesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPort adds the port to the ipam services list params func (o *IpamServicesListParams) WithPort(port *float64) *IpamServicesListParams { o.SetPort(port) @@ -833,6 +934,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -850,6 +968,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -867,6 +1002,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1224,6 +1376,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1241,6 +1410,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1258,6 +1444,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1462,6 +1665,23 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Port != nil { // query param port diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlan_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlan_groups_list_parameters.go index c02c56760..888ad29b4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlan_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlan_groups_list_parameters.go @@ -86,12 +86,21 @@ type IpamVlanGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -143,12 +152,21 @@ type IpamVlanGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -230,6 +248,12 @@ type IpamVlanGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -391,6 +415,17 @@ func (o *IpamVlanGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithCreatedGt(createdGt *string) *IpamVlanGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithCreatedGte(createdGte *string) *IpamVlanGroupsListParams { o.SetCreatedGte(createdGte) @@ -402,6 +437,17 @@ func (o *IpamVlanGroupsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithCreatedLt(createdLt *string) *IpamVlanGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithCreatedLte(createdLte *string) *IpamVlanGroupsListParams { o.SetCreatedLte(createdLte) @@ -413,6 +459,17 @@ func (o *IpamVlanGroupsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithCreatedn(createdn *string) *IpamVlanGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithDescription(description *string) *IpamVlanGroupsListParams { o.SetDescription(description) @@ -600,6 +657,17 @@ func (o *IpamVlanGroupsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamVlanGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamVlanGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -611,6 +679,17 @@ func (o *IpamVlanGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamVlanGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamVlanGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -622,6 +701,17 @@ func (o *IpamVlanGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamVlanGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithLimit(limit *int64) *IpamVlanGroupsListParams { o.SetLimit(limit) @@ -897,6 +987,17 @@ func (o *IpamVlanGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithOrdering(ordering *string) *IpamVlanGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithQ(q *string) *IpamVlanGroupsListParams { o.SetQ(q) @@ -1231,6 +1332,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1248,6 +1366,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1265,6 +1400,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1554,6 +1706,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1571,6 +1740,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1588,6 +1774,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2013,6 +2216,23 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlans_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlans_list_parameters.go index 08af9aaef..f52d783a6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlans_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vlans_list_parameters.go @@ -86,12 +86,21 @@ type IpamVlansListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type IpamVlansListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type IpamVlansListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -394,6 +418,17 @@ func (o *IpamVlansListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam vlans list params +func (o *IpamVlansListParams) WithCreatedGt(createdGt *string) *IpamVlansListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam vlans list params +func (o *IpamVlansListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam vlans list params func (o *IpamVlansListParams) WithCreatedGte(createdGte *string) *IpamVlansListParams { o.SetCreatedGte(createdGte) @@ -405,6 +440,17 @@ func (o *IpamVlansListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam vlans list params +func (o *IpamVlansListParams) WithCreatedLt(createdLt *string) *IpamVlansListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam vlans list params +func (o *IpamVlansListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam vlans list params func (o *IpamVlansListParams) WithCreatedLte(createdLte *string) *IpamVlansListParams { o.SetCreatedLte(createdLte) @@ -416,6 +462,17 @@ func (o *IpamVlansListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam vlans list params +func (o *IpamVlansListParams) WithCreatedn(createdn *string) *IpamVlansListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam vlans list params +func (o *IpamVlansListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam vlans list params func (o *IpamVlansListParams) WithDescription(description *string) *IpamVlansListParams { o.SetDescription(description) @@ -647,6 +704,17 @@ func (o *IpamVlansListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamVlansListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam vlans list params func (o *IpamVlansListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamVlansListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -658,6 +726,17 @@ func (o *IpamVlansListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamVlansListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam vlans list params func (o *IpamVlansListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamVlansListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -669,6 +748,17 @@ func (o *IpamVlansListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam vlans list params +func (o *IpamVlansListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamVlansListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam vlans list params +func (o *IpamVlansListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam vlans list params func (o *IpamVlansListParams) WithLimit(limit *int64) *IpamVlansListParams { o.SetLimit(limit) @@ -801,6 +891,17 @@ func (o *IpamVlansListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam vlans list params +func (o *IpamVlansListParams) WithOrdering(ordering *string) *IpamVlansListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam vlans list params +func (o *IpamVlansListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam vlans list params func (o *IpamVlansListParams) WithQ(q *string) *IpamVlansListParams { o.SetQ(q) @@ -1245,6 +1346,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1262,6 +1380,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1279,6 +1414,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1636,6 +1788,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1653,6 +1822,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1670,6 +1856,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1874,6 +2077,23 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vrfs_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vrfs_list_parameters.go index 085adb54a..db2d063e0 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vrfs_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/ipam/ipam_vrfs_list_parameters.go @@ -80,12 +80,21 @@ type IpamVrfsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -164,12 +173,21 @@ type IpamVrfsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -212,6 +230,12 @@ type IpamVrfsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -339,6 +363,17 @@ func (o *IpamVrfsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreatedGt(createdGt *string) *IpamVrfsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the ipam vrfs list params func (o *IpamVrfsListParams) WithCreatedGte(createdGte *string) *IpamVrfsListParams { o.SetCreatedGte(createdGte) @@ -350,6 +385,17 @@ func (o *IpamVrfsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreatedLt(createdLt *string) *IpamVrfsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the ipam vrfs list params func (o *IpamVrfsListParams) WithCreatedLte(createdLte *string) *IpamVrfsListParams { o.SetCreatedLte(createdLte) @@ -361,6 +407,17 @@ func (o *IpamVrfsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the ipam vrfs list params +func (o *IpamVrfsListParams) WithCreatedn(createdn *string) *IpamVrfsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the ipam vrfs list params +func (o *IpamVrfsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the ipam vrfs list params func (o *IpamVrfsListParams) WithDescription(description *string) *IpamVrfsListParams { o.SetDescription(description) @@ -647,6 +704,17 @@ func (o *IpamVrfsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *IpamVrfsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the ipam vrfs list params func (o *IpamVrfsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamVrfsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -658,6 +726,17 @@ func (o *IpamVrfsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *IpamVrfsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the ipam vrfs list params func (o *IpamVrfsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamVrfsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -669,6 +748,17 @@ func (o *IpamVrfsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the ipam vrfs list params +func (o *IpamVrfsListParams) WithLastUpdatedn(lastUpdatedn *string) *IpamVrfsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the ipam vrfs list params +func (o *IpamVrfsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the ipam vrfs list params func (o *IpamVrfsListParams) WithLimit(limit *int64) *IpamVrfsListParams { o.SetLimit(limit) @@ -801,6 +891,17 @@ func (o *IpamVrfsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the ipam vrfs list params +func (o *IpamVrfsListParams) WithOrdering(ordering *string) *IpamVrfsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the ipam vrfs list params +func (o *IpamVrfsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the ipam vrfs list params func (o *IpamVrfsListParams) WithQ(q *string) *IpamVrfsListParams { o.SetQ(q) @@ -1057,6 +1158,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1074,6 +1192,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1091,6 +1226,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1533,6 +1685,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1550,6 +1719,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1567,6 +1753,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1771,6 +1974,23 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_client.go index 3ea42964e..18ac90265 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_client.go @@ -352,7 +352,7 @@ func (a *Client) TenancyContactAssignmentsDelete(params *TenancyContactAssignmen } /* -TenancyContactAssignmentsList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyContactAssignmentsList tenancy contact assignments list API */ func (a *Client) TenancyContactAssignmentsList(params *TenancyContactAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsListOK, error) { // TODO: Validate the params before sending @@ -703,7 +703,7 @@ func (a *Client) TenancyContactGroupsDelete(params *TenancyContactGroupsDeletePa } /* -TenancyContactGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyContactGroupsList tenancy contact groups list API */ func (a *Client) TenancyContactGroupsList(params *TenancyContactGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsListOK, error) { // TODO: Validate the params before sending @@ -1054,7 +1054,7 @@ func (a *Client) TenancyContactRolesDelete(params *TenancyContactRolesDeletePara } /* -TenancyContactRolesList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyContactRolesList tenancy contact roles list API */ func (a *Client) TenancyContactRolesList(params *TenancyContactRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesListOK, error) { // TODO: Validate the params before sending @@ -1405,7 +1405,7 @@ func (a *Client) TenancyContactsDelete(params *TenancyContactsDeleteParams, auth } /* -TenancyContactsList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyContactsList tenancy contacts list API */ func (a *Client) TenancyContactsList(params *TenancyContactsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsListOK, error) { // TODO: Validate the params before sending @@ -1756,7 +1756,7 @@ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeletePara } /* -TenancyTenantGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyTenantGroupsList tenancy tenant groups list API */ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsListOK, error) { // TODO: Validate the params before sending @@ -2107,7 +2107,7 @@ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authIn } /* -TenancyTenantsList Overrides ListModelMixin to allow processing ExportTemplates. +TenancyTenantsList tenancy tenants list API */ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantsListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go index a061184e2..3f637eb3a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go @@ -98,12 +98,21 @@ type TenancyContactAssignmentsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // ID. ID *string @@ -125,12 +134,21 @@ type TenancyContactAssignmentsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -161,6 +179,12 @@ type TenancyContactAssignmentsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Priority. Priority *string @@ -309,6 +333,17 @@ func (o *TenancyContactAssignmentsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreatedGt(createdGt *string) *TenancyContactAssignmentsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithCreatedGte(createdGte *string) *TenancyContactAssignmentsListParams { o.SetCreatedGte(createdGte) @@ -320,6 +355,17 @@ func (o *TenancyContactAssignmentsListParams) SetCreatedGte(createdGte *string) o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreatedLt(createdLt *string) *TenancyContactAssignmentsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithCreatedLte(createdLte *string) *TenancyContactAssignmentsListParams { o.SetCreatedLte(createdLte) @@ -331,6 +377,17 @@ func (o *TenancyContactAssignmentsListParams) SetCreatedLte(createdLte *string) o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreatedn(createdn *string) *TenancyContactAssignmentsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithID adds the id to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithID(id *string) *TenancyContactAssignmentsListParams { o.SetID(id) @@ -408,6 +465,17 @@ func (o *TenancyContactAssignmentsListParams) SetLastUpdated(lastUpdated *string o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactAssignmentsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -419,6 +487,17 @@ func (o *TenancyContactAssignmentsListParams) SetLastUpdatedGte(lastUpdatedGte * o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactAssignmentsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -430,6 +509,17 @@ func (o *TenancyContactAssignmentsListParams) SetLastUpdatedLte(lastUpdatedLte * o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithLimit(limit *int64) *TenancyContactAssignmentsListParams { o.SetLimit(limit) @@ -518,6 +608,17 @@ func (o *TenancyContactAssignmentsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithOrdering(ordering *string) *TenancyContactAssignmentsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPriority adds the priority to the tenancy contact assignments list params func (o *TenancyContactAssignmentsListParams) WithPriority(priority *string) *TenancyContactAssignmentsListParams { o.SetPriority(priority) @@ -711,6 +812,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -728,6 +846,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -745,6 +880,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -864,6 +1016,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -881,6 +1050,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -898,6 +1084,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1034,6 +1237,23 @@ func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientReq } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Priority != nil { // query param priority diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go index 545130c3e..9e223933b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go @@ -80,12 +80,21 @@ type TenancyContactGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type TenancyContactGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type TenancyContactGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -300,6 +324,17 @@ func (o *TenancyContactGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreatedGt(createdGt *string) *TenancyContactGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithCreatedGte(createdGte *string) *TenancyContactGroupsListParams { o.SetCreatedGte(createdGte) @@ -311,6 +346,17 @@ func (o *TenancyContactGroupsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreatedLt(createdLt *string) *TenancyContactGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithCreatedLte(createdLte *string) *TenancyContactGroupsListParams { o.SetCreatedLte(createdLte) @@ -322,6 +368,17 @@ func (o *TenancyContactGroupsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreatedn(createdn *string) *TenancyContactGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithDescription(description *string) *TenancyContactGroupsListParams { o.SetDescription(description) @@ -509,6 +566,17 @@ func (o *TenancyContactGroupsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyContactGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -520,6 +588,17 @@ func (o *TenancyContactGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyContactGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -531,6 +610,17 @@ func (o *TenancyContactGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyContactGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithLimit(limit *int64) *TenancyContactGroupsListParams { o.SetLimit(limit) @@ -663,6 +753,17 @@ func (o *TenancyContactGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithOrdering(ordering *string) *TenancyContactGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the tenancy contact groups list params func (o *TenancyContactGroupsListParams) WithParent(parent *string) *TenancyContactGroupsListParams { o.SetParent(parent) @@ -875,6 +976,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -892,6 +1010,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -909,6 +1044,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1198,6 +1350,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1215,6 +1384,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1232,6 +1418,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1436,6 +1639,23 @@ func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go index 5ccf6fcc4..82d6c9464 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go @@ -80,12 +80,21 @@ type TenancyContactRolesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type TenancyContactRolesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type TenancyContactRolesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -288,6 +312,17 @@ func (o *TenancyContactRolesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreatedGt(createdGt *string) *TenancyContactRolesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithCreatedGte(createdGte *string) *TenancyContactRolesListParams { o.SetCreatedGte(createdGte) @@ -299,6 +334,17 @@ func (o *TenancyContactRolesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreatedLt(createdLt *string) *TenancyContactRolesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithCreatedLte(createdLte *string) *TenancyContactRolesListParams { o.SetCreatedLte(createdLte) @@ -310,6 +356,17 @@ func (o *TenancyContactRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreatedn(createdn *string) *TenancyContactRolesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithDescription(description *string) *TenancyContactRolesListParams { o.SetDescription(description) @@ -497,6 +554,17 @@ func (o *TenancyContactRolesListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyContactRolesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactRolesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -508,6 +576,17 @@ func (o *TenancyContactRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyContactRolesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactRolesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -519,6 +598,17 @@ func (o *TenancyContactRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyContactRolesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithLimit(limit *int64) *TenancyContactRolesListParams { o.SetLimit(limit) @@ -651,6 +741,17 @@ func (o *TenancyContactRolesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithOrdering(ordering *string) *TenancyContactRolesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the tenancy contact roles list params func (o *TenancyContactRolesListParams) WithQ(q *string) *TenancyContactRolesListParams { o.SetQ(q) @@ -819,6 +920,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -836,6 +954,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -853,6 +988,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1142,6 +1294,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1159,6 +1328,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1176,6 +1362,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1380,6 +1583,23 @@ func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contacts_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contacts_list_parameters.go index 3021e742f..febfc995f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contacts_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_contacts_list_parameters.go @@ -110,12 +110,21 @@ type TenancyContactsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Email. Email *string @@ -179,12 +188,21 @@ type TenancyContactsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -257,6 +275,12 @@ type TenancyContactsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Phone. Phone *string @@ -500,6 +524,17 @@ func (o *TenancyContactsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreatedGt(createdGt *string) *TenancyContactsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy contacts list params func (o *TenancyContactsListParams) WithCreatedGte(createdGte *string) *TenancyContactsListParams { o.SetCreatedGte(createdGte) @@ -511,6 +546,17 @@ func (o *TenancyContactsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreatedLt(createdLt *string) *TenancyContactsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy contacts list params func (o *TenancyContactsListParams) WithCreatedLte(createdLte *string) *TenancyContactsListParams { o.SetCreatedLte(createdLte) @@ -522,6 +568,17 @@ func (o *TenancyContactsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreatedn(createdn *string) *TenancyContactsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithEmail adds the email to the tenancy contacts list params func (o *TenancyContactsListParams) WithEmail(email *string) *TenancyContactsListParams { o.SetEmail(email) @@ -753,6 +810,17 @@ func (o *TenancyContactsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyContactsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contacts list params func (o *TenancyContactsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -764,6 +832,17 @@ func (o *TenancyContactsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyContactsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contacts list params func (o *TenancyContactsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -775,6 +854,17 @@ func (o *TenancyContactsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyContactsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy contacts list params func (o *TenancyContactsListParams) WithLimit(limit *int64) *TenancyContactsListParams { o.SetLimit(limit) @@ -1017,6 +1107,17 @@ func (o *TenancyContactsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy contacts list params +func (o *TenancyContactsListParams) WithOrdering(ordering *string) *TenancyContactsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy contacts list params +func (o *TenancyContactsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPhone adds the phone to the tenancy contacts list params func (o *TenancyContactsListParams) WithPhone(phone *string) *TenancyContactsListParams { o.SetPhone(phone) @@ -1465,6 +1566,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1482,6 +1600,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1499,6 +1634,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Email != nil { // query param email @@ -1856,6 +2008,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1873,6 +2042,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1890,6 +2076,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2264,6 +2467,23 @@ func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Phone != nil { // query param phone diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go index 9c8a6db7b..d7be94cfa 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go @@ -80,12 +80,21 @@ type TenancyTenantGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type TenancyTenantGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type TenancyTenantGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -300,6 +324,17 @@ func (o *TenancyTenantGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithCreatedGt(createdGt *string) *TenancyTenantGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithCreatedGte(createdGte *string) *TenancyTenantGroupsListParams { o.SetCreatedGte(createdGte) @@ -311,6 +346,17 @@ func (o *TenancyTenantGroupsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithCreatedLt(createdLt *string) *TenancyTenantGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithCreatedLte(createdLte *string) *TenancyTenantGroupsListParams { o.SetCreatedLte(createdLte) @@ -322,6 +368,17 @@ func (o *TenancyTenantGroupsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithCreatedn(createdn *string) *TenancyTenantGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithDescription(description *string) *TenancyTenantGroupsListParams { o.SetDescription(description) @@ -509,6 +566,17 @@ func (o *TenancyTenantGroupsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyTenantGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyTenantGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -520,6 +588,17 @@ func (o *TenancyTenantGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyTenantGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyTenantGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -531,6 +610,17 @@ func (o *TenancyTenantGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyTenantGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithLimit(limit *int64) *TenancyTenantGroupsListParams { o.SetLimit(limit) @@ -663,6 +753,17 @@ func (o *TenancyTenantGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithOrdering(ordering *string) *TenancyTenantGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithParent(parent *string) *TenancyTenantGroupsListParams { o.SetParent(parent) @@ -875,6 +976,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -892,6 +1010,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -909,6 +1044,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1198,6 +1350,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1215,6 +1384,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1232,6 +1418,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1436,6 +1639,23 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenants_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenants_list_parameters.go index e611a26bd..d5e3ec4c0 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenants_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/tenancy/tenancy_tenants_list_parameters.go @@ -98,12 +98,21 @@ type TenancyTenantsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -167,12 +176,21 @@ type TenancyTenantsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -215,6 +233,12 @@ type TenancyTenantsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -384,6 +408,17 @@ func (o *TenancyTenantsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreatedGt(createdGt *string) *TenancyTenantsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the tenancy tenants list params func (o *TenancyTenantsListParams) WithCreatedGte(createdGte *string) *TenancyTenantsListParams { o.SetCreatedGte(createdGte) @@ -395,6 +430,17 @@ func (o *TenancyTenantsListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreatedLt(createdLt *string) *TenancyTenantsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the tenancy tenants list params func (o *TenancyTenantsListParams) WithCreatedLte(createdLte *string) *TenancyTenantsListParams { o.SetCreatedLte(createdLte) @@ -406,6 +452,17 @@ func (o *TenancyTenantsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithCreatedn(createdn *string) *TenancyTenantsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the tenancy tenants list params func (o *TenancyTenantsListParams) WithDescription(description *string) *TenancyTenantsListParams { o.SetDescription(description) @@ -637,6 +694,17 @@ func (o *TenancyTenantsListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *TenancyTenantsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the tenancy tenants list params func (o *TenancyTenantsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyTenantsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -648,6 +716,17 @@ func (o *TenancyTenantsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *TenancyTenantsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the tenancy tenants list params func (o *TenancyTenantsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyTenantsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -659,6 +738,17 @@ func (o *TenancyTenantsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithLastUpdatedn(lastUpdatedn *string) *TenancyTenantsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the tenancy tenants list params func (o *TenancyTenantsListParams) WithLimit(limit *int64) *TenancyTenantsListParams { o.SetLimit(limit) @@ -791,6 +881,17 @@ func (o *TenancyTenantsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithOrdering(ordering *string) *TenancyTenantsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the tenancy tenants list params func (o *TenancyTenantsListParams) WithQ(q *string) *TenancyTenantsListParams { o.SetQ(q) @@ -1061,6 +1162,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1078,6 +1196,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1095,6 +1230,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1452,6 +1604,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1469,6 +1638,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1486,6 +1672,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1690,6 +1893,23 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_client.go index 9899e9909..89b36fbf2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_client.go @@ -359,7 +359,7 @@ func (a *Client) UsersGroupsDelete(params *UsersGroupsDeleteParams, authInfo run } /* -UsersGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +UsersGroupsList users groups list API */ func (a *Client) UsersGroupsList(params *UsersGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersGroupsListOK, error) { // TODO: Validate the params before sending @@ -710,7 +710,7 @@ func (a *Client) UsersPermissionsDelete(params *UsersPermissionsDeleteParams, au } /* -UsersPermissionsList Overrides ListModelMixin to allow processing ExportTemplates. +UsersPermissionsList users permissions list API */ func (a *Client) UsersPermissionsList(params *UsersPermissionsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersPermissionsListOK, error) { // TODO: Validate the params before sending @@ -1061,7 +1061,7 @@ func (a *Client) UsersTokensDelete(params *UsersTokensDeleteParams, authInfo run } /* -UsersTokensList Overrides ListModelMixin to allow processing ExportTemplates. +UsersTokensList users tokens list API */ func (a *Client) UsersTokensList(params *UsersTokensListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersTokensListOK, error) { // TODO: Validate the params before sending @@ -1451,7 +1451,7 @@ func (a *Client) UsersUsersDelete(params *UsersUsersDeleteParams, authInfo runti } /* -UsersUsersList Overrides ListModelMixin to allow processing ExportTemplates. +UsersUsersList users users list API */ func (a *Client) UsersUsersList(params *UsersUsersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UsersUsersListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_groups_list_parameters.go index 887b5ecf8..b47e76706 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_groups_list_parameters.go @@ -140,6 +140,12 @@ type UsersGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -405,6 +411,17 @@ func (o *UsersGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the users groups list params +func (o *UsersGroupsListParams) WithOrdering(ordering *string) *UsersGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the users groups list params +func (o *UsersGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the users groups list params func (o *UsersGroupsListParams) WithQ(q *string) *UsersGroupsListParams { o.SetQ(q) @@ -747,6 +764,23 @@ func (o *UsersGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_permissions_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_permissions_list_parameters.go index e5c79b270..4b09977a8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_permissions_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_permissions_list_parameters.go @@ -194,6 +194,12 @@ type UsersPermissionsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -669,6 +675,17 @@ func (o *UsersPermissionsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the users permissions list params +func (o *UsersPermissionsListParams) WithOrdering(ordering *string) *UsersPermissionsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the users permissions list params +func (o *UsersPermissionsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the users permissions list params func (o *UsersPermissionsListParams) WithQ(q *string) *UsersPermissionsListParams { o.SetQ(q) @@ -1361,6 +1378,23 @@ func (o *UsersPermissionsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_tokens_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_tokens_list_parameters.go index f4f8ae827..a5b3b1efc 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_tokens_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_tokens_list_parameters.go @@ -191,6 +191,12 @@ type UsersTokensListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -658,6 +664,17 @@ func (o *UsersTokensListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the users tokens list params +func (o *UsersTokensListParams) WithOrdering(ordering *string) *UsersTokensListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the users tokens list params +func (o *UsersTokensListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the users tokens list params func (o *UsersTokensListParams) WithQ(q *string) *UsersTokensListParams { o.SetQ(q) @@ -1344,6 +1361,23 @@ func (o *UsersTokensListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_users_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_users_list_parameters.go index 13b521963..9fe9ffb7f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_users_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/users/users_users_list_parameters.go @@ -224,6 +224,12 @@ type UsersUsersListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -830,6 +836,17 @@ func (o *UsersUsersListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the users users list params +func (o *UsersUsersListParams) WithOrdering(ordering *string) *UsersUsersListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the users users list params +func (o *UsersUsersListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the users users list params func (o *UsersUsersListParams) WithQ(q *string) *UsersUsersListParams { o.SetQ(q) @@ -1769,6 +1786,23 @@ func (o *UsersUsersListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_client.go index bf69fc465..d04008a7b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_client.go @@ -334,7 +334,7 @@ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationCluster } /* -VirtualizationClusterGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +VirtualizationClusterGroupsList virtualization cluster groups list API */ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClusterGroupsListOK, error) { // TODO: Validate the params before sending @@ -685,7 +685,7 @@ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterT } /* -VirtualizationClusterTypesList Overrides ListModelMixin to allow processing ExportTemplates. +VirtualizationClusterTypesList virtualization cluster types list API */ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClusterTypesListOK, error) { // TODO: Validate the params before sending @@ -1036,7 +1036,7 @@ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDele } /* -VirtualizationClustersList Overrides ListModelMixin to allow processing ExportTemplates. +VirtualizationClustersList virtualization clusters list API */ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationClustersListOK, error) { // TODO: Validate the params before sending @@ -1387,7 +1387,7 @@ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfaces } /* -VirtualizationInterfacesList Overrides ListModelMixin to allow processing ExportTemplates. +VirtualizationInterfacesList virtualization interfaces list API */ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationInterfacesListOK, error) { // TODO: Validate the params before sending @@ -1738,7 +1738,7 @@ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtu } /* -VirtualizationVirtualMachinesList Overrides ListModelMixin to allow processing ExportTemplates. +VirtualizationVirtualMachinesList virtualization virtual machines list API */ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtualMachinesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VirtualizationVirtualMachinesListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go index 903fbbca4..815951211 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go @@ -98,12 +98,21 @@ type VirtualizationClusterGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -155,12 +164,21 @@ type VirtualizationClusterGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -203,6 +221,12 @@ type VirtualizationClusterGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -372,6 +396,17 @@ func (o *VirtualizationClusterGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithCreatedGt(createdGt *string) *VirtualizationClusterGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithCreatedGte(createdGte *string) *VirtualizationClusterGroupsListParams { o.SetCreatedGte(createdGte) @@ -383,6 +418,17 @@ func (o *VirtualizationClusterGroupsListParams) SetCreatedGte(createdGte *string o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithCreatedLt(createdLt *string) *VirtualizationClusterGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithCreatedLte(createdLte *string) *VirtualizationClusterGroupsListParams { o.SetCreatedLte(createdLte) @@ -394,6 +440,17 @@ func (o *VirtualizationClusterGroupsListParams) SetCreatedLte(createdLte *string o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithCreatedn(createdn *string) *VirtualizationClusterGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithDescription(description *string) *VirtualizationClusterGroupsListParams { o.SetDescription(description) @@ -581,6 +638,17 @@ func (o *VirtualizationClusterGroupsListParams) SetLastUpdated(lastUpdated *stri o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *VirtualizationClusterGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationClusterGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -592,6 +660,17 @@ func (o *VirtualizationClusterGroupsListParams) SetLastUpdatedGte(lastUpdatedGte o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *VirtualizationClusterGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationClusterGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -603,6 +682,17 @@ func (o *VirtualizationClusterGroupsListParams) SetLastUpdatedLte(lastUpdatedLte o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *VirtualizationClusterGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithLimit(limit *int64) *VirtualizationClusterGroupsListParams { o.SetLimit(limit) @@ -735,6 +825,17 @@ func (o *VirtualizationClusterGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithOrdering(ordering *string) *VirtualizationClusterGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithQ(q *string) *VirtualizationClusterGroupsListParams { o.SetQ(q) @@ -1005,6 +1106,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1022,6 +1140,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1039,6 +1174,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1328,6 +1480,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1345,6 +1514,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1362,6 +1548,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1566,6 +1769,23 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go index 67809a2ee..cabd6e094 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go @@ -80,12 +80,21 @@ type VirtualizationClusterTypesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type VirtualizationClusterTypesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type VirtualizationClusterTypesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -288,6 +312,17 @@ func (o *VirtualizationClusterTypesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithCreatedGt(createdGt *string) *VirtualizationClusterTypesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithCreatedGte(createdGte *string) *VirtualizationClusterTypesListParams { o.SetCreatedGte(createdGte) @@ -299,6 +334,17 @@ func (o *VirtualizationClusterTypesListParams) SetCreatedGte(createdGte *string) o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithCreatedLt(createdLt *string) *VirtualizationClusterTypesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithCreatedLte(createdLte *string) *VirtualizationClusterTypesListParams { o.SetCreatedLte(createdLte) @@ -310,6 +356,17 @@ func (o *VirtualizationClusterTypesListParams) SetCreatedLte(createdLte *string) o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithCreatedn(createdn *string) *VirtualizationClusterTypesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithDescription(description *string) *VirtualizationClusterTypesListParams { o.SetDescription(description) @@ -497,6 +554,17 @@ func (o *VirtualizationClusterTypesListParams) SetLastUpdated(lastUpdated *strin o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *VirtualizationClusterTypesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationClusterTypesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -508,6 +576,17 @@ func (o *VirtualizationClusterTypesListParams) SetLastUpdatedGte(lastUpdatedGte o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *VirtualizationClusterTypesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationClusterTypesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -519,6 +598,17 @@ func (o *VirtualizationClusterTypesListParams) SetLastUpdatedLte(lastUpdatedLte o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithLastUpdatedn(lastUpdatedn *string) *VirtualizationClusterTypesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithLimit(limit *int64) *VirtualizationClusterTypesListParams { o.SetLimit(limit) @@ -651,6 +741,17 @@ func (o *VirtualizationClusterTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithOrdering(ordering *string) *VirtualizationClusterTypesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithQ(q *string) *VirtualizationClusterTypesListParams { o.SetQ(q) @@ -819,6 +920,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -836,6 +954,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -853,6 +988,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1142,6 +1294,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1159,6 +1328,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1176,6 +1362,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1380,6 +1583,23 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_clusters_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_clusters_list_parameters.go index f1763c03a..1ccd48001 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_clusters_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_clusters_list_parameters.go @@ -98,12 +98,21 @@ type VirtualizationClustersListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Group. Group *string @@ -137,12 +146,21 @@ type VirtualizationClustersListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type VirtualizationClustersListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -224,6 +248,12 @@ type VirtualizationClustersListParams struct { // SiteIDn. SiteIDn *string + // Status. + Status *string + + // Statusn. + Statusn *string + // Tag. Tag *string @@ -396,6 +426,17 @@ func (o *VirtualizationClustersListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreatedGt(createdGt *string) *VirtualizationClustersListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithCreatedGte(createdGte *string) *VirtualizationClustersListParams { o.SetCreatedGte(createdGte) @@ -407,6 +448,17 @@ func (o *VirtualizationClustersListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreatedLt(createdLt *string) *VirtualizationClustersListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithCreatedLte(createdLte *string) *VirtualizationClustersListParams { o.SetCreatedLte(createdLte) @@ -418,6 +470,17 @@ func (o *VirtualizationClustersListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithCreatedn(createdn *string) *VirtualizationClustersListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithGroup adds the group to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithGroup(group *string) *VirtualizationClustersListParams { o.SetGroup(group) @@ -539,6 +602,17 @@ func (o *VirtualizationClustersListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdatedGt(lastUpdatedGt *string) *VirtualizationClustersListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationClustersListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -550,6 +624,17 @@ func (o *VirtualizationClustersListParams) SetLastUpdatedGte(lastUpdatedGte *str o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdatedLt(lastUpdatedLt *string) *VirtualizationClustersListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationClustersListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -561,6 +646,17 @@ func (o *VirtualizationClustersListParams) SetLastUpdatedLte(lastUpdatedLte *str o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithLastUpdatedn(lastUpdatedn *string) *VirtualizationClustersListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithLimit(limit *int64) *VirtualizationClustersListParams { o.SetLimit(limit) @@ -693,6 +789,17 @@ func (o *VirtualizationClustersListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithOrdering(ordering *string) *VirtualizationClustersListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithQ(q *string) *VirtualizationClustersListParams { o.SetQ(q) @@ -836,6 +943,28 @@ func (o *VirtualizationClustersListParams) SetSiteIDn(siteIDn *string) { o.SiteIDn = siteIDn } +// WithStatus adds the status to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithStatus(status *string) *VirtualizationClustersListParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetStatus(status *string) { + o.Status = status +} + +// WithStatusn adds the statusn to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithStatusn(statusn *string) *VirtualizationClustersListParams { + o.SetStatusn(statusn) + return o +} + +// SetStatusn adds the statusN to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetStatusn(statusn *string) { + o.Statusn = statusn +} + // WithTag adds the tag to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithTag(tag *string) *VirtualizationClustersListParams { o.SetTag(tag) @@ -1117,6 +1246,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1134,6 +1280,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1151,6 +1314,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Group != nil { // query param group @@ -1338,6 +1518,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1355,6 +1552,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1372,6 +1586,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1576,6 +1807,23 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -1797,6 +2045,40 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } + if o.Status != nil { + + // query param status + var qrStatus string + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := qrStatus + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if o.Statusn != nil { + + // query param status__n + var qrStatusn string + + if o.Statusn != nil { + qrStatusn = *o.Statusn + } + qStatusn := qrStatusn + if qStatusn != "" { + + if err := r.SetQueryParam("status__n", qStatusn); err != nil { + return err + } + } + } + if o.Tag != nil { // query param tag diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_interfaces_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_interfaces_list_parameters.go index 242dd08ec..d164bed19 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_interfaces_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_interfaces_list_parameters.go @@ -98,12 +98,21 @@ type VirtualizationInterfacesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -158,12 +167,21 @@ type VirtualizationInterfacesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -254,6 +272,12 @@ type VirtualizationInterfacesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // ParentID. ParentID *string @@ -423,6 +447,17 @@ func (o *VirtualizationInterfacesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithCreatedGt(createdGt *string) *VirtualizationInterfacesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithCreatedGte(createdGte *string) *VirtualizationInterfacesListParams { o.SetCreatedGte(createdGte) @@ -434,6 +469,17 @@ func (o *VirtualizationInterfacesListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithCreatedLt(createdLt *string) *VirtualizationInterfacesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithCreatedLte(createdLte *string) *VirtualizationInterfacesListParams { o.SetCreatedLte(createdLte) @@ -445,6 +491,17 @@ func (o *VirtualizationInterfacesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithCreatedn(createdn *string) *VirtualizationInterfacesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithDescription(description *string) *VirtualizationInterfacesListParams { o.SetDescription(description) @@ -643,6 +700,17 @@ func (o *VirtualizationInterfacesListParams) SetLastUpdated(lastUpdated *string) o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *VirtualizationInterfacesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationInterfacesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -654,6 +722,17 @@ func (o *VirtualizationInterfacesListParams) SetLastUpdatedGte(lastUpdatedGte *s o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *VirtualizationInterfacesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationInterfacesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -665,6 +744,17 @@ func (o *VirtualizationInterfacesListParams) SetLastUpdatedLte(lastUpdatedLte *s o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithLastUpdatedn(lastUpdatedn *string) *VirtualizationInterfacesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithLimit(limit *int64) *VirtualizationInterfacesListParams { o.SetLimit(limit) @@ -973,6 +1063,17 @@ func (o *VirtualizationInterfacesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithOrdering(ordering *string) *VirtualizationInterfacesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParentID adds the parentID to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithParentID(parentID *string) *VirtualizationInterfacesListParams { o.SetParentID(parentID) @@ -1243,6 +1344,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1260,6 +1378,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1277,6 +1412,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1583,6 +1735,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1600,6 +1769,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1617,6 +1803,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2093,6 +2296,23 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.ParentID != nil { // query param parent_id diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go index 7958f3c87..8b048827f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go @@ -134,12 +134,33 @@ type VirtualizationVirtualMachinesListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + + // Device. + Device *string + + // Devicen. + Devicen *string + + // DeviceID. + DeviceID *string + + // DeviceIDn. + DeviceIDn *string + // Disk. Disk *string @@ -182,12 +203,21 @@ type VirtualizationVirtualMachinesListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -281,6 +311,12 @@ type VirtualizationVirtualMachinesListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Platform. Platform *string @@ -660,6 +696,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreatedGt(createdGt *string) *VirtualizationVirtualMachinesListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithCreatedGte(createdGte *string) *VirtualizationVirtualMachinesListParams { o.SetCreatedGte(createdGte) @@ -671,6 +718,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetCreatedGte(createdGte *stri o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreatedLt(createdLt *string) *VirtualizationVirtualMachinesListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithCreatedLte(createdLte *string) *VirtualizationVirtualMachinesListParams { o.SetCreatedLte(createdLte) @@ -682,6 +740,61 @@ func (o *VirtualizationVirtualMachinesListParams) SetCreatedLte(createdLte *stri o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithCreatedn(createdn *string) *VirtualizationVirtualMachinesListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + +// WithDevice adds the device to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithDevice(device *string) *VirtualizationVirtualMachinesListParams { + o.SetDevice(device) + return o +} + +// SetDevice adds the device to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetDevice(device *string) { + o.Device = device +} + +// WithDevicen adds the devicen to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithDevicen(devicen *string) *VirtualizationVirtualMachinesListParams { + o.SetDevicen(devicen) + return o +} + +// SetDevicen adds the deviceN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetDevicen(devicen *string) { + o.Devicen = devicen +} + +// WithDeviceID adds the deviceID to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithDeviceID(deviceID *string) *VirtualizationVirtualMachinesListParams { + o.SetDeviceID(deviceID) + return o +} + +// SetDeviceID adds the deviceId to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetDeviceID(deviceID *string) { + o.DeviceID = deviceID +} + +// WithDeviceIDn adds the deviceIDn to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithDeviceIDn(deviceIDn *string) *VirtualizationVirtualMachinesListParams { + o.SetDeviceIDn(deviceIDn) + return o +} + +// SetDeviceIDn adds the deviceIdN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetDeviceIDn(deviceIDn *string) { + o.DeviceIDn = deviceIDn +} + // WithDisk adds the disk to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithDisk(disk *string) *VirtualizationVirtualMachinesListParams { o.SetDisk(disk) @@ -836,6 +949,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetLastUpdated(lastUpdated *st o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedGt(lastUpdatedGt *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *VirtualizationVirtualMachinesListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -847,6 +971,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedGte(lastUpdatedG o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedLt(lastUpdatedLt *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *VirtualizationVirtualMachinesListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -858,6 +993,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedLte(lastUpdatedL o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithLastUpdatedn(lastUpdatedn *string) *VirtualizationVirtualMachinesListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithLimit(limit *int64) *VirtualizationVirtualMachinesListParams { o.SetLimit(limit) @@ -1177,6 +1323,17 @@ func (o *VirtualizationVirtualMachinesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithOrdering(ordering *string) *VirtualizationVirtualMachinesListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithPlatform adds the platform to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithPlatform(platform *string) *VirtualizationVirtualMachinesListParams { o.SetPlatform(platform) @@ -1937,6 +2094,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1954,6 +2128,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1971,6 +2162,91 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + + if o.Device != nil { + + // query param device + var qrDevice string + + if o.Device != nil { + qrDevice = *o.Device + } + qDevice := qrDevice + if qDevice != "" { + + if err := r.SetQueryParam("device", qDevice); err != nil { + return err + } + } + } + + if o.Devicen != nil { + + // query param device__n + var qrDevicen string + + if o.Devicen != nil { + qrDevicen = *o.Devicen + } + qDevicen := qrDevicen + if qDevicen != "" { + + if err := r.SetQueryParam("device__n", qDevicen); err != nil { + return err + } + } + } + + if o.DeviceID != nil { + + // query param device_id + var qrDeviceID string + + if o.DeviceID != nil { + qrDeviceID = *o.DeviceID + } + qDeviceID := qrDeviceID + if qDeviceID != "" { + + if err := r.SetQueryParam("device_id", qDeviceID); err != nil { + return err + } + } + } + + if o.DeviceIDn != nil { + + // query param device_id__n + var qrDeviceIDn string + + if o.DeviceIDn != nil { + qrDeviceIDn = *o.DeviceIDn + } + qDeviceIDn := qrDeviceIDn + if qDeviceIDn != "" { + + if err := r.SetQueryParam("device_id__n", qDeviceIDn); err != nil { + return err + } + } + } + if o.Disk != nil { // query param disk @@ -2209,6 +2485,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -2226,6 +2519,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -2243,6 +2553,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -2736,6 +3063,23 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Platform != nil { // query param platform diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_client.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_client.go index f96c4669b..34b451e1b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_client.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_client.go @@ -298,7 +298,7 @@ func (a *Client) WirelessWirelessLanGroupsDelete(params *WirelessWirelessLanGrou } /* -WirelessWirelessLanGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +WirelessWirelessLanGroupsList wireless wireless lan groups list API */ func (a *Client) WirelessWirelessLanGroupsList(params *WirelessWirelessLanGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsListOK, error) { // TODO: Validate the params before sending @@ -649,7 +649,7 @@ func (a *Client) WirelessWirelessLansDelete(params *WirelessWirelessLansDeletePa } /* -WirelessWirelessLansList Overrides ListModelMixin to allow processing ExportTemplates. +WirelessWirelessLansList wireless wireless lans list API */ func (a *Client) WirelessWirelessLansList(params *WirelessWirelessLansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansListOK, error) { // TODO: Validate the params before sending @@ -1000,7 +1000,7 @@ func (a *Client) WirelessWirelessLinksDelete(params *WirelessWirelessLinksDelete } /* -WirelessWirelessLinksList Overrides ListModelMixin to allow processing ExportTemplates. +WirelessWirelessLinksList wireless wireless links list API */ func (a *Client) WirelessWirelessLinksList(params *WirelessWirelessLinksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksListOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go index 81f588d6e..6cf5dfe1e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go @@ -80,12 +80,21 @@ type WirelessWirelessLanGroupsListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -137,12 +146,21 @@ type WirelessWirelessLanGroupsListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -185,6 +203,12 @@ type WirelessWirelessLanGroupsListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Parent. Parent *string @@ -300,6 +324,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreatedGt(createdGt *string) *WirelessWirelessLanGroupsListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLanGroupsListParams { o.SetCreatedGte(createdGte) @@ -311,6 +346,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetCreatedGte(createdGte *string) o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreatedLt(createdLt *string) *WirelessWirelessLanGroupsListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLanGroupsListParams { o.SetCreatedLte(createdLte) @@ -322,6 +368,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetCreatedLte(createdLte *string) o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreatedn(createdn *string) *WirelessWirelessLanGroupsListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithDescription(description *string) *WirelessWirelessLanGroupsListParams { o.SetDescription(description) @@ -509,6 +566,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetLastUpdated(lastUpdated *string o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedGt(lastUpdatedGt *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLanGroupsListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -520,6 +588,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedGte(lastUpdatedGte * o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedLt(lastUpdatedLt *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLanGroupsListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -531,6 +610,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedLte(lastUpdatedLte * o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedn(lastUpdatedn *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithLimit(limit *int64) *WirelessWirelessLanGroupsListParams { o.SetLimit(limit) @@ -663,6 +753,17 @@ func (o *WirelessWirelessLanGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithOrdering(ordering *string) *WirelessWirelessLanGroupsListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithParent adds the parent to the wireless wireless lan groups list params func (o *WirelessWirelessLanGroupsListParams) WithParent(parent *string) *WirelessWirelessLanGroupsListParams { o.SetParent(parent) @@ -875,6 +976,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -892,6 +1010,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -909,6 +1044,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1198,6 +1350,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1215,6 +1384,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1232,6 +1418,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1436,6 +1639,23 @@ func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientReq } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Parent != nil { // query param parent diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lans_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lans_list_parameters.go index 06bece998..77eade91d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lans_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_lans_list_parameters.go @@ -122,12 +122,21 @@ type WirelessWirelessLansListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -191,12 +200,21 @@ type WirelessWirelessLansListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -209,6 +227,12 @@ type WirelessWirelessLansListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -248,6 +272,30 @@ type WirelessWirelessLansListParams struct { // Tagn. Tagn *string + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + // VlanID. VlanID *string @@ -472,6 +520,17 @@ func (o *WirelessWirelessLansListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreatedGt(createdGt *string) *WirelessWirelessLansListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLansListParams { o.SetCreatedGte(createdGte) @@ -483,6 +542,17 @@ func (o *WirelessWirelessLansListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreatedLt(createdLt *string) *WirelessWirelessLansListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLansListParams { o.SetCreatedLte(createdLte) @@ -494,6 +564,17 @@ func (o *WirelessWirelessLansListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreatedn(createdn *string) *WirelessWirelessLansListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithDescription(description *string) *WirelessWirelessLansListParams { o.SetDescription(description) @@ -725,6 +806,17 @@ func (o *WirelessWirelessLansListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdatedGt(lastUpdatedGt *string) *WirelessWirelessLansListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLansListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -736,6 +828,17 @@ func (o *WirelessWirelessLansListParams) SetLastUpdatedGte(lastUpdatedGte *strin o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdatedLt(lastUpdatedLt *string) *WirelessWirelessLansListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLansListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -747,6 +850,17 @@ func (o *WirelessWirelessLansListParams) SetLastUpdatedLte(lastUpdatedLte *strin o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdatedn(lastUpdatedn *string) *WirelessWirelessLansListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithLimit(limit *int64) *WirelessWirelessLansListParams { o.SetLimit(limit) @@ -769,6 +883,17 @@ func (o *WirelessWirelessLansListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithOrdering(ordering *string) *WirelessWirelessLansListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithQ(q *string) *WirelessWirelessLansListParams { o.SetQ(q) @@ -912,6 +1037,94 @@ func (o *WirelessWirelessLansListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithTenant adds the tenant to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenant(tenant *string) *WirelessWirelessLansListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantn(tenantn *string) *WirelessWirelessLansListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantGroup(tenantGroup *string) *WirelessWirelessLansListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantGroupn(tenantGroupn *string) *WirelessWirelessLansListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantGroupID(tenantGroupID *string) *WirelessWirelessLansListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantGroupIDn(tenantGroupIDn *string) *WirelessWirelessLansListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantID(tenantID *string) *WirelessWirelessLansListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTenantIDn(tenantIDn *string) *WirelessWirelessLansListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + // WithVlanID adds the vlanID to the wireless wireless lans list params func (o *WirelessWirelessLansListParams) WithVlanID(vlanID *string) *WirelessWirelessLansListParams { o.SetVlanID(vlanID) @@ -1197,6 +1410,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1214,6 +1444,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1231,6 +1478,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1588,6 +1852,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1605,6 +1886,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1622,6 +1920,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1656,6 +1971,23 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -1877,6 +2209,142 @@ func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Tenant != nil { + + // query param tenant + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + if o.VlanID != nil { // query param vlan_id diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_links_list_parameters.go b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_links_list_parameters.go index 350846eab..083523d0f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_links_list_parameters.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/client/wireless/wireless_wireless_links_list_parameters.go @@ -122,12 +122,21 @@ type WirelessWirelessLinksListParams struct { // Created. Created *string + // CreatedGt. + CreatedGt *string + // CreatedGte. CreatedGte *string + // CreatedLt. + CreatedLt *string + // CreatedLte. CreatedLte *string + // Createdn. + Createdn *string + // Description. Description *string @@ -215,12 +224,21 @@ type WirelessWirelessLinksListParams struct { // LastUpdated. LastUpdated *string + // LastUpdatedGt. + LastUpdatedGt *string + // LastUpdatedGte. LastUpdatedGte *string + // LastUpdatedLt. + LastUpdatedLt *string + // LastUpdatedLte. LastUpdatedLte *string + // LastUpdatedn. + LastUpdatedn *string + /* Limit. Number of results to return per page. @@ -233,6 +251,12 @@ type WirelessWirelessLinksListParams struct { */ Offset *int64 + /* Ordering. + + Which field to use when ordering the results. + */ + Ordering *string + // Q. Q *string @@ -278,6 +302,30 @@ type WirelessWirelessLinksListParams struct { // Tagn. Tagn *string + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -496,6 +544,17 @@ func (o *WirelessWirelessLinksListParams) SetCreated(created *string) { o.Created = created } +// WithCreatedGt adds the createdGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreatedGt(createdGt *string) *WirelessWirelessLinksListParams { + o.SetCreatedGt(createdGt) + return o +} + +// SetCreatedGt adds the createdGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreatedGt(createdGt *string) { + o.CreatedGt = createdGt +} + // WithCreatedGte adds the createdGte to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLinksListParams { o.SetCreatedGte(createdGte) @@ -507,6 +566,17 @@ func (o *WirelessWirelessLinksListParams) SetCreatedGte(createdGte *string) { o.CreatedGte = createdGte } +// WithCreatedLt adds the createdLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreatedLt(createdLt *string) *WirelessWirelessLinksListParams { + o.SetCreatedLt(createdLt) + return o +} + +// SetCreatedLt adds the createdLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreatedLt(createdLt *string) { + o.CreatedLt = createdLt +} + // WithCreatedLte adds the createdLte to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLinksListParams { o.SetCreatedLte(createdLte) @@ -518,6 +588,17 @@ func (o *WirelessWirelessLinksListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithCreatedn adds the createdn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreatedn(createdn *string) *WirelessWirelessLinksListParams { + o.SetCreatedn(createdn) + return o +} + +// SetCreatedn adds the createdN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreatedn(createdn *string) { + o.Createdn = createdn +} + // WithDescription adds the description to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithDescription(description *string) *WirelessWirelessLinksListParams { o.SetDescription(description) @@ -837,6 +918,17 @@ func (o *WirelessWirelessLinksListParams) SetLastUpdated(lastUpdated *string) { o.LastUpdated = lastUpdated } +// WithLastUpdatedGt adds the lastUpdatedGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdatedGt(lastUpdatedGt *string) *WirelessWirelessLinksListParams { + o.SetLastUpdatedGt(lastUpdatedGt) + return o +} + +// SetLastUpdatedGt adds the lastUpdatedGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdatedGt(lastUpdatedGt *string) { + o.LastUpdatedGt = lastUpdatedGt +} + // WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLinksListParams { o.SetLastUpdatedGte(lastUpdatedGte) @@ -848,6 +940,17 @@ func (o *WirelessWirelessLinksListParams) SetLastUpdatedGte(lastUpdatedGte *stri o.LastUpdatedGte = lastUpdatedGte } +// WithLastUpdatedLt adds the lastUpdatedLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdatedLt(lastUpdatedLt *string) *WirelessWirelessLinksListParams { + o.SetLastUpdatedLt(lastUpdatedLt) + return o +} + +// SetLastUpdatedLt adds the lastUpdatedLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdatedLt(lastUpdatedLt *string) { + o.LastUpdatedLt = lastUpdatedLt +} + // WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLinksListParams { o.SetLastUpdatedLte(lastUpdatedLte) @@ -859,6 +962,17 @@ func (o *WirelessWirelessLinksListParams) SetLastUpdatedLte(lastUpdatedLte *stri o.LastUpdatedLte = lastUpdatedLte } +// WithLastUpdatedn adds the lastUpdatedn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdatedn(lastUpdatedn *string) *WirelessWirelessLinksListParams { + o.SetLastUpdatedn(lastUpdatedn) + return o +} + +// SetLastUpdatedn adds the lastUpdatedN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdatedn(lastUpdatedn *string) { + o.LastUpdatedn = lastUpdatedn +} + // WithLimit adds the limit to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithLimit(limit *int64) *WirelessWirelessLinksListParams { o.SetLimit(limit) @@ -881,6 +995,17 @@ func (o *WirelessWirelessLinksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithOrdering adds the ordering to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithOrdering(ordering *string) *WirelessWirelessLinksListParams { + o.SetOrdering(ordering) + return o +} + +// SetOrdering adds the ordering to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetOrdering(ordering *string) { + o.Ordering = ordering +} + // WithQ adds the q to the wireless wireless links list params func (o *WirelessWirelessLinksListParams) WithQ(q *string) *WirelessWirelessLinksListParams { o.SetQ(q) @@ -1046,6 +1171,94 @@ func (o *WirelessWirelessLinksListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithTenant adds the tenant to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenant(tenant *string) *WirelessWirelessLinksListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantn(tenantn *string) *WirelessWirelessLinksListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantGroup(tenantGroup *string) *WirelessWirelessLinksListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantGroupn(tenantGroupn *string) *WirelessWirelessLinksListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantGroupID(tenantGroupID *string) *WirelessWirelessLinksListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantGroupIDn(tenantGroupIDn *string) *WirelessWirelessLinksListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantID(tenantID *string) *WirelessWirelessLinksListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTenantIDn(tenantIDn *string) *WirelessWirelessLinksListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + // WriteToRequest writes these params to a swagger request func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1309,6 +1522,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.CreatedGt != nil { + + // query param created__gt + var qrCreatedGt string + + if o.CreatedGt != nil { + qrCreatedGt = *o.CreatedGt + } + qCreatedGt := qrCreatedGt + if qCreatedGt != "" { + + if err := r.SetQueryParam("created__gt", qCreatedGt); err != nil { + return err + } + } + } + if o.CreatedGte != nil { // query param created__gte @@ -1326,6 +1556,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.CreatedLt != nil { + + // query param created__lt + var qrCreatedLt string + + if o.CreatedLt != nil { + qrCreatedLt = *o.CreatedLt + } + qCreatedLt := qrCreatedLt + if qCreatedLt != "" { + + if err := r.SetQueryParam("created__lt", qCreatedLt); err != nil { + return err + } + } + } + if o.CreatedLte != nil { // query param created__lte @@ -1343,6 +1590,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Createdn != nil { + + // query param created__n + var qrCreatedn string + + if o.Createdn != nil { + qrCreatedn = *o.Createdn + } + qCreatedn := qrCreatedn + if qCreatedn != "" { + + if err := r.SetQueryParam("created__n", qCreatedn); err != nil { + return err + } + } + } + if o.Description != nil { // query param description @@ -1836,6 +2100,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedGt != nil { + + // query param last_updated__gt + var qrLastUpdatedGt string + + if o.LastUpdatedGt != nil { + qrLastUpdatedGt = *o.LastUpdatedGt + } + qLastUpdatedGt := qrLastUpdatedGt + if qLastUpdatedGt != "" { + + if err := r.SetQueryParam("last_updated__gt", qLastUpdatedGt); err != nil { + return err + } + } + } + if o.LastUpdatedGte != nil { // query param last_updated__gte @@ -1853,6 +2134,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedLt != nil { + + // query param last_updated__lt + var qrLastUpdatedLt string + + if o.LastUpdatedLt != nil { + qrLastUpdatedLt = *o.LastUpdatedLt + } + qLastUpdatedLt := qrLastUpdatedLt + if qLastUpdatedLt != "" { + + if err := r.SetQueryParam("last_updated__lt", qLastUpdatedLt); err != nil { + return err + } + } + } + if o.LastUpdatedLte != nil { // query param last_updated__lte @@ -1870,6 +2168,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.LastUpdatedn != nil { + + // query param last_updated__n + var qrLastUpdatedn string + + if o.LastUpdatedn != nil { + qrLastUpdatedn = *o.LastUpdatedn + } + qLastUpdatedn := qrLastUpdatedn + if qLastUpdatedn != "" { + + if err := r.SetQueryParam("last_updated__n", qLastUpdatedn); err != nil { + return err + } + } + } + if o.Limit != nil { // query param limit @@ -1904,6 +2219,23 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Ordering != nil { + + // query param ordering + var qrOrdering string + + if o.Ordering != nil { + qrOrdering = *o.Ordering + } + qOrdering := qrOrdering + if qOrdering != "" { + + if err := r.SetQueryParam("ordering", qOrdering); err != nil { + return err + } + } + } + if o.Q != nil { // query param q @@ -2159,6 +2491,142 @@ func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Tenant != nil { + + // query param tenant + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/a_s_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/a_s_n.go index f511470d0..a1a815b87 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/a_s_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/a_s_n.go @@ -46,7 +46,7 @@ type ASN struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type ASN struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Provider count // Read Only: true @@ -301,7 +301,7 @@ func (m *ASN) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *ASN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -328,7 +328,7 @@ func (m *ASN) contextValidateID(ctx context.Context, formats strfmt.Registry) er func (m *ASN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/aggregate.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/aggregate.go index cc887f125..de90498da 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/aggregate.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/aggregate.go @@ -39,7 +39,7 @@ type Aggregate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type Aggregate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Prefix // Required: true @@ -339,7 +339,7 @@ func (m *Aggregate) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *Aggregate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -382,7 +382,7 @@ func (m *Aggregate) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *Aggregate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable.go index 850ae4d39..746eae033 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable.go @@ -36,6 +36,12 @@ import ( // swagger:model Cable type Cable struct { + // a terminations + ATerminations []*GenericObject `json:"a_terminations"` + + // b terminations + BTerminations []*GenericObject `json:"b_terminations"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -44,7 +50,7 @@ type Cable struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +70,7 @@ type Cable struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Length Length *float64 `json:"length,omitempty"` @@ -81,34 +87,6 @@ type Cable struct { // tenant Tenant *NestedTenant `json:"tenant,omitempty"` - // Termination a - // Read Only: true - Terminationa map[string]*string `json:"termination_a,omitempty"` - - // Termination a id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - TerminationaID *int64 `json:"termination_a_id"` - - // Termination a type - // Required: true - TerminationaType *string `json:"termination_a_type"` - - // Termination b - // Read Only: true - Terminationb map[string]*string `json:"termination_b,omitempty"` - - // Termination b id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - TerminationbID *int64 `json:"termination_b_id"` - - // Termination b type - // Required: true - TerminationbType *string `json:"termination_b_type"` - // Type // Enum: [cat3 cat5 cat5e cat6 cat6a cat7 cat7a cat8 dac-active dac-passive mrj21-trunk coaxial mmf mmf-om1 mmf-om2 mmf-om3 mmf-om4 mmf-om5 smf smf-os1 smf-os2 aoc power] Type string `json:"type,omitempty"` @@ -123,6 +101,14 @@ type Cable struct { func (m *Cable) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateATerminations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBTerminations(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -155,33 +141,69 @@ func (m *Cable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTerminationaID(formats); err != nil { + if err := m.validateType(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationaType(formats); err != nil { + if err := m.validateURL(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationbID(formats); err != nil { - res = append(res, err) + if len(res) > 0 { + return errors.CompositeValidationError(res...) } + return nil +} - if err := m.validateTerminationbType(formats); err != nil { - res = append(res, err) +func (m *Cable) validateATerminations(formats strfmt.Registry) error { + if swag.IsZero(m.ATerminations) { // not required + return nil } - if err := m.validateType(formats); err != nil { - res = append(res, err) + for i := 0; i < len(m.ATerminations); i++ { + if swag.IsZero(m.ATerminations[i]) { // not required + continue + } + + if m.ATerminations[i] != nil { + if err := m.ATerminations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + } - if err := m.validateURL(formats); err != nil { - res = append(res, err) + return nil +} + +func (m *Cable) validateBTerminations(formats strfmt.Registry) error { + if swag.IsZero(m.BTerminations) { // not required + return nil } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + for i := 0; i < len(m.BTerminations); i++ { + if swag.IsZero(m.BTerminations[i]) { // not required + continue + } + + if m.BTerminations[i] != nil { + if err := m.BTerminations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + } + return nil } @@ -320,58 +342,6 @@ func (m *Cable) validateTenant(formats strfmt.Registry) error { return nil } -func (m *Cable) validateTerminationaID(formats strfmt.Registry) error { - - if err := validate.Required("termination_a_id", "body", m.TerminationaID); err != nil { - return err - } - - if err := validate.MinimumInt("termination_a_id", "body", *m.TerminationaID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 2.147483647e+09, false); err != nil { - return err - } - - return nil -} - -func (m *Cable) validateTerminationaType(formats strfmt.Registry) error { - - if err := validate.Required("termination_a_type", "body", m.TerminationaType); err != nil { - return err - } - - return nil -} - -func (m *Cable) validateTerminationbID(formats strfmt.Registry) error { - - if err := validate.Required("termination_b_id", "body", m.TerminationbID); err != nil { - return err - } - - if err := validate.MinimumInt("termination_b_id", "body", *m.TerminationbID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 2.147483647e+09, false); err != nil { - return err - } - - return nil -} - -func (m *Cable) validateTerminationbType(formats strfmt.Registry) error { - - if err := validate.Required("termination_b_type", "body", m.TerminationbType); err != nil { - return err - } - - return nil -} - var cableTypeTypePropEnum []interface{} func init() { @@ -493,6 +463,14 @@ func (m *Cable) validateURL(formats strfmt.Registry) error { func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateATerminations(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateBTerminations(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -525,27 +503,59 @@ func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) er res = append(res, err) } - if err := m.contextValidateTerminationa(ctx, formats); err != nil { + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerminationb(ctx, formats); err != nil { - res = append(res, err) + if len(res) > 0 { + return errors.CompositeValidationError(res...) } + return nil +} + +func (m *Cable) contextValidateATerminations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ATerminations); i++ { + + if m.ATerminations[i] != nil { + if err := m.ATerminations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } - if err := m.contextValidateURL(ctx, formats); err != nil { - res = append(res, err) } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + return nil +} + +func (m *Cable) contextValidateBTerminations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.BTerminations); i++ { + + if m.BTerminations[i] != nil { + if err := m.BTerminations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + } + return nil } func (m *Cable) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -572,7 +582,7 @@ func (m *Cable) contextValidateID(ctx context.Context, formats strfmt.Registry) func (m *Cable) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -647,16 +657,6 @@ func (m *Cable) contextValidateTenant(ctx context.Context, formats strfmt.Regist return nil } -func (m *Cable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *Cable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *Cable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable_termination.go new file mode 100644 index 000000000..92a3cbc0c --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cable_termination.go @@ -0,0 +1,260 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// CableTermination cable termination +// +// swagger:model CableTermination +type CableTermination struct { + + // Cable + // Required: true + Cable *int64 `json:"cable"` + + // End + // Required: true + // Enum: [A B] + CableEnd *string `json:"cable_end"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Termination + // Read Only: true + Termination interface{} `json:"termination,omitempty"` + + // Termination id + // Required: true + // Maximum: 2.147483647e+09 + // Minimum: 0 + TerminationID *int64 `json:"termination_id"` + + // Termination type + // Required: true + TerminationType *string `json:"termination_type"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this cable termination +func (m *CableTermination) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCable(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTerminationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTerminationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CableTermination) validateCable(formats strfmt.Registry) error { + + if err := validate.Required("cable", "body", m.Cable); err != nil { + return err + } + + return nil +} + +var cableTerminationTypeCableEndPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["A","B"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cableTerminationTypeCableEndPropEnum = append(cableTerminationTypeCableEndPropEnum, v) + } +} + +const ( + + // CableTerminationCableEndA captures enum value "A" + CableTerminationCableEndA string = "A" + + // CableTerminationCableEndB captures enum value "B" + CableTerminationCableEndB string = "B" +) + +// prop value enum +func (m *CableTermination) validateCableEndEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, cableTerminationTypeCableEndPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *CableTermination) validateCableEnd(formats strfmt.Registry) error { + + if err := validate.Required("cable_end", "body", m.CableEnd); err != nil { + return err + } + + // value enum + if err := m.validateCableEndEnum("cable_end", "body", *m.CableEnd); err != nil { + return err + } + + return nil +} + +func (m *CableTermination) validateTerminationID(formats strfmt.Registry) error { + + if err := validate.Required("termination_id", "body", m.TerminationID); err != nil { + return err + } + + if err := validate.MinimumInt("termination_id", "body", *m.TerminationID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("termination_id", "body", *m.TerminationID, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *CableTermination) validateTerminationType(formats strfmt.Registry) error { + + if err := validate.Required("termination_type", "body", m.TerminationType); err != nil { + return err + } + + return nil +} + +func (m *CableTermination) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this cable termination based on the context it is used +func (m *CableTermination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CableTermination) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *CableTermination) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *CableTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CableTermination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CableTermination) UnmarshalBinary(b []byte) error { + var res CableTermination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit.go index 642b8a326..6d1ce8002 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit.go @@ -53,7 +53,7 @@ type Circuit struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,14 +70,14 @@ type Circuit struct { // Read Only: true ID int64 `json:"id,omitempty"` - // Date installed + // Installed // Format: date InstallDate *strfmt.Date `json:"install_date,omitempty"` // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // provider // Required: true @@ -95,6 +95,10 @@ type Circuit struct { // termination a Terminationa *CircuitCircuitTermination `json:"termination_a,omitempty"` + // Terminates + // Format: date + TerminationDate *strfmt.Date `json:"termination_date,omitempty"` + // termination z Terminationz *CircuitCircuitTermination `json:"termination_z,omitempty"` @@ -156,6 +160,10 @@ func (m *Circuit) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTerminationDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateTerminationz(formats); err != nil { res = append(res, err) } @@ -358,6 +366,18 @@ func (m *Circuit) validateTerminationa(formats strfmt.Registry) error { return nil } +func (m *Circuit) validateTerminationDate(formats strfmt.Registry) error { + if swag.IsZero(m.TerminationDate) { // not required + return nil + } + + if err := validate.FormatOf("termination_date", "body", "date", m.TerminationDate.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Circuit) validateTerminationz(formats strfmt.Registry) error { if swag.IsZero(m.Terminationz) { // not required return nil @@ -469,7 +489,7 @@ func (m *Circuit) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Circuit) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -496,7 +516,7 @@ func (m *Circuit) contextValidateID(ctx context.Context, formats strfmt.Registry func (m *Circuit) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_termination.go index 76b53e734..dd44c03b7 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_termination.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_termination.go @@ -23,6 +23,7 @@ package models import ( "context" "encoding/json" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,6 +43,11 @@ type CircuitTermination struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // circuit // Required: true Circuit *NestedCircuit `json:"circuit"` @@ -49,7 +55,10 @@ type CircuitTermination struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` // Description // Max Length: 200 @@ -66,19 +75,17 @@ type CircuitTermination struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -100,6 +107,9 @@ type CircuitTermination struct { // site Site *NestedSite `json:"site,omitempty"` + // tags + Tags []*NestedTag `json:"tags"` + // Termination // Required: true // Enum: [A Z] @@ -130,6 +140,10 @@ func (m *CircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCircuit(formats); err != nil { res = append(res, err) } @@ -162,6 +176,10 @@ func (m *CircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTermSide(formats); err != nil { res = append(res, err) } @@ -203,6 +221,18 @@ func (m *CircuitTermination) validateCable(formats strfmt.Registry) error { return nil } +func (m *CircuitTermination) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) validateCircuit(formats strfmt.Registry) error { if err := validate.Required("circuit", "body", m.Circuit); err != nil { @@ -325,6 +355,32 @@ func (m *CircuitTermination) validateSite(formats strfmt.Registry) error { return nil } +func (m *CircuitTermination) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + var circuitTerminationTypeTermSidePropEnum []interface{} func init() { @@ -420,6 +476,10 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCircuit(ctx, formats); err != nil { res = append(res, err) } @@ -440,11 +500,11 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -456,6 +516,10 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -491,6 +555,15 @@ func (m *CircuitTermination) contextValidateCable(ctx context.Context, formats s return nil } +func (m *CircuitTermination) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) contextValidateCircuit(ctx context.Context, formats strfmt.Registry) error { if m.Circuit != nil { @@ -509,7 +582,7 @@ func (m *CircuitTermination) contextValidateCircuit(ctx context.Context, formats func (m *CircuitTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -536,21 +609,25 @@ func (m *CircuitTermination) contextValidateID(ctx context.Context, formats strf func (m *CircuitTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *CircuitTermination) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *CircuitTermination) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *CircuitTermination) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *CircuitTermination) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } @@ -589,6 +666,26 @@ func (m *CircuitTermination) contextValidateSite(ctx context.Context, formats st return nil } +func (m *CircuitTermination) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *CircuitTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_type.go index cfbb8da09..76a7cf1a6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/circuit_type.go @@ -42,7 +42,7 @@ type CircuitType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type CircuitType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -285,7 +285,7 @@ func (m *CircuitType) contextValidateCircuitCount(ctx context.Context, formats s func (m *CircuitType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *CircuitType) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *CircuitType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster.go index d7ae3e107..7e59e8aa4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster.go @@ -22,6 +22,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -41,7 +42,7 @@ type Cluster struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +65,7 @@ type Cluster struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -75,6 +76,9 @@ type Cluster struct { // site Site *NestedSite `json:"site,omitempty"` + // status + Status *ClusterStatus `json:"status,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -119,6 +123,10 @@ func (m *Cluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -220,6 +228,25 @@ func (m *Cluster) validateSite(formats strfmt.Registry) error { return nil } +func (m *Cluster) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + func (m *Cluster) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -329,6 +356,10 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -357,7 +388,7 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Cluster) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -409,7 +440,7 @@ func (m *Cluster) contextValidateID(ctx context.Context, formats strfmt.Registry func (m *Cluster) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -432,6 +463,22 @@ func (m *Cluster) contextValidateSite(ctx context.Context, formats strfmt.Regist return nil } +func (m *Cluster) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + func (m *Cluster) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -519,3 +566,164 @@ func (m *Cluster) UnmarshalBinary(b []byte) error { *m = res return nil } + +// ClusterStatus Status +// +// swagger:model ClusterStatus +type ClusterStatus struct { + + // label + // Required: true + // Enum: [Planned Staging Active Decommissioning Offline] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [planned staging active decommissioning offline] + Value *string `json:"value"` +} + +// Validate validates this cluster status +func (m *ClusterStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var clusterStatusTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Planned","Staging","Active","Decommissioning","Offline"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + clusterStatusTypeLabelPropEnum = append(clusterStatusTypeLabelPropEnum, v) + } +} + +const ( + + // ClusterStatusLabelPlanned captures enum value "Planned" + ClusterStatusLabelPlanned string = "Planned" + + // ClusterStatusLabelStaging captures enum value "Staging" + ClusterStatusLabelStaging string = "Staging" + + // ClusterStatusLabelActive captures enum value "Active" + ClusterStatusLabelActive string = "Active" + + // ClusterStatusLabelDecommissioning captures enum value "Decommissioning" + ClusterStatusLabelDecommissioning string = "Decommissioning" + + // ClusterStatusLabelOffline captures enum value "Offline" + ClusterStatusLabelOffline string = "Offline" +) + +// prop value enum +func (m *ClusterStatus) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, clusterStatusTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ClusterStatus) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("status"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var clusterStatusTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["planned","staging","active","decommissioning","offline"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + clusterStatusTypeValuePropEnum = append(clusterStatusTypeValuePropEnum, v) + } +} + +const ( + + // ClusterStatusValuePlanned captures enum value "planned" + ClusterStatusValuePlanned string = "planned" + + // ClusterStatusValueStaging captures enum value "staging" + ClusterStatusValueStaging string = "staging" + + // ClusterStatusValueActive captures enum value "active" + ClusterStatusValueActive string = "active" + + // ClusterStatusValueDecommissioning captures enum value "decommissioning" + ClusterStatusValueDecommissioning string = "decommissioning" + + // ClusterStatusValueOffline captures enum value "offline" + ClusterStatusValueOffline string = "offline" +) + +// prop value enum +func (m *ClusterStatus) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, clusterStatusTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ClusterStatus) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("status"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this cluster status based on context it is used +func (m *ClusterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterStatus) UnmarshalBinary(b []byte) error { + var res ClusterStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_group.go index 2d9e9f266..e8c3dcb32 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_group.go @@ -42,7 +42,7 @@ type ClusterGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type ClusterGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -285,7 +285,7 @@ func (m *ClusterGroup) contextValidateClusterCount(ctx context.Context, formats func (m *ClusterGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *ClusterGroup) contextValidateID(ctx context.Context, formats strfmt.Reg func (m *ClusterGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_type.go index b7fe5002a..a4c152e56 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/cluster_type.go @@ -42,7 +42,7 @@ type ClusterType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type ClusterType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -285,7 +285,7 @@ func (m *ClusterType) contextValidateClusterCount(ctx context.Context, formats s func (m *ClusterType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *ClusterType) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *ClusterType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/config_context.go index 4ee2817a7..5981f1103 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/config_context.go @@ -50,11 +50,11 @@ type ConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Data // Required: true - Data *string `json:"data"` + Data interface{} `json:"data"` // Description // Max Length: 200 @@ -78,7 +78,11 @@ type ConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // locations + // Unique: true + Locations []*NestedLocation `json:"locations"` // Name // Required: true @@ -165,6 +169,10 @@ func (m *ConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLocations(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -319,8 +327,8 @@ func (m *ConfigContext) validateCreated(formats strfmt.Registry) error { func (m *ConfigContext) validateData(formats strfmt.Registry) error { - if err := validate.Required("data", "body", m.Data); err != nil { - return err + if m.Data == nil { + return errors.Required("data", "body", nil) } return nil @@ -380,6 +388,36 @@ func (m *ConfigContext) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *ConfigContext) validateLocations(formats strfmt.Registry) error { + if swag.IsZero(m.Locations) { // not required + return nil + } + + if err := validate.UniqueItems("locations", "body", m.Locations); err != nil { + return err + } + + for i := 0; i < len(m.Locations); i++ { + if swag.IsZero(m.Locations[i]) { // not required + continue + } + + if m.Locations[i] != nil { + if err := m.Locations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("locations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("locations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ConfigContext) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -558,7 +596,7 @@ func (m *ConfigContext) validateTags(formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { - if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", m.Tags[i], `^[-a-zA-Z0-9_]+$`); err != nil { + if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", m.Tags[i], `^[-\w]+$`); err != nil { return err } @@ -691,6 +729,10 @@ func (m *ConfigContext) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateLocations(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidatePlatforms(ctx, formats); err != nil { res = append(res, err) } @@ -791,7 +833,7 @@ func (m *ConfigContext) contextValidateClusters(ctx context.Context, formats str func (m *ConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -838,13 +880,33 @@ func (m *ConfigContext) contextValidateID(ctx context.Context, formats strfmt.Re func (m *ConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } +func (m *ConfigContext) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Locations); i++ { + + if m.Locations[i] != nil { + if err := m.Locations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("locations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("locations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ConfigContext) contextValidatePlatforms(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Platforms); i++ { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port.go index 71512f7e4..fcf4e606c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port.go @@ -43,26 +43,29 @@ type ConsolePort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,19 +95,17 @@ type ConsolePort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -143,6 +144,10 @@ func (m *ConsolePort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -212,6 +217,18 @@ func (m *ConsolePort) validateCable(formats strfmt.Registry) error { return nil } +func (m *ConsolePort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *ConsolePort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -404,15 +421,19 @@ func (m *ConsolePort) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -436,11 +457,11 @@ func (m *ConsolePort) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -495,23 +516,36 @@ func (m *ConsolePort) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *ConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsolePort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *ConsolePort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *ConsolePort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsolePort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *ConsolePort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsolePort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -520,7 +554,7 @@ func (m *ConsolePort) contextValidateConnectedEndpointType(ctx context.Context, func (m *ConsolePort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -563,21 +597,25 @@ func (m *ConsolePort) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *ConsolePort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *ConsolePort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsolePort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *ConsolePort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsolePort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port_template.go index ecf9898d0..23f490352 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_port_template.go @@ -38,7 +38,7 @@ type ConsolePortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type ConsolePortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module type ModuleType *NestedModuleType `json:"module_type,omitempty"` @@ -312,7 +312,7 @@ func (m *ConsolePortTemplate) ContextValidate(ctx context.Context, formats strfm func (m *ConsolePortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -355,7 +355,7 @@ func (m *ConsolePortTemplate) contextValidateID(ctx context.Context, formats str func (m *ConsolePortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port.go index 37b40e7a7..9b9e49aae 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port.go @@ -43,26 +43,29 @@ type ConsoleServerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,19 +95,17 @@ type ConsoleServerPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -143,6 +144,10 @@ func (m *ConsoleServerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -212,6 +217,18 @@ func (m *ConsoleServerPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *ConsoleServerPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *ConsoleServerPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -404,15 +421,19 @@ func (m *ConsoleServerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -436,11 +457,11 @@ func (m *ConsoleServerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -495,23 +516,36 @@ func (m *ConsoleServerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *ConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsoleServerPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *ConsoleServerPort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *ConsoleServerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsoleServerPort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *ConsoleServerPort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsoleServerPort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -520,7 +554,7 @@ func (m *ConsoleServerPort) contextValidateConnectedEndpointType(ctx context.Con func (m *ConsoleServerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -563,21 +597,25 @@ func (m *ConsoleServerPort) contextValidateID(ctx context.Context, formats strfm func (m *ConsoleServerPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *ConsoleServerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsoleServerPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *ConsoleServerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *ConsoleServerPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port_template.go index fd7f43fad..b06d23115 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/console_server_port_template.go @@ -38,7 +38,7 @@ type ConsoleServerPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type ConsoleServerPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module type ModuleType *NestedModuleType `json:"module_type,omitempty"` @@ -312,7 +312,7 @@ func (m *ConsoleServerPortTemplate) ContextValidate(ctx context.Context, formats func (m *ConsoleServerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -355,7 +355,7 @@ func (m *ConsoleServerPortTemplate) contextValidateID(ctx context.Context, forma func (m *ConsoleServerPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact.go index 80ea399f7..9d11db76d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact.go @@ -45,7 +45,7 @@ type Contact struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -69,7 +69,7 @@ type Contact struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Link // Max Length: 200 @@ -359,7 +359,7 @@ func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Contact) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -402,7 +402,7 @@ func (m *Contact) contextValidateID(ctx context.Context, formats strfmt.Registry func (m *Contact) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_assignment.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_assignment.go index 529489824..22d3ec494 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_assignment.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_assignment.go @@ -46,7 +46,7 @@ type ContactAssignment struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -59,7 +59,7 @@ type ContactAssignment struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Object // Read Only: true @@ -305,7 +305,7 @@ func (m *ContactAssignment) contextValidateContact(ctx context.Context, formats func (m *ContactAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -332,7 +332,7 @@ func (m *ContactAssignment) contextValidateID(ctx context.Context, formats strfm func (m *ContactAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_group.go index 8715a67ed..a1e389915 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_group.go @@ -46,7 +46,7 @@ type ContactGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type ContactGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -332,7 +332,7 @@ func (m *ContactGroup) contextValidateContactCount(ctx context.Context, formats func (m *ContactGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -359,7 +359,7 @@ func (m *ContactGroup) contextValidateID(ctx context.Context, formats strfmt.Reg func (m *ContactGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_role.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_role.go index a12c0e8d9..6cb6e4e00 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_role.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/contact_role.go @@ -38,7 +38,7 @@ type ContactRole struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type ContactRole struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -268,7 +268,7 @@ func (m *ContactRole) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *ContactRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -295,7 +295,7 @@ func (m *ContactRole) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *ContactRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_field.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_field.go index 1b0879533..6c2b39d2c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_field.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_field.go @@ -47,7 +47,7 @@ type CustomField struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Data type // Read Only: true @@ -56,7 +56,7 @@ type CustomField struct { // Default // // Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo"). - Default *string `json:"default,omitempty"` + Default interface{} `json:"default,omitempty"` // Description // Max Length: 200 @@ -69,6 +69,12 @@ type CustomField struct { // filter logic FilterLogic *CustomFieldFilterLogic `json:"filter_logic,omitempty"` + // Group name + // + // Custom fields within the same group will be displayed together + // Max Length: 50 + GroupName string `json:"group_name,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -82,7 +88,7 @@ type CustomField struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -105,6 +111,9 @@ type CustomField struct { // Required: true Type *CustomFieldType `json:"type"` + // ui visibility + UIVisibility *CustomFieldUIVisibility `json:"ui_visibility,omitempty"` + // Url // Read Only: true // Format: uri @@ -162,6 +171,10 @@ func (m *CustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateGroupName(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } @@ -178,6 +191,10 @@ func (m *CustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUIVisibility(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -280,6 +297,18 @@ func (m *CustomField) validateFilterLogic(formats strfmt.Registry) error { return nil } +func (m *CustomField) validateGroupName(formats strfmt.Registry) error { + if swag.IsZero(m.GroupName) { // not required + return nil + } + + if err := validate.MaxLength("group_name", "body", m.GroupName, 50); err != nil { + return err + } + + return nil +} + func (m *CustomField) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -345,6 +374,25 @@ func (m *CustomField) validateType(formats strfmt.Registry) error { return nil } +func (m *CustomField) validateUIVisibility(formats strfmt.Registry) error { + if swag.IsZero(m.UIVisibility) { // not required + return nil + } + + if m.UIVisibility != nil { + if err := m.UIVisibility.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ui_visibility") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ui_visibility") + } + return err + } + } + + return nil +} + func (m *CustomField) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -449,6 +497,10 @@ func (m *CustomField) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateUIVisibility(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -461,7 +513,7 @@ func (m *CustomField) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *CustomField) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -513,7 +565,7 @@ func (m *CustomField) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *CustomField) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -536,6 +588,22 @@ func (m *CustomField) contextValidateType(ctx context.Context, formats strfmt.Re return nil } +func (m *CustomField) contextValidateUIVisibility(ctx context.Context, formats strfmt.Registry) error { + + if m.UIVisibility != nil { + if err := m.UIVisibility.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ui_visibility") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ui_visibility") + } + return err + } + } + + return nil +} + func (m *CustomField) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { @@ -908,3 +976,152 @@ func (m *CustomFieldType) UnmarshalBinary(b []byte) error { *m = res return nil } + +// CustomFieldUIVisibility Ui visibility +// +// swagger:model CustomFieldUIVisibility +type CustomFieldUIVisibility struct { + + // label + // Required: true + // Enum: [Read/Write Read-only Hidden] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [read-write read-only hidden] + Value *string `json:"value"` +} + +// Validate validates this custom field UI visibility +func (m *CustomFieldUIVisibility) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var customFieldUiVisibilityTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Read/Write","Read-only","Hidden"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + customFieldUiVisibilityTypeLabelPropEnum = append(customFieldUiVisibilityTypeLabelPropEnum, v) + } +} + +const ( + + // CustomFieldUIVisibilityLabelReadWrite captures enum value "Read/Write" + CustomFieldUIVisibilityLabelReadWrite string = "Read/Write" + + // CustomFieldUIVisibilityLabelReadDashOnly captures enum value "Read-only" + CustomFieldUIVisibilityLabelReadDashOnly string = "Read-only" + + // CustomFieldUIVisibilityLabelHidden captures enum value "Hidden" + CustomFieldUIVisibilityLabelHidden string = "Hidden" +) + +// prop value enum +func (m *CustomFieldUIVisibility) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, customFieldUiVisibilityTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *CustomFieldUIVisibility) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("ui_visibility"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("ui_visibility"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var customFieldUiVisibilityTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["read-write","read-only","hidden"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + customFieldUiVisibilityTypeValuePropEnum = append(customFieldUiVisibilityTypeValuePropEnum, v) + } +} + +const ( + + // CustomFieldUIVisibilityValueReadDashWrite captures enum value "read-write" + CustomFieldUIVisibilityValueReadDashWrite string = "read-write" + + // CustomFieldUIVisibilityValueReadDashOnly captures enum value "read-only" + CustomFieldUIVisibilityValueReadDashOnly string = "read-only" + + // CustomFieldUIVisibilityValueHidden captures enum value "hidden" + CustomFieldUIVisibilityValueHidden string = "hidden" +) + +// prop value enum +func (m *CustomFieldUIVisibility) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, customFieldUiVisibilityTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *CustomFieldUIVisibility) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("ui_visibility"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("ui_visibility"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this custom field UI visibility based on context it is used +func (m *CustomFieldUIVisibility) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CustomFieldUIVisibility) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CustomFieldUIVisibility) UnmarshalBinary(b []byte) error { + var res CustomFieldUIVisibility + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_link.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_link.go index 04dc9fd26..75b4e4e09 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_link.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/custom_link.go @@ -48,7 +48,7 @@ type CustomLink struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -70,13 +70,12 @@ type CustomLink struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Link text // // Jinja2 template code for link text // Required: true - // Max Length: 500 // Min Length: 1 LinkText *string `json:"link_text"` @@ -84,7 +83,6 @@ type CustomLink struct { // // Jinja2 template code for link URL // Required: true - // Max Length: 500 // Min Length: 1 LinkURL *string `json:"link_url"` @@ -296,10 +294,6 @@ func (m *CustomLink) validateLinkText(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("link_text", "body", *m.LinkText, 500); err != nil { - return err - } - return nil } @@ -313,10 +307,6 @@ func (m *CustomLink) validateLinkURL(formats strfmt.Registry) error { return err } - if err := validate.MaxLength("link_url", "body", *m.LinkURL, 500); err != nil { - return err - } - return nil } @@ -397,7 +387,7 @@ func (m *CustomLink) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *CustomLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -424,7 +414,7 @@ func (m *CustomLink) contextValidateID(ctx context.Context, formats strfmt.Regis func (m *CustomLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device.go index 1500aec32..e30f1383f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device.go @@ -54,7 +54,7 @@ type Device struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -81,7 +81,7 @@ type Device struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Local context data LocalContextData interface{} `json:"local_context_data,omitempty"` @@ -101,8 +101,8 @@ type Device struct { Platform *NestedPlatform `json:"platform,omitempty"` // Position (U) - // Minimum: 1 - Position *int64 `json:"position,omitempty"` + // Minimum: 0.5 + Position *float64 `json:"position,omitempty"` // primary ip PrimaryIP *NestedIPAddress `json:"primary_ip,omitempty"` @@ -474,7 +474,7 @@ func (m *Device) validatePosition(formats strfmt.Registry) error { return nil } - if err := validate.MinimumInt("position", "body", *m.Position, 1, false); err != nil { + if err := validate.Minimum("position", "body", *m.Position, 0.5, false); err != nil { return err } @@ -848,7 +848,7 @@ func (m *Device) contextValidateCluster(ctx context.Context, formats strfmt.Regi func (m *Device) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -923,7 +923,7 @@ func (m *Device) contextValidateID(ctx context.Context, formats strfmt.Registry) func (m *Device) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay.go index df301180f..cac1f10a5 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay.go @@ -38,7 +38,7 @@ type DeviceBay struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -71,7 +71,7 @@ type DeviceBay struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -320,7 +320,7 @@ func (m *DeviceBay) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *DeviceBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -379,7 +379,7 @@ func (m *DeviceBay) contextValidateInstalledDevice(ctx context.Context, formats func (m *DeviceBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay_template.go index fd94ee6df..2da867c92 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_bay_template.go @@ -37,7 +37,7 @@ type DeviceBayTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type DeviceBayTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -253,7 +253,7 @@ func (m *DeviceBayTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *DeviceBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -296,7 +296,7 @@ func (m *DeviceBayTemplate) contextValidateID(ctx context.Context, formats strfm func (m *DeviceBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_n_a_p_a_l_m.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_n_a_p_a_l_m.go index e6ef66a3b..7f53c6485 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_n_a_p_a_l_m.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_n_a_p_a_l_m.go @@ -26,7 +26,6 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // DeviceNAPALM device n a p a l m @@ -36,7 +35,7 @@ type DeviceNAPALM struct { // Method // Required: true - Method map[string]*string `json:"method"` + Method interface{} `json:"method"` } // Validate validates this device n a p a l m @@ -55,8 +54,8 @@ func (m *DeviceNAPALM) Validate(formats strfmt.Registry) error { func (m *DeviceNAPALM) validateMethod(formats strfmt.Registry) error { - if err := validate.Required("method", "body", m.Method); err != nil { - return err + if m.Method == nil { + return errors.Required("method", "body", nil) } return nil diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_role.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_role.go index 79a8a4758..23738ab4b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_role.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_role.go @@ -44,7 +44,7 @@ type DeviceRole struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -68,7 +68,7 @@ type DeviceRole struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -319,7 +319,7 @@ func (m *DeviceRole) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *DeviceRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -355,7 +355,7 @@ func (m *DeviceRole) contextValidateID(ctx context.Context, formats strfmt.Regis func (m *DeviceRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_type.go index c996c2460..90440ca7d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_type.go @@ -45,7 +45,7 @@ type DeviceType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -75,7 +75,7 @@ type DeviceType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // manufacturer // Required: true @@ -111,10 +111,9 @@ type DeviceType struct { // tags Tags []*NestedTag `json:"tags"` - // Height (U) - // Maximum: 32767 + // Position (U) // Minimum: 0 - UHeight *int64 `json:"u_height,omitempty"` + UHeight *float64 `json:"u_height,omitempty"` // Url // Read Only: true @@ -371,11 +370,7 @@ func (m *DeviceType) validateUHeight(formats strfmt.Registry) error { return nil } - if err := validate.MinimumInt("u_height", "body", *m.UHeight, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("u_height", "body", *m.UHeight, 32767, false); err != nil { + if err := validate.Minimum("u_height", "body", *m.UHeight, 0, false); err != nil { return err } @@ -470,7 +465,7 @@ func (m *DeviceType) contextValidateAirflow(ctx context.Context, formats strfmt. func (m *DeviceType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -515,7 +510,7 @@ func (m *DeviceType) contextValidateID(ctx context.Context, formats strfmt.Regis func (m *DeviceType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_with_config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_with_config_context.go index 7db2be754..3b4321259 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_with_config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/device_with_config_context.go @@ -58,7 +58,7 @@ type DeviceWithConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -85,7 +85,7 @@ type DeviceWithConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Local context data LocalContextData interface{} `json:"local_context_data,omitempty"` @@ -105,8 +105,8 @@ type DeviceWithConfigContext struct { Platform *NestedPlatform `json:"platform,omitempty"` // Position (U) - // Minimum: 1 - Position *int64 `json:"position,omitempty"` + // Minimum: 0.5 + Position *float64 `json:"position,omitempty"` // primary ip PrimaryIP *NestedIPAddress `json:"primary_ip,omitempty"` @@ -478,7 +478,7 @@ func (m *DeviceWithConfigContext) validatePosition(formats strfmt.Registry) erro return nil } - if err := validate.MinimumInt("position", "body", *m.Position, 1, false); err != nil { + if err := validate.Minimum("position", "body", *m.Position, 0.5, false); err != nil { return err } @@ -852,7 +852,7 @@ func (m *DeviceWithConfigContext) contextValidateCluster(ctx context.Context, fo func (m *DeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -927,7 +927,7 @@ func (m *DeviceWithConfigContext) contextValidateID(ctx context.Context, formats func (m *DeviceWithConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/export_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/export_template.go index 15e4e8bbe..5b7076968 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/export_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/export_template.go @@ -46,7 +46,7 @@ type ExportTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -69,7 +69,7 @@ type ExportTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // MIME type // @@ -285,7 +285,7 @@ func (m *ExportTemplate) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *ExportTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *ExportTemplate) contextValidateID(ctx context.Context, formats strfmt.R func (m *ExportTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group.go index 93a74cd32..ef2d47763 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group.go @@ -47,7 +47,7 @@ type FHRPGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -77,7 +77,7 @@ type FHRPGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Protocol // Required: true @@ -412,7 +412,7 @@ func (m *FHRPGroup) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *FHRPGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -463,7 +463,7 @@ func (m *FHRPGroup) contextValidateIPAddresses(ctx context.Context, formats strf func (m *FHRPGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group_assignment.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group_assignment.go index eaa5b9d29..d08b45e6e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group_assignment.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/f_h_r_p_group_assignment.go @@ -37,7 +37,7 @@ type FHRPGroupAssignment struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -53,7 +53,7 @@ type FHRPGroupAssignment struct { // Interface // Read Only: true - Interface map[string]*string `json:"interface,omitempty"` + Interface interface{} `json:"interface,omitempty"` // Interface id // Required: true @@ -68,7 +68,7 @@ type FHRPGroupAssignment struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Priority // Required: true @@ -239,10 +239,6 @@ func (m *FHRPGroupAssignment) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateInterface(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -259,7 +255,7 @@ func (m *FHRPGroupAssignment) ContextValidate(ctx context.Context, formats strfm func (m *FHRPGroupAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -300,14 +296,9 @@ func (m *FHRPGroupAssignment) contextValidateID(ctx context.Context, formats str return nil } -func (m *FHRPGroupAssignment) contextValidateInterface(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *FHRPGroupAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port.go index 1e73b4f21..f21501ff9 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port.go @@ -43,6 +43,11 @@ type FrontPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -51,7 +56,7 @@ type FrontPort struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -81,19 +86,17 @@ type FrontPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -139,6 +142,10 @@ func (m *FrontPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -216,6 +223,18 @@ func (m *FrontPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *FrontPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *FrontPort) validateColor(formats strfmt.Registry) error { if swag.IsZero(m.Color) { // not required return nil @@ -442,6 +461,10 @@ func (m *FrontPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -462,11 +485,11 @@ func (m *FrontPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -521,9 +544,18 @@ func (m *FrontPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } +func (m *FrontPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *FrontPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -566,21 +598,25 @@ func (m *FrontPort) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *FrontPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *FrontPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *FrontPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *FrontPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *FrontPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port_template.go index 872978801..68a74a3fa 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/front_port_template.go @@ -43,7 +43,7 @@ type FrontPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -69,7 +69,7 @@ type FrontPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module type ModuleType *NestedModuleType `json:"module_type,omitempty"` @@ -396,7 +396,7 @@ func (m *FrontPortTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *FrontPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -439,7 +439,7 @@ func (m *FrontPortTemplate) contextValidateID(ctx context.Context, formats strfm func (m *FrontPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/generic_object.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/generic_object.go new file mode 100644 index 000000000..2c5ac94d1 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/generic_object.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// GenericObject generic object +// +// swagger:model GenericObject +type GenericObject struct { + + // Object + // Read Only: true + Object interface{} `json:"object,omitempty"` + + // Object id + // Required: true + ObjectID *int64 `json:"object_id"` + + // Object type + // Required: true + ObjectType *string `json:"object_type"` +} + +// Validate validates this generic object +func (m *GenericObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObjectType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GenericObject) validateObjectID(formats strfmt.Registry) error { + + if err := validate.Required("object_id", "body", m.ObjectID); err != nil { + return err + } + + return nil +} + +func (m *GenericObject) validateObjectType(formats strfmt.Registry) error { + + if err := validate.Required("object_type", "body", m.ObjectType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this generic object based on context it is used +func (m *GenericObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *GenericObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GenericObject) UnmarshalBinary(b []byte) error { + var res GenericObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/image_attachment.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/image_attachment.go index ec84dfbcb..d4ff67695 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/image_attachment.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/image_attachment.go @@ -41,7 +41,7 @@ type ImageAttachment struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -71,7 +71,7 @@ type ImageAttachment struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Max Length: 50 @@ -85,7 +85,7 @@ type ImageAttachment struct { // Parent // Read Only: true - Parent map[string]*string `json:"parent,omitempty"` + Parent interface{} `json:"parent,omitempty"` // Url // Read Only: true @@ -283,10 +283,6 @@ func (m *ImageAttachment) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -299,7 +295,7 @@ func (m *ImageAttachment) ContextValidate(ctx context.Context, formats strfmt.Re func (m *ImageAttachment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -335,18 +331,13 @@ func (m *ImageAttachment) contextValidateImage(ctx context.Context, formats strf func (m *ImageAttachment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *ImageAttachment) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ImageAttachment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface.go index d98f5e43b..11f7dd5bc 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface.go @@ -46,21 +46,24 @@ type Interface struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Count fhrp groups // Read Only: true @@ -73,7 +76,7 @@ type Interface struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -100,6 +103,9 @@ type Interface struct { // Read Only: true ID int64 `json:"id,omitempty"` + // l2vpn termination + L2vpnTermination *NestedL2VPNTermination `json:"l2vpn_termination,omitempty"` + // Label // // Physical label @@ -112,19 +118,17 @@ type Interface struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -159,6 +163,12 @@ type Interface struct { // parent Parent *NestedInterface `json:"parent,omitempty"` + // poe mode + PoeMode *InterfacePoeMode `json:"poe_mode,omitempty"` + + // poe type + PoeType *InterfacePoeType `json:"poe_type,omitempty"` + // rf channel RfChannel *InterfaceRfChannel `json:"rf_channel,omitempty"` @@ -228,6 +238,10 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -244,6 +258,10 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateL2vpnTermination(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } @@ -276,6 +294,14 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePoeMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoeType(formats); err != nil { + res = append(res, err) + } + if err := m.validateRfChannel(formats); err != nil { res = append(res, err) } @@ -368,6 +394,18 @@ func (m *Interface) validateCable(formats strfmt.Registry) error { return nil } +func (m *Interface) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *Interface) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -431,6 +469,25 @@ func (m *Interface) validateDuplex(formats strfmt.Registry) error { return nil } +func (m *Interface) validateL2vpnTermination(formats strfmt.Registry) error { + if swag.IsZero(m.L2vpnTermination) { // not required + return nil + } + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *Interface) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -564,6 +621,44 @@ func (m *Interface) validateParent(formats strfmt.Registry) error { return nil } +func (m *Interface) validatePoeMode(formats strfmt.Registry) error { + if swag.IsZero(m.PoeMode) { // not required + return nil + } + + if m.PoeMode != nil { + if err := m.PoeMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_mode") + } + return err + } + } + + return nil +} + +func (m *Interface) validatePoeType(formats strfmt.Registry) error { + if swag.IsZero(m.PoeType) { // not required + return nil + } + + if m.PoeType != nil { + if err := m.PoeType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_type") + } + return err + } + } + + return nil +} + func (m *Interface) validateRfChannel(formats strfmt.Registry) error { if swag.IsZero(m.RfChannel) { // not required return nil @@ -825,15 +920,19 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -865,6 +964,10 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLag(ctx, formats); err != nil { res = append(res, err) } @@ -873,11 +976,11 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -893,6 +996,14 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidatePoeMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePoeType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRfChannel(ctx, formats); err != nil { res = append(res, err) } @@ -980,23 +1091,36 @@ func (m *Interface) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *Interface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *Interface) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } return nil } -func (m *Interface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *Interface) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { return err } return nil } -func (m *Interface) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *Interface) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -1023,7 +1147,7 @@ func (m *Interface) contextValidateCountIpaddresses(ctx context.Context, formats func (m *Interface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -1080,6 +1204,22 @@ func (m *Interface) contextValidateID(ctx context.Context, formats strfmt.Regist return nil } +func (m *Interface) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *Interface) contextValidateLag(ctx context.Context, formats strfmt.Registry) error { if m.Lag != nil { @@ -1098,21 +1238,25 @@ func (m *Interface) contextValidateLag(ctx context.Context, formats strfmt.Regis func (m *Interface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *Interface) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *Interface) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *Interface) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *Interface) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } @@ -1167,6 +1311,38 @@ func (m *Interface) contextValidateParent(ctx context.Context, formats strfmt.Re return nil } +func (m *Interface) contextValidatePoeMode(ctx context.Context, formats strfmt.Registry) error { + + if m.PoeMode != nil { + if err := m.PoeMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_mode") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidatePoeType(ctx context.Context, formats strfmt.Registry) error { + + if m.PoeType != nil { + if err := m.PoeType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_type") + } + return err + } + } + + return nil +} + func (m *Interface) contextValidateRfChannel(ctx context.Context, formats strfmt.Registry) error { if m.RfChannel != nil { @@ -1648,6 +1824,328 @@ func (m *InterfaceMode) UnmarshalBinary(b []byte) error { return nil } +// InterfacePoeMode Poe mode +// +// swagger:model InterfacePoeMode +type InterfacePoeMode struct { + + // label + // Required: true + // Enum: [PD PSE] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [pd pse] + Value *string `json:"value"` +} + +// Validate validates this interface poe mode +func (m *InterfacePoeMode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfacePoeModeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["PD","PSE"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfacePoeModeTypeLabelPropEnum = append(interfacePoeModeTypeLabelPropEnum, v) + } +} + +const ( + + // InterfacePoeModeLabelPD captures enum value "PD" + InterfacePoeModeLabelPD string = "PD" + + // InterfacePoeModeLabelPSE captures enum value "PSE" + InterfacePoeModeLabelPSE string = "PSE" +) + +// prop value enum +func (m *InterfacePoeMode) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfacePoeModeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfacePoeMode) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("poe_mode"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("poe_mode"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfacePoeModeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["pd","pse"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfacePoeModeTypeValuePropEnum = append(interfacePoeModeTypeValuePropEnum, v) + } +} + +const ( + + // InterfacePoeModeValuePd captures enum value "pd" + InterfacePoeModeValuePd string = "pd" + + // InterfacePoeModeValuePse captures enum value "pse" + InterfacePoeModeValuePse string = "pse" +) + +// prop value enum +func (m *InterfacePoeMode) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfacePoeModeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfacePoeMode) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("poe_mode"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("poe_mode"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface poe mode based on context it is used +func (m *InterfacePoeMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfacePoeMode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfacePoeMode) UnmarshalBinary(b []byte) error { + var res InterfacePoeMode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// InterfacePoeType Poe type +// +// swagger:model InterfacePoeType +type InterfacePoeType struct { + + // label + // Required: true + // Enum: [802.3af (Type 1) 802.3at (Type 2) 802.3bt (Type 3) 802.3bt (Type 4) Passive 24V (2-pair) Passive 24V (4-pair) Passive 48V (2-pair) Passive 48V (4-pair)] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [type1-ieee802.3af type2-ieee802.3at type3-ieee802.3bt type4-ieee802.3bt passive-24v-2pair passive-24v-4pair passive-48v-2pair passive-48v-4pair] + Value *string `json:"value"` +} + +// Validate validates this interface poe type +func (m *InterfacePoeType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfacePoeTypeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["802.3af (Type 1)","802.3at (Type 2)","802.3bt (Type 3)","802.3bt (Type 4)","Passive 24V (2-pair)","Passive 24V (4-pair)","Passive 48V (2-pair)","Passive 48V (4-pair)"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfacePoeTypeTypeLabelPropEnum = append(interfacePoeTypeTypeLabelPropEnum, v) + } +} + +const ( + + // InterfacePoeTypeLabelNr802Dot3afType1 captures enum value "802.3af (Type 1)" + InterfacePoeTypeLabelNr802Dot3afType1 string = "802.3af (Type 1)" + + // InterfacePoeTypeLabelNr802Dot3atType2 captures enum value "802.3at (Type 2)" + InterfacePoeTypeLabelNr802Dot3atType2 string = "802.3at (Type 2)" + + // InterfacePoeTypeLabelNr802Dot3btType3 captures enum value "802.3bt (Type 3)" + InterfacePoeTypeLabelNr802Dot3btType3 string = "802.3bt (Type 3)" + + // InterfacePoeTypeLabelNr802Dot3btType4 captures enum value "802.3bt (Type 4)" + InterfacePoeTypeLabelNr802Dot3btType4 string = "802.3bt (Type 4)" + + // InterfacePoeTypeLabelPassive24V2DashPair captures enum value "Passive 24V (2-pair)" + InterfacePoeTypeLabelPassive24V2DashPair string = "Passive 24V (2-pair)" + + // InterfacePoeTypeLabelPassive24V4DashPair captures enum value "Passive 24V (4-pair)" + InterfacePoeTypeLabelPassive24V4DashPair string = "Passive 24V (4-pair)" + + // InterfacePoeTypeLabelPassive48V2DashPair captures enum value "Passive 48V (2-pair)" + InterfacePoeTypeLabelPassive48V2DashPair string = "Passive 48V (2-pair)" + + // InterfacePoeTypeLabelPassive48V4DashPair captures enum value "Passive 48V (4-pair)" + InterfacePoeTypeLabelPassive48V4DashPair string = "Passive 48V (4-pair)" +) + +// prop value enum +func (m *InterfacePoeType) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfacePoeTypeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfacePoeType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("poe_type"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("poe_type"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfacePoeTypeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["type1-ieee802.3af","type2-ieee802.3at","type3-ieee802.3bt","type4-ieee802.3bt","passive-24v-2pair","passive-24v-4pair","passive-48v-2pair","passive-48v-4pair"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfacePoeTypeTypeValuePropEnum = append(interfacePoeTypeTypeValuePropEnum, v) + } +} + +const ( + + // InterfacePoeTypeValueType1DashIeee802Dot3af captures enum value "type1-ieee802.3af" + InterfacePoeTypeValueType1DashIeee802Dot3af string = "type1-ieee802.3af" + + // InterfacePoeTypeValueType2DashIeee802Dot3at captures enum value "type2-ieee802.3at" + InterfacePoeTypeValueType2DashIeee802Dot3at string = "type2-ieee802.3at" + + // InterfacePoeTypeValueType3DashIeee802Dot3bt captures enum value "type3-ieee802.3bt" + InterfacePoeTypeValueType3DashIeee802Dot3bt string = "type3-ieee802.3bt" + + // InterfacePoeTypeValueType4DashIeee802Dot3bt captures enum value "type4-ieee802.3bt" + InterfacePoeTypeValueType4DashIeee802Dot3bt string = "type4-ieee802.3bt" + + // InterfacePoeTypeValuePassiveDash24vDash2pair captures enum value "passive-24v-2pair" + InterfacePoeTypeValuePassiveDash24vDash2pair string = "passive-24v-2pair" + + // InterfacePoeTypeValuePassiveDash24vDash4pair captures enum value "passive-24v-4pair" + InterfacePoeTypeValuePassiveDash24vDash4pair string = "passive-24v-4pair" + + // InterfacePoeTypeValuePassiveDash48vDash2pair captures enum value "passive-48v-2pair" + InterfacePoeTypeValuePassiveDash48vDash2pair string = "passive-48v-2pair" + + // InterfacePoeTypeValuePassiveDash48vDash4pair captures enum value "passive-48v-4pair" + InterfacePoeTypeValuePassiveDash48vDash4pair string = "passive-48v-4pair" +) + +// prop value enum +func (m *InterfacePoeType) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfacePoeTypeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfacePoeType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("poe_type"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("poe_type"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface poe type based on context it is used +func (m *InterfacePoeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfacePoeType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfacePoeType) UnmarshalBinary(b []byte) error { + var res InterfacePoeType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // InterfaceRfChannel Rf channel // // swagger:model InterfaceRfChannel @@ -3111,12 +3609,12 @@ type InterfaceType struct { // label // Required: true - // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.15.1 (Bluetooth) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL DOCSIS GPON (2.5 Gbps / 1.25 Gps) XG-PON (10 Gbps / 2.5 Gbps) XGS-PON (10 Gbps) NG-PON2 (TWDM-PON) (4x10 Gbps) EPON (1 Gbps) 10G-EPON (10 Gbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] + // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) 1000BASE-KX (1GE) 10GBASE-KR (10GE) 10GBASE-KX4 (10GE) 25GBASE-KR (25GE) 40GBASE-KR4 (40GE) 50GBASE-KR (50GE) 100GBASE-KP4 (100GE) 100GBASE-KR2 (100GE) 100GBASE-KR4 (100GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.11ay IEEE 802.15.1 (Bluetooth) Other (Wireless) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL DOCSIS GPON (2.5 Gbps / 1.25 Gps) XG-PON (10 Gbps / 2.5 Gbps) XGS-PON (10 Gbps) NG-PON2 (TWDM-PON) (4x10 Gbps) EPON (1 Gbps) 10G-EPON (10 Gbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] Label *string `json:"label"` // value // Required: true - // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp 1000base-kx 10gbase-kr 10gbase-kx4 25gbase-kr 40gbase-kr4 50gbase-kr 100gbase-kp4 100gbase-kr2 100gbase-kr4 ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.11ay ieee802.15.1 other-wireless gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Value *string `json:"value"` } @@ -3142,7 +3640,7 @@ var interfaceTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.15.1 (Bluetooth)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","DOCSIS","GPON (2.5 Gbps / 1.25 Gps)","XG-PON (10 Gbps / 2.5 Gbps)","XGS-PON (10 Gbps)","NG-PON2 (TWDM-PON) (4x10 Gbps)","EPON (1 Gbps)","10G-EPON (10 Gbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","1000BASE-KX (1GE)","10GBASE-KR (10GE)","10GBASE-KX4 (10GE)","25GBASE-KR (25GE)","40GBASE-KR4 (40GE)","50GBASE-KR (50GE)","100GBASE-KP4 (100GE)","100GBASE-KR2 (100GE)","100GBASE-KR4 (100GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.11ay","IEEE 802.15.1 (Bluetooth)","Other (Wireless)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","DOCSIS","GPON (2.5 Gbps / 1.25 Gps)","XG-PON (10 Gbps / 2.5 Gbps)","XGS-PON (10 Gbps)","NG-PON2 (TWDM-PON) (4x10 Gbps)","EPON (1 Gbps)","10G-EPON (10 Gbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -3236,6 +3734,33 @@ const ( // InterfaceTypeLabelOSFP400GE captures enum value "OSFP (400GE)" InterfaceTypeLabelOSFP400GE string = "OSFP (400GE)" + // InterfaceTypeLabelNr1000BASEDashKX1GE captures enum value "1000BASE-KX (1GE)" + InterfaceTypeLabelNr1000BASEDashKX1GE string = "1000BASE-KX (1GE)" + + // InterfaceTypeLabelNr10GBASEDashKR10GE captures enum value "10GBASE-KR (10GE)" + InterfaceTypeLabelNr10GBASEDashKR10GE string = "10GBASE-KR (10GE)" + + // InterfaceTypeLabelNr10GBASEDashKX410GE captures enum value "10GBASE-KX4 (10GE)" + InterfaceTypeLabelNr10GBASEDashKX410GE string = "10GBASE-KX4 (10GE)" + + // InterfaceTypeLabelNr25GBASEDashKR25GE captures enum value "25GBASE-KR (25GE)" + InterfaceTypeLabelNr25GBASEDashKR25GE string = "25GBASE-KR (25GE)" + + // InterfaceTypeLabelNr40GBASEDashKR440GE captures enum value "40GBASE-KR4 (40GE)" + InterfaceTypeLabelNr40GBASEDashKR440GE string = "40GBASE-KR4 (40GE)" + + // InterfaceTypeLabelNr50GBASEDashKR50GE captures enum value "50GBASE-KR (50GE)" + InterfaceTypeLabelNr50GBASEDashKR50GE string = "50GBASE-KR (50GE)" + + // InterfaceTypeLabelNr100GBASEDashKP4100GE captures enum value "100GBASE-KP4 (100GE)" + InterfaceTypeLabelNr100GBASEDashKP4100GE string = "100GBASE-KP4 (100GE)" + + // InterfaceTypeLabelNr100GBASEDashKR2100GE captures enum value "100GBASE-KR2 (100GE)" + InterfaceTypeLabelNr100GBASEDashKR2100GE string = "100GBASE-KR2 (100GE)" + + // InterfaceTypeLabelNr100GBASEDashKR4100GE captures enum value "100GBASE-KR4 (100GE)" + InterfaceTypeLabelNr100GBASEDashKR4100GE string = "100GBASE-KR4 (100GE)" + // InterfaceTypeLabelIEEE802Dot11a captures enum value "IEEE 802.11a" InterfaceTypeLabelIEEE802Dot11a string = "IEEE 802.11a" @@ -3254,9 +3779,15 @@ const ( // InterfaceTypeLabelIEEE802Dot11ax captures enum value "IEEE 802.11ax" InterfaceTypeLabelIEEE802Dot11ax string = "IEEE 802.11ax" + // InterfaceTypeLabelIEEE802Dot11ay captures enum value "IEEE 802.11ay" + InterfaceTypeLabelIEEE802Dot11ay string = "IEEE 802.11ay" + // InterfaceTypeLabelIEEE802Dot15Dot1Bluetooth captures enum value "IEEE 802.15.1 (Bluetooth)" InterfaceTypeLabelIEEE802Dot15Dot1Bluetooth string = "IEEE 802.15.1 (Bluetooth)" + // InterfaceTypeLabelOtherWireless captures enum value "Other (Wireless)" + InterfaceTypeLabelOtherWireless string = "Other (Wireless)" + // InterfaceTypeLabelGSM captures enum value "GSM" InterfaceTypeLabelGSM string = "GSM" @@ -3443,7 +3974,7 @@ var interfaceTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","1000base-kx","10gbase-kr","10gbase-kx4","25gbase-kr","40gbase-kr4","50gbase-kr","100gbase-kp4","100gbase-kr2","100gbase-kr4","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.11ay","ieee802.15.1","other-wireless","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -3537,6 +4068,33 @@ const ( // InterfaceTypeValueNr400gbaseDashxDashOsfp captures enum value "400gbase-x-osfp" InterfaceTypeValueNr400gbaseDashxDashOsfp string = "400gbase-x-osfp" + // InterfaceTypeValueNr1000baseDashKx captures enum value "1000base-kx" + InterfaceTypeValueNr1000baseDashKx string = "1000base-kx" + + // InterfaceTypeValueNr10gbaseDashKr captures enum value "10gbase-kr" + InterfaceTypeValueNr10gbaseDashKr string = "10gbase-kr" + + // InterfaceTypeValueNr10gbaseDashKx4 captures enum value "10gbase-kx4" + InterfaceTypeValueNr10gbaseDashKx4 string = "10gbase-kx4" + + // InterfaceTypeValueNr25gbaseDashKr captures enum value "25gbase-kr" + InterfaceTypeValueNr25gbaseDashKr string = "25gbase-kr" + + // InterfaceTypeValueNr40gbaseDashKr4 captures enum value "40gbase-kr4" + InterfaceTypeValueNr40gbaseDashKr4 string = "40gbase-kr4" + + // InterfaceTypeValueNr50gbaseDashKr captures enum value "50gbase-kr" + InterfaceTypeValueNr50gbaseDashKr string = "50gbase-kr" + + // InterfaceTypeValueNr100gbaseDashKp4 captures enum value "100gbase-kp4" + InterfaceTypeValueNr100gbaseDashKp4 string = "100gbase-kp4" + + // InterfaceTypeValueNr100gbaseDashKr2 captures enum value "100gbase-kr2" + InterfaceTypeValueNr100gbaseDashKr2 string = "100gbase-kr2" + + // InterfaceTypeValueNr100gbaseDashKr4 captures enum value "100gbase-kr4" + InterfaceTypeValueNr100gbaseDashKr4 string = "100gbase-kr4" + // InterfaceTypeValueIeee802Dot11a captures enum value "ieee802.11a" InterfaceTypeValueIeee802Dot11a string = "ieee802.11a" @@ -3555,9 +4113,15 @@ const ( // InterfaceTypeValueIeee802Dot11ax captures enum value "ieee802.11ax" InterfaceTypeValueIeee802Dot11ax string = "ieee802.11ax" + // InterfaceTypeValueIeee802Dot11ay captures enum value "ieee802.11ay" + InterfaceTypeValueIeee802Dot11ay string = "ieee802.11ay" + // InterfaceTypeValueIeee802Dot15Dot1 captures enum value "ieee802.15.1" InterfaceTypeValueIeee802Dot15Dot1 string = "ieee802.15.1" + // InterfaceTypeValueOtherDashWireless captures enum value "other-wireless" + InterfaceTypeValueOtherDashWireless string = "other-wireless" + // InterfaceTypeValueGsm captures enum value "gsm" InterfaceTypeValueGsm string = "gsm" diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface_template.go index 3b291e78d..af0836693 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/interface_template.go @@ -38,7 +38,7 @@ type InterfaceTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type InterfaceTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Management only MgmtOnly bool `json:"mgmt_only,omitempty"` @@ -82,6 +82,12 @@ type InterfaceTemplate struct { // Min Length: 1 Name *string `json:"name"` + // poe mode + PoeMode *InterfaceTemplatePoeMode `json:"poe_mode,omitempty"` + + // poe type + PoeType *InterfaceTemplatePoeType `json:"poe_type,omitempty"` + // type // Required: true Type *InterfaceTemplateType `json:"type"` @@ -124,6 +130,14 @@ func (m *InterfaceTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePoeMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoeType(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -241,6 +255,44 @@ func (m *InterfaceTemplate) validateName(formats strfmt.Registry) error { return nil } +func (m *InterfaceTemplate) validatePoeMode(formats strfmt.Registry) error { + if swag.IsZero(m.PoeMode) { // not required + return nil + } + + if m.PoeMode != nil { + if err := m.PoeMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_mode") + } + return err + } + } + + return nil +} + +func (m *InterfaceTemplate) validatePoeType(formats strfmt.Registry) error { + if swag.IsZero(m.PoeType) { // not required + return nil + } + + if m.PoeType != nil { + if err := m.PoeType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_type") + } + return err + } + } + + return nil +} + func (m *InterfaceTemplate) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { @@ -301,6 +353,14 @@ func (m *InterfaceTemplate) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidatePoeMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePoeType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateType(ctx, formats); err != nil { res = append(res, err) } @@ -317,7 +377,7 @@ func (m *InterfaceTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *InterfaceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -360,7 +420,7 @@ func (m *InterfaceTemplate) contextValidateID(ctx context.Context, formats strfm func (m *InterfaceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -383,6 +443,38 @@ func (m *InterfaceTemplate) contextValidateModuleType(ctx context.Context, forma return nil } +func (m *InterfaceTemplate) contextValidatePoeMode(ctx context.Context, formats strfmt.Registry) error { + + if m.PoeMode != nil { + if err := m.PoeMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_mode") + } + return err + } + } + + return nil +} + +func (m *InterfaceTemplate) contextValidatePoeType(ctx context.Context, formats strfmt.Registry) error { + + if m.PoeType != nil { + if err := m.PoeType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poe_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("poe_type") + } + return err + } + } + + return nil +} + func (m *InterfaceTemplate) contextValidateType(ctx context.Context, formats strfmt.Registry) error { if m.Type != nil { @@ -426,6 +518,328 @@ func (m *InterfaceTemplate) UnmarshalBinary(b []byte) error { return nil } +// InterfaceTemplatePoeMode Poe mode +// +// swagger:model InterfaceTemplatePoeMode +type InterfaceTemplatePoeMode struct { + + // label + // Required: true + // Enum: [PD PSE] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [pd pse] + Value *string `json:"value"` +} + +// Validate validates this interface template poe mode +func (m *InterfaceTemplatePoeMode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfaceTemplatePoeModeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["PD","PSE"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceTemplatePoeModeTypeLabelPropEnum = append(interfaceTemplatePoeModeTypeLabelPropEnum, v) + } +} + +const ( + + // InterfaceTemplatePoeModeLabelPD captures enum value "PD" + InterfaceTemplatePoeModeLabelPD string = "PD" + + // InterfaceTemplatePoeModeLabelPSE captures enum value "PSE" + InterfaceTemplatePoeModeLabelPSE string = "PSE" +) + +// prop value enum +func (m *InterfaceTemplatePoeMode) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceTemplatePoeModeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceTemplatePoeMode) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("poe_mode"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("poe_mode"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfaceTemplatePoeModeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["pd","pse"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceTemplatePoeModeTypeValuePropEnum = append(interfaceTemplatePoeModeTypeValuePropEnum, v) + } +} + +const ( + + // InterfaceTemplatePoeModeValuePd captures enum value "pd" + InterfaceTemplatePoeModeValuePd string = "pd" + + // InterfaceTemplatePoeModeValuePse captures enum value "pse" + InterfaceTemplatePoeModeValuePse string = "pse" +) + +// prop value enum +func (m *InterfaceTemplatePoeMode) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceTemplatePoeModeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceTemplatePoeMode) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("poe_mode"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("poe_mode"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface template poe mode based on context it is used +func (m *InterfaceTemplatePoeMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfaceTemplatePoeMode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfaceTemplatePoeMode) UnmarshalBinary(b []byte) error { + var res InterfaceTemplatePoeMode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// InterfaceTemplatePoeType Poe type +// +// swagger:model InterfaceTemplatePoeType +type InterfaceTemplatePoeType struct { + + // label + // Required: true + // Enum: [802.3af (Type 1) 802.3at (Type 2) 802.3bt (Type 3) 802.3bt (Type 4) Passive 24V (2-pair) Passive 24V (4-pair) Passive 48V (2-pair) Passive 48V (4-pair)] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [type1-ieee802.3af type2-ieee802.3at type3-ieee802.3bt type4-ieee802.3bt passive-24v-2pair passive-24v-4pair passive-48v-2pair passive-48v-4pair] + Value *string `json:"value"` +} + +// Validate validates this interface template poe type +func (m *InterfaceTemplatePoeType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfaceTemplatePoeTypeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["802.3af (Type 1)","802.3at (Type 2)","802.3bt (Type 3)","802.3bt (Type 4)","Passive 24V (2-pair)","Passive 24V (4-pair)","Passive 48V (2-pair)","Passive 48V (4-pair)"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceTemplatePoeTypeTypeLabelPropEnum = append(interfaceTemplatePoeTypeTypeLabelPropEnum, v) + } +} + +const ( + + // InterfaceTemplatePoeTypeLabelNr802Dot3afType1 captures enum value "802.3af (Type 1)" + InterfaceTemplatePoeTypeLabelNr802Dot3afType1 string = "802.3af (Type 1)" + + // InterfaceTemplatePoeTypeLabelNr802Dot3atType2 captures enum value "802.3at (Type 2)" + InterfaceTemplatePoeTypeLabelNr802Dot3atType2 string = "802.3at (Type 2)" + + // InterfaceTemplatePoeTypeLabelNr802Dot3btType3 captures enum value "802.3bt (Type 3)" + InterfaceTemplatePoeTypeLabelNr802Dot3btType3 string = "802.3bt (Type 3)" + + // InterfaceTemplatePoeTypeLabelNr802Dot3btType4 captures enum value "802.3bt (Type 4)" + InterfaceTemplatePoeTypeLabelNr802Dot3btType4 string = "802.3bt (Type 4)" + + // InterfaceTemplatePoeTypeLabelPassive24V2DashPair captures enum value "Passive 24V (2-pair)" + InterfaceTemplatePoeTypeLabelPassive24V2DashPair string = "Passive 24V (2-pair)" + + // InterfaceTemplatePoeTypeLabelPassive24V4DashPair captures enum value "Passive 24V (4-pair)" + InterfaceTemplatePoeTypeLabelPassive24V4DashPair string = "Passive 24V (4-pair)" + + // InterfaceTemplatePoeTypeLabelPassive48V2DashPair captures enum value "Passive 48V (2-pair)" + InterfaceTemplatePoeTypeLabelPassive48V2DashPair string = "Passive 48V (2-pair)" + + // InterfaceTemplatePoeTypeLabelPassive48V4DashPair captures enum value "Passive 48V (4-pair)" + InterfaceTemplatePoeTypeLabelPassive48V4DashPair string = "Passive 48V (4-pair)" +) + +// prop value enum +func (m *InterfaceTemplatePoeType) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceTemplatePoeTypeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceTemplatePoeType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("poe_type"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("poe_type"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfaceTemplatePoeTypeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["type1-ieee802.3af","type2-ieee802.3at","type3-ieee802.3bt","type4-ieee802.3bt","passive-24v-2pair","passive-24v-4pair","passive-48v-2pair","passive-48v-4pair"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceTemplatePoeTypeTypeValuePropEnum = append(interfaceTemplatePoeTypeTypeValuePropEnum, v) + } +} + +const ( + + // InterfaceTemplatePoeTypeValueType1DashIeee802Dot3af captures enum value "type1-ieee802.3af" + InterfaceTemplatePoeTypeValueType1DashIeee802Dot3af string = "type1-ieee802.3af" + + // InterfaceTemplatePoeTypeValueType2DashIeee802Dot3at captures enum value "type2-ieee802.3at" + InterfaceTemplatePoeTypeValueType2DashIeee802Dot3at string = "type2-ieee802.3at" + + // InterfaceTemplatePoeTypeValueType3DashIeee802Dot3bt captures enum value "type3-ieee802.3bt" + InterfaceTemplatePoeTypeValueType3DashIeee802Dot3bt string = "type3-ieee802.3bt" + + // InterfaceTemplatePoeTypeValueType4DashIeee802Dot3bt captures enum value "type4-ieee802.3bt" + InterfaceTemplatePoeTypeValueType4DashIeee802Dot3bt string = "type4-ieee802.3bt" + + // InterfaceTemplatePoeTypeValuePassiveDash24vDash2pair captures enum value "passive-24v-2pair" + InterfaceTemplatePoeTypeValuePassiveDash24vDash2pair string = "passive-24v-2pair" + + // InterfaceTemplatePoeTypeValuePassiveDash24vDash4pair captures enum value "passive-24v-4pair" + InterfaceTemplatePoeTypeValuePassiveDash24vDash4pair string = "passive-24v-4pair" + + // InterfaceTemplatePoeTypeValuePassiveDash48vDash2pair captures enum value "passive-48v-2pair" + InterfaceTemplatePoeTypeValuePassiveDash48vDash2pair string = "passive-48v-2pair" + + // InterfaceTemplatePoeTypeValuePassiveDash48vDash4pair captures enum value "passive-48v-4pair" + InterfaceTemplatePoeTypeValuePassiveDash48vDash4pair string = "passive-48v-4pair" +) + +// prop value enum +func (m *InterfaceTemplatePoeType) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceTemplatePoeTypeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceTemplatePoeType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("poe_type"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("poe_type"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface template poe type based on context it is used +func (m *InterfaceTemplatePoeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfaceTemplatePoeType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfaceTemplatePoeType) UnmarshalBinary(b []byte) error { + var res InterfaceTemplatePoeType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // InterfaceTemplateType Type // // swagger:model InterfaceTemplateType @@ -433,12 +847,12 @@ type InterfaceTemplateType struct { // label // Required: true - // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.15.1 (Bluetooth) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL DOCSIS GPON (2.5 Gbps / 1.25 Gps) XG-PON (10 Gbps / 2.5 Gbps) XGS-PON (10 Gbps) NG-PON2 (TWDM-PON) (4x10 Gbps) EPON (1 Gbps) 10G-EPON (10 Gbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] + // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) 1000BASE-KX (1GE) 10GBASE-KR (10GE) 10GBASE-KX4 (10GE) 25GBASE-KR (25GE) 40GBASE-KR4 (40GE) 50GBASE-KR (50GE) 100GBASE-KP4 (100GE) 100GBASE-KR2 (100GE) 100GBASE-KR4 (100GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.11ay IEEE 802.15.1 (Bluetooth) Other (Wireless) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL DOCSIS GPON (2.5 Gbps / 1.25 Gps) XG-PON (10 Gbps / 2.5 Gbps) XGS-PON (10 Gbps) NG-PON2 (TWDM-PON) (4x10 Gbps) EPON (1 Gbps) 10G-EPON (10 Gbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] Label *string `json:"label"` // value // Required: true - // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp 1000base-kx 10gbase-kr 10gbase-kx4 25gbase-kr 40gbase-kr4 50gbase-kr 100gbase-kp4 100gbase-kr2 100gbase-kr4 ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.11ay ieee802.15.1 other-wireless gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Value *string `json:"value"` } @@ -464,7 +878,7 @@ var interfaceTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.15.1 (Bluetooth)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","DOCSIS","GPON (2.5 Gbps / 1.25 Gps)","XG-PON (10 Gbps / 2.5 Gbps)","XGS-PON (10 Gbps)","NG-PON2 (TWDM-PON) (4x10 Gbps)","EPON (1 Gbps)","10G-EPON (10 Gbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","1000BASE-KX (1GE)","10GBASE-KR (10GE)","10GBASE-KX4 (10GE)","25GBASE-KR (25GE)","40GBASE-KR4 (40GE)","50GBASE-KR (50GE)","100GBASE-KP4 (100GE)","100GBASE-KR2 (100GE)","100GBASE-KR4 (100GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.11ay","IEEE 802.15.1 (Bluetooth)","Other (Wireless)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","DOCSIS","GPON (2.5 Gbps / 1.25 Gps)","XG-PON (10 Gbps / 2.5 Gbps)","XGS-PON (10 Gbps)","NG-PON2 (TWDM-PON) (4x10 Gbps)","EPON (1 Gbps)","10G-EPON (10 Gbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -558,6 +972,33 @@ const ( // InterfaceTemplateTypeLabelOSFP400GE captures enum value "OSFP (400GE)" InterfaceTemplateTypeLabelOSFP400GE string = "OSFP (400GE)" + // InterfaceTemplateTypeLabelNr1000BASEDashKX1GE captures enum value "1000BASE-KX (1GE)" + InterfaceTemplateTypeLabelNr1000BASEDashKX1GE string = "1000BASE-KX (1GE)" + + // InterfaceTemplateTypeLabelNr10GBASEDashKR10GE captures enum value "10GBASE-KR (10GE)" + InterfaceTemplateTypeLabelNr10GBASEDashKR10GE string = "10GBASE-KR (10GE)" + + // InterfaceTemplateTypeLabelNr10GBASEDashKX410GE captures enum value "10GBASE-KX4 (10GE)" + InterfaceTemplateTypeLabelNr10GBASEDashKX410GE string = "10GBASE-KX4 (10GE)" + + // InterfaceTemplateTypeLabelNr25GBASEDashKR25GE captures enum value "25GBASE-KR (25GE)" + InterfaceTemplateTypeLabelNr25GBASEDashKR25GE string = "25GBASE-KR (25GE)" + + // InterfaceTemplateTypeLabelNr40GBASEDashKR440GE captures enum value "40GBASE-KR4 (40GE)" + InterfaceTemplateTypeLabelNr40GBASEDashKR440GE string = "40GBASE-KR4 (40GE)" + + // InterfaceTemplateTypeLabelNr50GBASEDashKR50GE captures enum value "50GBASE-KR (50GE)" + InterfaceTemplateTypeLabelNr50GBASEDashKR50GE string = "50GBASE-KR (50GE)" + + // InterfaceTemplateTypeLabelNr100GBASEDashKP4100GE captures enum value "100GBASE-KP4 (100GE)" + InterfaceTemplateTypeLabelNr100GBASEDashKP4100GE string = "100GBASE-KP4 (100GE)" + + // InterfaceTemplateTypeLabelNr100GBASEDashKR2100GE captures enum value "100GBASE-KR2 (100GE)" + InterfaceTemplateTypeLabelNr100GBASEDashKR2100GE string = "100GBASE-KR2 (100GE)" + + // InterfaceTemplateTypeLabelNr100GBASEDashKR4100GE captures enum value "100GBASE-KR4 (100GE)" + InterfaceTemplateTypeLabelNr100GBASEDashKR4100GE string = "100GBASE-KR4 (100GE)" + // InterfaceTemplateTypeLabelIEEE802Dot11a captures enum value "IEEE 802.11a" InterfaceTemplateTypeLabelIEEE802Dot11a string = "IEEE 802.11a" @@ -576,9 +1017,15 @@ const ( // InterfaceTemplateTypeLabelIEEE802Dot11ax captures enum value "IEEE 802.11ax" InterfaceTemplateTypeLabelIEEE802Dot11ax string = "IEEE 802.11ax" + // InterfaceTemplateTypeLabelIEEE802Dot11ay captures enum value "IEEE 802.11ay" + InterfaceTemplateTypeLabelIEEE802Dot11ay string = "IEEE 802.11ay" + // InterfaceTemplateTypeLabelIEEE802Dot15Dot1Bluetooth captures enum value "IEEE 802.15.1 (Bluetooth)" InterfaceTemplateTypeLabelIEEE802Dot15Dot1Bluetooth string = "IEEE 802.15.1 (Bluetooth)" + // InterfaceTemplateTypeLabelOtherWireless captures enum value "Other (Wireless)" + InterfaceTemplateTypeLabelOtherWireless string = "Other (Wireless)" + // InterfaceTemplateTypeLabelGSM captures enum value "GSM" InterfaceTemplateTypeLabelGSM string = "GSM" @@ -765,7 +1212,7 @@ var interfaceTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","1000base-kx","10gbase-kr","10gbase-kx4","25gbase-kr","40gbase-kr4","50gbase-kr","100gbase-kp4","100gbase-kr2","100gbase-kr4","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.11ay","ieee802.15.1","other-wireless","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -859,6 +1306,33 @@ const ( // InterfaceTemplateTypeValueNr400gbaseDashxDashOsfp captures enum value "400gbase-x-osfp" InterfaceTemplateTypeValueNr400gbaseDashxDashOsfp string = "400gbase-x-osfp" + // InterfaceTemplateTypeValueNr1000baseDashKx captures enum value "1000base-kx" + InterfaceTemplateTypeValueNr1000baseDashKx string = "1000base-kx" + + // InterfaceTemplateTypeValueNr10gbaseDashKr captures enum value "10gbase-kr" + InterfaceTemplateTypeValueNr10gbaseDashKr string = "10gbase-kr" + + // InterfaceTemplateTypeValueNr10gbaseDashKx4 captures enum value "10gbase-kx4" + InterfaceTemplateTypeValueNr10gbaseDashKx4 string = "10gbase-kx4" + + // InterfaceTemplateTypeValueNr25gbaseDashKr captures enum value "25gbase-kr" + InterfaceTemplateTypeValueNr25gbaseDashKr string = "25gbase-kr" + + // InterfaceTemplateTypeValueNr40gbaseDashKr4 captures enum value "40gbase-kr4" + InterfaceTemplateTypeValueNr40gbaseDashKr4 string = "40gbase-kr4" + + // InterfaceTemplateTypeValueNr50gbaseDashKr captures enum value "50gbase-kr" + InterfaceTemplateTypeValueNr50gbaseDashKr string = "50gbase-kr" + + // InterfaceTemplateTypeValueNr100gbaseDashKp4 captures enum value "100gbase-kp4" + InterfaceTemplateTypeValueNr100gbaseDashKp4 string = "100gbase-kp4" + + // InterfaceTemplateTypeValueNr100gbaseDashKr2 captures enum value "100gbase-kr2" + InterfaceTemplateTypeValueNr100gbaseDashKr2 string = "100gbase-kr2" + + // InterfaceTemplateTypeValueNr100gbaseDashKr4 captures enum value "100gbase-kr4" + InterfaceTemplateTypeValueNr100gbaseDashKr4 string = "100gbase-kr4" + // InterfaceTemplateTypeValueIeee802Dot11a captures enum value "ieee802.11a" InterfaceTemplateTypeValueIeee802Dot11a string = "ieee802.11a" @@ -877,9 +1351,15 @@ const ( // InterfaceTemplateTypeValueIeee802Dot11ax captures enum value "ieee802.11ax" InterfaceTemplateTypeValueIeee802Dot11ax string = "ieee802.11ax" + // InterfaceTemplateTypeValueIeee802Dot11ay captures enum value "ieee802.11ay" + InterfaceTemplateTypeValueIeee802Dot11ay string = "ieee802.11ay" + // InterfaceTemplateTypeValueIeee802Dot15Dot1 captures enum value "ieee802.15.1" InterfaceTemplateTypeValueIeee802Dot15Dot1 string = "ieee802.15.1" + // InterfaceTemplateTypeValueOtherDashWireless captures enum value "other-wireless" + InterfaceTemplateTypeValueOtherDashWireless string = "other-wireless" + // InterfaceTemplateTypeValueGsm captures enum value "gsm" InterfaceTemplateTypeValueGsm string = "gsm" diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item.go index dae1fd1f6..83e507c30 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item.go @@ -47,7 +47,7 @@ type InventoryItem struct { // Component // Read Only: true - Component map[string]*string `json:"component,omitempty"` + Component interface{} `json:"component,omitempty"` // Component id // Maximum: 2.147483647e+09 @@ -60,7 +60,7 @@ type InventoryItem struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -95,7 +95,7 @@ type InventoryItem struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // manufacturer Manufacturer *NestedManufacturer `json:"manufacturer,omitempty"` @@ -418,10 +418,6 @@ func (m *InventoryItem) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } - if err := m.contextValidateComponent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -473,14 +469,9 @@ func (m *InventoryItem) contextValidateDepth(ctx context.Context, formats strfmt return nil } -func (m *InventoryItem) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *InventoryItem) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -523,7 +514,7 @@ func (m *InventoryItem) contextValidateID(ctx context.Context, formats strfmt.Re func (m *InventoryItem) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_role.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_role.go index 088aaf37e..40d90651e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_role.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_role.go @@ -44,7 +44,7 @@ type InventoryItemRole struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -68,7 +68,7 @@ type InventoryItemRole struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -306,7 +306,7 @@ func (m *InventoryItemRole) ContextValidate(ctx context.Context, formats strfmt. func (m *InventoryItemRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -342,7 +342,7 @@ func (m *InventoryItemRole) contextValidateInventoryitemCount(ctx context.Contex func (m *InventoryItemRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_template.go index e6f20fd09..48166f1c0 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/inventory_item_template.go @@ -40,7 +40,7 @@ type InventoryItemTemplate struct { // Component // Read Only: true - Component map[string]*string `json:"component,omitempty"` + Component interface{} `json:"component,omitempty"` // Component id // Maximum: 2.147483647e+09 @@ -53,7 +53,7 @@ type InventoryItemTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -80,7 +80,7 @@ type InventoryItemTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // manufacturer Manufacturer *NestedManufacturer `json:"manufacturer,omitempty"` @@ -338,10 +338,6 @@ func (m *InventoryItemTemplate) ContextValidate(ctx context.Context, formats str res = append(res, err) } - if err := m.contextValidateComponent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -389,14 +385,9 @@ func (m *InventoryItemTemplate) contextValidateDepth(ctx context.Context, format return nil } -func (m *InventoryItemTemplate) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *InventoryItemTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -439,7 +430,7 @@ func (m *InventoryItemTemplate) contextValidateID(ctx context.Context, formats s func (m *InventoryItemTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_address.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_address.go index 1fb78afc9..6103aa976 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_address.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_address.go @@ -57,7 +57,7 @@ type IPAddress struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -87,13 +87,14 @@ type IPAddress struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // nat inside NatInside *NestedIPAddress `json:"nat_inside,omitempty"` // nat outside - NatOutside *NestedIPAddress `json:"nat_outside,omitempty"` + // Read Only: true + NatOutside []*NestedIPAddress `json:"nat_outside"` // role Role *IPAddressRole `json:"role,omitempty"` @@ -306,15 +307,22 @@ func (m *IPAddress) validateNatOutside(formats strfmt.Registry) error { return nil } - if m.NatOutside != nil { - if err := m.NatOutside.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nat_outside") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nat_outside") + for i := 0; i < len(m.NatOutside); i++ { + if swag.IsZero(m.NatOutside[i]) { // not required + continue + } + + if m.NatOutside[i] != nil { + if err := m.NatOutside[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } + return err } - return err } + } return nil @@ -498,7 +506,7 @@ func (m *IPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *IPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -541,7 +549,7 @@ func (m *IPAddress) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *IPAddress) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -566,15 +574,23 @@ func (m *IPAddress) contextValidateNatInside(ctx context.Context, formats strfmt func (m *IPAddress) contextValidateNatOutside(ctx context.Context, formats strfmt.Registry) error { - if m.NatOutside != nil { - if err := m.NatOutside.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nat_outside") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nat_outside") + if err := validate.ReadOnly(ctx, "nat_outside", "body", []*NestedIPAddress(m.NatOutside)); err != nil { + return err + } + + for i := 0; i < len(m.NatOutside); i++ { + + if m.NatOutside[i] != nil { + if err := m.NatOutside[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } + return err } - return err } + } return nil diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_network.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_network.go new file mode 100644 index 000000000..11c8561fd --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_network.go @@ -0,0 +1,26 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// IPNetwork IP network +// +// swagger:model IPNetwork +type IPNetwork interface{} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_range.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_range.go index 86c010d88..e21b70e59 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_range.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/ip_range.go @@ -43,7 +43,7 @@ type IPRange struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -72,7 +72,7 @@ type IPRange struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // role Role *NestedRole `json:"role,omitempty"` @@ -423,7 +423,7 @@ func (m *IPRange) contextValidateChildren(ctx context.Context, formats strfmt.Re func (m *IPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -466,7 +466,7 @@ func (m *IPRange) contextValidateID(ctx context.Context, formats strfmt.Registry func (m *IPRange) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/job_result.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/job_result.go index 1f6d80645..e5fa70f47 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/job_result.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/job_result.go @@ -45,7 +45,7 @@ type JobResult struct { Created strfmt.DateTime `json:"created,omitempty"` // Data - Data *string `json:"data,omitempty"` + Data interface{} `json:"data,omitempty"` // Display // Read Only: true diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/journal_entry.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/journal_entry.go index a74405b82..396ddc0d3 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/journal_entry.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/journal_entry.go @@ -38,7 +38,7 @@ type JournalEntry struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Required: true @@ -58,7 +58,7 @@ type JournalEntry struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Created by CreatedBy *int64 `json:"created_by,omitempty"` @@ -80,7 +80,7 @@ type JournalEntry struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // tags Tags []*NestedTag `json:"tags"` @@ -257,10 +257,6 @@ func (m *JournalEntry) validateURL(formats strfmt.Registry) error { func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -295,14 +291,9 @@ func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Regis return nil } -func (m *JournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *JournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -345,7 +336,7 @@ func (m *JournalEntry) contextValidateKind(ctx context.Context, formats strfmt.R func (m *JournalEntry) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n.go new file mode 100644 index 000000000..92190ffbf --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n.go @@ -0,0 +1,795 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// L2VPN l2 v p n +// +// swagger:model L2VPN +type L2VPN struct { + + // Created + // Read Only: true + // Format: date-time + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // export targets + // Unique: true + ExportTargets []*NestedRouteTarget `json:"export_targets"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Identifier + // Maximum: 2.147483647e+09 + // Minimum: -2.147483648e+09 + Identifier *int64 `json:"identifier,omitempty"` + + // import targets + // Unique: true + ImportTargets []*NestedRouteTarget `json:"import_targets"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + + // type + Type *L2VPNType `json:"type,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this l2 v p n +func (m *L2VPN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExportTargets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImportTargets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *L2VPN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateExportTargets(formats strfmt.Registry) error { + if swag.IsZero(m.ExportTargets) { // not required + return nil + } + + if err := validate.UniqueItems("export_targets", "body", m.ExportTargets); err != nil { + return err + } + + for i := 0; i < len(m.ExportTargets); i++ { + if swag.IsZero(m.ExportTargets[i]) { // not required + continue + } + + if m.ExportTargets[i] != nil { + if err := m.ExportTargets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) validateIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.Identifier) { // not required + return nil + } + + if err := validate.MinimumInt("identifier", "body", *m.Identifier, -2.147483648e+09, false); err != nil { + return err + } + + if err := validate.MaximumInt("identifier", "body", *m.Identifier, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateImportTargets(formats strfmt.Registry) error { + if swag.IsZero(m.ImportTargets) { // not required + return nil + } + + if err := validate.UniqueItems("import_targets", "body", m.ImportTargets); err != nil { + return err + } + + for i := 0; i < len(m.ImportTargets); i++ { + if swag.IsZero(m.ImportTargets[i]) { // not required + continue + } + + if m.ImportTargets[i] != nil { + if err := m.ImportTargets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *L2VPN) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +func (m *L2VPN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this l2 v p n based on the context it is used +func (m *L2VPN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateExportTargets(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateImportTargets(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *L2VPN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) contextValidateExportTargets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ExportTargets); i++ { + + if m.ExportTargets[i] != nil { + if err := m.ExportTargets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) contextValidateImportTargets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ImportTargets); i++ { + + if m.ImportTargets[i] != nil { + if err := m.ImportTargets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { + return err + } + + return nil +} + +func (m *L2VPN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPN) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *L2VPN) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +func (m *L2VPN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *L2VPN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *L2VPN) UnmarshalBinary(b []byte) error { + var res L2VPN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// L2VPNType Type +// +// swagger:model L2VPNType +type L2VPNType struct { + + // label + // Required: true + // Enum: [VPWS VPLS VXLAN VXLAN-EVPN MPLS EVPN PBB EVPN EPL EVPL Ethernet Private LAN Ethernet Virtual Private LAN Ethernet Private Tree Ethernet Virtual Private Tree] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [vpws vpls vxlan vxlan-evpn mpls-evpn pbb-evpn epl evpl ep-lan evp-lan ep-tree evp-tree] + Value *string `json:"value"` +} + +// Validate validates this l2 v p n type +func (m *L2VPNType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var l2VPNTypeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["VPWS","VPLS","VXLAN","VXLAN-EVPN","MPLS EVPN","PBB EVPN","EPL","EVPL","Ethernet Private LAN","Ethernet Virtual Private LAN","Ethernet Private Tree","Ethernet Virtual Private Tree"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + l2VPNTypeTypeLabelPropEnum = append(l2VPNTypeTypeLabelPropEnum, v) + } +} + +const ( + + // L2VPNTypeLabelVPWS captures enum value "VPWS" + L2VPNTypeLabelVPWS string = "VPWS" + + // L2VPNTypeLabelVPLS captures enum value "VPLS" + L2VPNTypeLabelVPLS string = "VPLS" + + // L2VPNTypeLabelVXLAN captures enum value "VXLAN" + L2VPNTypeLabelVXLAN string = "VXLAN" + + // L2VPNTypeLabelVXLANDashEVPN captures enum value "VXLAN-EVPN" + L2VPNTypeLabelVXLANDashEVPN string = "VXLAN-EVPN" + + // L2VPNTypeLabelMPLSEVPN captures enum value "MPLS EVPN" + L2VPNTypeLabelMPLSEVPN string = "MPLS EVPN" + + // L2VPNTypeLabelPBBEVPN captures enum value "PBB EVPN" + L2VPNTypeLabelPBBEVPN string = "PBB EVPN" + + // L2VPNTypeLabelEPL captures enum value "EPL" + L2VPNTypeLabelEPL string = "EPL" + + // L2VPNTypeLabelEVPL captures enum value "EVPL" + L2VPNTypeLabelEVPL string = "EVPL" + + // L2VPNTypeLabelEthernetPrivateLAN captures enum value "Ethernet Private LAN" + L2VPNTypeLabelEthernetPrivateLAN string = "Ethernet Private LAN" + + // L2VPNTypeLabelEthernetVirtualPrivateLAN captures enum value "Ethernet Virtual Private LAN" + L2VPNTypeLabelEthernetVirtualPrivateLAN string = "Ethernet Virtual Private LAN" + + // L2VPNTypeLabelEthernetPrivateTree captures enum value "Ethernet Private Tree" + L2VPNTypeLabelEthernetPrivateTree string = "Ethernet Private Tree" + + // L2VPNTypeLabelEthernetVirtualPrivateTree captures enum value "Ethernet Virtual Private Tree" + L2VPNTypeLabelEthernetVirtualPrivateTree string = "Ethernet Virtual Private Tree" +) + +// prop value enum +func (m *L2VPNType) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, l2VPNTypeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *L2VPNType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("type"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var l2VPNTypeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["vpws","vpls","vxlan","vxlan-evpn","mpls-evpn","pbb-evpn","epl","evpl","ep-lan","evp-lan","ep-tree","evp-tree"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + l2VPNTypeTypeValuePropEnum = append(l2VPNTypeTypeValuePropEnum, v) + } +} + +const ( + + // L2VPNTypeValueVpws captures enum value "vpws" + L2VPNTypeValueVpws string = "vpws" + + // L2VPNTypeValueVpls captures enum value "vpls" + L2VPNTypeValueVpls string = "vpls" + + // L2VPNTypeValueVxlan captures enum value "vxlan" + L2VPNTypeValueVxlan string = "vxlan" + + // L2VPNTypeValueVxlanDashEvpn captures enum value "vxlan-evpn" + L2VPNTypeValueVxlanDashEvpn string = "vxlan-evpn" + + // L2VPNTypeValueMplsDashEvpn captures enum value "mpls-evpn" + L2VPNTypeValueMplsDashEvpn string = "mpls-evpn" + + // L2VPNTypeValuePbbDashEvpn captures enum value "pbb-evpn" + L2VPNTypeValuePbbDashEvpn string = "pbb-evpn" + + // L2VPNTypeValueEpl captures enum value "epl" + L2VPNTypeValueEpl string = "epl" + + // L2VPNTypeValueEvpl captures enum value "evpl" + L2VPNTypeValueEvpl string = "evpl" + + // L2VPNTypeValueEpDashLan captures enum value "ep-lan" + L2VPNTypeValueEpDashLan string = "ep-lan" + + // L2VPNTypeValueEvpDashLan captures enum value "evp-lan" + L2VPNTypeValueEvpDashLan string = "evp-lan" + + // L2VPNTypeValueEpDashTree captures enum value "ep-tree" + L2VPNTypeValueEpDashTree string = "ep-tree" + + // L2VPNTypeValueEvpDashTree captures enum value "evp-tree" + L2VPNTypeValueEvpDashTree string = "evp-tree" +) + +// prop value enum +func (m *L2VPNType) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, l2VPNTypeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *L2VPNType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("type"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this l2 v p n type based on context it is used +func (m *L2VPNType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *L2VPNType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *L2VPNType) UnmarshalBinary(b []byte) error { + var res L2VPNType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n_termination.go new file mode 100644 index 000000000..e78e1d507 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/l2_v_p_n_termination.go @@ -0,0 +1,367 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// L2VPNTermination l2 v p n termination +// +// swagger:model L2VPNTermination +type L2VPNTermination struct { + + // Assigned object + // Read Only: true + AssignedObject interface{} `json:"assigned_object,omitempty"` + + // Assigned object id + // Required: true + // Maximum: 2.147483647e+09 + // Minimum: 0 + AssignedObjectID *int64 `json:"assigned_object_id"` + + // Assigned object type + // Required: true + AssignedObjectType *string `json:"assigned_object_type"` + + // Created + // Read Only: true + // Format: date-time + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // l2vpn + // Required: true + L2vpn *NestedL2VPN `json:"l2vpn"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this l2 v p n termination +func (m *L2VPNTermination) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssignedObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAssignedObjectType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateL2vpn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *L2VPNTermination) validateAssignedObjectID(formats strfmt.Registry) error { + + if err := validate.Required("assigned_object_id", "body", m.AssignedObjectID); err != nil { + return err + } + + if err := validate.MinimumInt("assigned_object_id", "body", *m.AssignedObjectID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) validateAssignedObjectType(formats strfmt.Registry) error { + + if err := validate.Required("assigned_object_type", "body", m.AssignedObjectType); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) validateL2vpn(formats strfmt.Registry) error { + + if err := validate.Required("l2vpn", "body", m.L2vpn); err != nil { + return err + } + + if m.L2vpn != nil { + if err := m.L2vpn.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn") + } + return err + } + } + + return nil +} + +func (m *L2VPNTermination) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPNTermination) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this l2 v p n termination based on the context it is used +func (m *L2VPNTermination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateL2vpn(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *L2VPNTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) contextValidateL2vpn(ctx context.Context, formats strfmt.Registry) error { + + if m.L2vpn != nil { + if err := m.L2vpn.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn") + } + return err + } + } + + return nil +} + +func (m *L2VPNTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { + return err + } + + return nil +} + +func (m *L2VPNTermination) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *L2VPNTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *L2VPNTermination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *L2VPNTermination) UnmarshalBinary(b []byte) error { + var res L2VPNTermination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/location.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/location.go index fde7d2569..b23cec65d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/location.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/location.go @@ -22,6 +22,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -42,7 +43,7 @@ type Location struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +67,7 @@ type Location struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -92,6 +93,9 @@ type Location struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // status + Status *LocationStatus `json:"status,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -136,6 +140,10 @@ func (m *Location) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -267,6 +275,25 @@ func (m *Location) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Location) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + func (m *Location) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -364,6 +391,10 @@ func (m *Location) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -393,7 +424,7 @@ func (m *Location) contextValidateDepth(ctx context.Context, formats strfmt.Regi func (m *Location) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -429,7 +460,7 @@ func (m *Location) contextValidateID(ctx context.Context, formats strfmt.Registr func (m *Location) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -477,6 +508,22 @@ func (m *Location) contextValidateSite(ctx context.Context, formats strfmt.Regis return nil } +func (m *Location) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + func (m *Location) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -539,3 +586,164 @@ func (m *Location) UnmarshalBinary(b []byte) error { *m = res return nil } + +// LocationStatus Status +// +// swagger:model LocationStatus +type LocationStatus struct { + + // label + // Required: true + // Enum: [Planned Staging Active Decommissioning Retired] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [planned staging active decommissioning retired] + Value *string `json:"value"` +} + +// Validate validates this location status +func (m *LocationStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var locationStatusTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Planned","Staging","Active","Decommissioning","Retired"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + locationStatusTypeLabelPropEnum = append(locationStatusTypeLabelPropEnum, v) + } +} + +const ( + + // LocationStatusLabelPlanned captures enum value "Planned" + LocationStatusLabelPlanned string = "Planned" + + // LocationStatusLabelStaging captures enum value "Staging" + LocationStatusLabelStaging string = "Staging" + + // LocationStatusLabelActive captures enum value "Active" + LocationStatusLabelActive string = "Active" + + // LocationStatusLabelDecommissioning captures enum value "Decommissioning" + LocationStatusLabelDecommissioning string = "Decommissioning" + + // LocationStatusLabelRetired captures enum value "Retired" + LocationStatusLabelRetired string = "Retired" +) + +// prop value enum +func (m *LocationStatus) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, locationStatusTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *LocationStatus) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("status"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var locationStatusTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["planned","staging","active","decommissioning","retired"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + locationStatusTypeValuePropEnum = append(locationStatusTypeValuePropEnum, v) + } +} + +const ( + + // LocationStatusValuePlanned captures enum value "planned" + LocationStatusValuePlanned string = "planned" + + // LocationStatusValueStaging captures enum value "staging" + LocationStatusValueStaging string = "staging" + + // LocationStatusValueActive captures enum value "active" + LocationStatusValueActive string = "active" + + // LocationStatusValueDecommissioning captures enum value "decommissioning" + LocationStatusValueDecommissioning string = "decommissioning" + + // LocationStatusValueRetired captures enum value "retired" + LocationStatusValueRetired string = "retired" +) + +// prop value enum +func (m *LocationStatus) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, locationStatusTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *LocationStatus) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("status"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this location status based on context it is used +func (m *LocationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *LocationStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LocationStatus) UnmarshalBinary(b []byte) error { + var res LocationStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/manufacturer.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/manufacturer.go index a92e568f9..f33cb5996 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/manufacturer.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/manufacturer.go @@ -38,7 +38,7 @@ type Manufacturer struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type Manufacturer struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -292,7 +292,7 @@ func (m *Manufacturer) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *Manufacturer) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -337,7 +337,7 @@ func (m *Manufacturer) contextValidateInventoryitemCount(ctx context.Context, fo func (m *Manufacturer) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module.go index 003635f75..1e175dad8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module.go @@ -47,7 +47,7 @@ type Module struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -67,7 +67,7 @@ type Module struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module bay // Required: true @@ -330,7 +330,7 @@ func (m *Module) ContextValidate(ctx context.Context, formats strfmt.Registry) e func (m *Module) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -373,7 +373,7 @@ func (m *Module) contextValidateID(ctx context.Context, formats strfmt.Registry) func (m *Module) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay.go index ea5cb1cd9..fa293ecd9 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay.go @@ -38,7 +38,7 @@ type ModuleBay struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -71,7 +71,7 @@ type ModuleBay struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -342,7 +342,7 @@ func (m *ModuleBay) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *ModuleBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -401,7 +401,7 @@ func (m *ModuleBay) contextValidateInstalledModule(ctx context.Context, formats func (m *ModuleBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay_template.go index 7618e81b0..3298fe1a8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_bay_template.go @@ -37,7 +37,7 @@ type ModuleBayTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type ModuleBayTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -275,7 +275,7 @@ func (m *ModuleBayTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *ModuleBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -318,7 +318,7 @@ func (m *ModuleBayTemplate) contextValidateID(ctx context.Context, formats strfm func (m *ModuleBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_type.go index b1f9a04af..068e54198 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/module_type.go @@ -41,7 +41,7 @@ type ModuleType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -57,7 +57,7 @@ type ModuleType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // manufacturer // Required: true @@ -273,7 +273,7 @@ func (m *ModuleType) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *ModuleType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -300,7 +300,7 @@ func (m *ModuleType) contextValidateID(ctx context.Context, formats strfmt.Regis func (m *ModuleType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_interface.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_interface.go index 1f767ccd2..45ad8dd3e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_interface.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_interface.go @@ -36,7 +36,7 @@ type NestedInterface struct { // occupied // Read Only: true - Occupied string `json:"_occupied,omitempty"` + Occupied *bool `json:"_occupied,omitempty"` // Cable Cable *int64 `json:"cable,omitempty"` @@ -166,7 +166,7 @@ func (m *NestedInterface) ContextValidate(ctx context.Context, formats strfmt.Re func (m *NestedInterface) contextValidateOccupied(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "_occupied", "body", string(m.Occupied)); err != nil { + if err := validate.ReadOnly(ctx, "_occupied", "body", m.Occupied); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n.go new file mode 100644 index 000000000..c9dd60457 --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n.go @@ -0,0 +1,309 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedL2VPN nested l2 v p n +// +// swagger:model NestedL2VPN +type NestedL2VPN struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Identifier + // Maximum: 2.147483647e+09 + // Minimum: -2.147483648e+09 + Identifier *int64 `json:"identifier,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // Type + // Required: true + // Enum: [vpws vpls vxlan vxlan-evpn mpls-evpn pbb-evpn epl evpl ep-lan evp-lan ep-tree evp-tree] + Type *string `json:"type"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested l2 v p n +func (m *NestedL2VPN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedL2VPN) validateIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.Identifier) { // not required + return nil + } + + if err := validate.MinimumInt("identifier", "body", *m.Identifier, -2.147483648e+09, false); err != nil { + return err + } + + if err := validate.MaximumInt("identifier", "body", *m.Identifier, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPN) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPN) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +var nestedL2VPNTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["vpws","vpls","vxlan","vxlan-evpn","mpls-evpn","pbb-evpn","epl","evpl","ep-lan","evp-lan","ep-tree","evp-tree"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + nestedL2VPNTypeTypePropEnum = append(nestedL2VPNTypeTypePropEnum, v) + } +} + +const ( + + // NestedL2VPNTypeVpws captures enum value "vpws" + NestedL2VPNTypeVpws string = "vpws" + + // NestedL2VPNTypeVpls captures enum value "vpls" + NestedL2VPNTypeVpls string = "vpls" + + // NestedL2VPNTypeVxlan captures enum value "vxlan" + NestedL2VPNTypeVxlan string = "vxlan" + + // NestedL2VPNTypeVxlanDashEvpn captures enum value "vxlan-evpn" + NestedL2VPNTypeVxlanDashEvpn string = "vxlan-evpn" + + // NestedL2VPNTypeMplsDashEvpn captures enum value "mpls-evpn" + NestedL2VPNTypeMplsDashEvpn string = "mpls-evpn" + + // NestedL2VPNTypePbbDashEvpn captures enum value "pbb-evpn" + NestedL2VPNTypePbbDashEvpn string = "pbb-evpn" + + // NestedL2VPNTypeEpl captures enum value "epl" + NestedL2VPNTypeEpl string = "epl" + + // NestedL2VPNTypeEvpl captures enum value "evpl" + NestedL2VPNTypeEvpl string = "evpl" + + // NestedL2VPNTypeEpDashLan captures enum value "ep-lan" + NestedL2VPNTypeEpDashLan string = "ep-lan" + + // NestedL2VPNTypeEvpDashLan captures enum value "evp-lan" + NestedL2VPNTypeEvpDashLan string = "evp-lan" + + // NestedL2VPNTypeEpDashTree captures enum value "ep-tree" + NestedL2VPNTypeEpDashTree string = "ep-tree" + + // NestedL2VPNTypeEvpDashTree captures enum value "evp-tree" + NestedL2VPNTypeEvpDashTree string = "evp-tree" +) + +// prop value enum +func (m *NestedL2VPN) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, nestedL2VPNTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NestedL2VPN) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested l2 v p n based on the context it is used +func (m *NestedL2VPN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedL2VPN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedL2VPN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedL2VPN) UnmarshalBinary(b []byte) error { + var res NestedL2VPN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n_termination.go new file mode 100644 index 000000000..6c9148c4e --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_l2_v_p_n_termination.go @@ -0,0 +1,190 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedL2VPNTermination nested l2 v p n termination +// +// swagger:model NestedL2VPNTermination +type NestedL2VPNTermination struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // l2vpn + // Required: true + L2vpn *NestedL2VPN `json:"l2vpn"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested l2 v p n termination +func (m *NestedL2VPNTermination) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateL2vpn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedL2VPNTermination) validateL2vpn(formats strfmt.Registry) error { + + if err := validate.Required("l2vpn", "body", m.L2vpn); err != nil { + return err + } + + if m.L2vpn != nil { + if err := m.L2vpn.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn") + } + return err + } + } + + return nil +} + +func (m *NestedL2VPNTermination) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested l2 v p n termination based on the context it is used +func (m *NestedL2VPNTermination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateL2vpn(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedL2VPNTermination) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPNTermination) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedL2VPNTermination) contextValidateL2vpn(ctx context.Context, formats strfmt.Registry) error { + + if m.L2vpn != nil { + if err := m.L2vpn.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn") + } + return err + } + } + + return nil +} + +func (m *NestedL2VPNTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedL2VPNTermination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedL2VPNTermination) UnmarshalBinary(b []byte) error { + var res NestedL2VPNTermination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_power_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_power_port.go index ae63722c1..c8ee8f255 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_power_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_power_port.go @@ -36,7 +36,7 @@ type NestedPowerPort struct { // occupied // Read Only: true - Occupied string `json:"_occupied,omitempty"` + Occupied *bool `json:"_occupied,omitempty"` // Cable Cable *int64 `json:"cable,omitempty"` @@ -166,7 +166,7 @@ func (m *NestedPowerPort) ContextValidate(ctx context.Context, formats strfmt.Re func (m *NestedPowerPort) contextValidateOccupied(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "_occupied", "body", string(m.Occupied)); err != nil { + if err := validate.ReadOnly(ctx, "_occupied", "body", m.Occupied); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_tag.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_tag.go index 19e9ce126..4eb1b1b68 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_tag.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/nested_tag.go @@ -58,7 +58,6 @@ type NestedTag struct { // Required: true // Max Length: 100 // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` // Url @@ -144,10 +143,6 @@ func (m *NestedTag) validateSlug(formats strfmt.Registry) error { return err } - if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { - return err - } - return nil } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_change.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_change.go index b6b04c723..996c725bc 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_change.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_change.go @@ -44,7 +44,7 @@ type ObjectChange struct { // Serialize a nested representation of the changed object. // // Read Only: true - ChangedObject map[string]*string `json:"changed_object,omitempty"` + ChangedObject interface{} `json:"changed_object,omitempty"` // Changed object id // Required: true @@ -66,11 +66,11 @@ type ObjectChange struct { // Postchange data // Read Only: true - PostchangeData string `json:"postchange_data,omitempty"` + PostchangeData interface{} `json:"postchange_data,omitempty"` // Prechange data // Read Only: true - PrechangeData string `json:"prechange_data,omitempty"` + PrechangeData interface{} `json:"prechange_data,omitempty"` // Request id // Read Only: true @@ -245,10 +245,6 @@ func (m *ObjectChange) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidateChangedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateChangedObjectType(ctx, formats); err != nil { res = append(res, err) } @@ -261,14 +257,6 @@ func (m *ObjectChange) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } - if err := m.contextValidatePostchangeData(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrechangeData(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateRequestID(ctx, formats); err != nil { res = append(res, err) } @@ -311,11 +299,6 @@ func (m *ObjectChange) contextValidateAction(ctx context.Context, formats strfmt return nil } -func (m *ObjectChange) contextValidateChangedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *ObjectChange) contextValidateChangedObjectType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "changed_object_type", "body", string(m.ChangedObjectType)); err != nil { @@ -343,24 +326,6 @@ func (m *ObjectChange) contextValidateID(ctx context.Context, formats strfmt.Reg return nil } -func (m *ObjectChange) contextValidatePostchangeData(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "postchange_data", "body", string(m.PostchangeData)); err != nil { - return err - } - - return nil -} - -func (m *ObjectChange) contextValidatePrechangeData(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "prechange_data", "body", string(m.PrechangeData)); err != nil { - return err - } - - return nil -} - func (m *ObjectChange) contextValidateRequestID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "request_id", "body", strfmt.UUID(m.RequestID)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_permission.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_permission.go index 01ec46015..3b835d75c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_permission.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/object_permission.go @@ -42,7 +42,7 @@ type ObjectPermission struct { // Constraints // // Queryset filter matching the applicable objects of the selected type(s) - Constraints *string `json:"constraints,omitempty"` + Constraints interface{} `json:"constraints,omitempty"` // Description // Max Length: 200 diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/platform.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/platform.go index d20e9af32..5f0a91f06 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/platform.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/platform.go @@ -38,7 +38,7 @@ type Platform struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type Platform struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // manufacturer Manufacturer *NestedManufacturer `json:"manufacturer,omitempty"` @@ -76,7 +76,7 @@ type Platform struct { // NAPALM arguments // // Additional arguments to pass when initiating the NAPALM driver (JSON format) - NapalmArgs *string `json:"napalm_args,omitempty"` + NapalmArgs interface{} `json:"napalm_args,omitempty"` // NAPALM driver // @@ -341,7 +341,7 @@ func (m *Platform) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Platform) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -377,7 +377,7 @@ func (m *Platform) contextValidateID(ctx context.Context, formats strfmt.Registr func (m *Platform) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_feed.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_feed.go index ee6707c2a..300e6bd4d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_feed.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_feed.go @@ -48,29 +48,32 @@ type PowerFeed struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Comments Comments string `json:"comments,omitempty"` - // Connected endpoint - // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -86,19 +89,17 @@ type PowerFeed struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -163,6 +164,10 @@ func (m *PowerFeed) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -256,6 +261,18 @@ func (m *PowerFeed) validateCable(formats strfmt.Registry) error { return nil } +func (m *PowerFeed) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *PowerFeed) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -494,15 +511,19 @@ func (m *PowerFeed) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -522,11 +543,11 @@ func (m *PowerFeed) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -593,23 +614,36 @@ func (m *PowerFeed) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerFeed) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *PowerFeed) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *PowerFeed) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerFeed) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *PowerFeed) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerFeed) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -618,7 +652,7 @@ func (m *PowerFeed) contextValidateConnectedEndpointType(ctx context.Context, fo func (m *PowerFeed) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -645,21 +679,25 @@ func (m *PowerFeed) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *PowerFeed) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *PowerFeed) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerFeed) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *PowerFeed) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerFeed) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet.go index 36f04b652..3dd94a9ad 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet.go @@ -43,26 +43,29 @@ type PowerOutlet struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -95,19 +98,17 @@ type PowerOutlet struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -146,6 +147,10 @@ func (m *PowerOutlet) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -219,6 +224,18 @@ func (m *PowerOutlet) validateCable(formats strfmt.Registry) error { return nil } +func (m *PowerOutlet) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *PowerOutlet) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -430,15 +447,19 @@ func (m *PowerOutlet) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -466,11 +487,11 @@ func (m *PowerOutlet) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -525,23 +546,36 @@ func (m *PowerOutlet) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *PowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerOutlet) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *PowerOutlet) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *PowerOutlet) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerOutlet) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *PowerOutlet) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerOutlet) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -550,7 +584,7 @@ func (m *PowerOutlet) contextValidateConnectedEndpointType(ctx context.Context, func (m *PowerOutlet) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -609,21 +643,25 @@ func (m *PowerOutlet) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *PowerOutlet) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *PowerOutlet) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerOutlet) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *PowerOutlet) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerOutlet) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet_template.go index 7c744c277..4c98d8a71 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_outlet_template.go @@ -38,7 +38,7 @@ type PowerOutletTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -67,7 +67,7 @@ type PowerOutletTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module type ModuleType *NestedModuleType `json:"module_type,omitempty"` @@ -372,7 +372,7 @@ func (m *PowerOutletTemplate) ContextValidate(ctx context.Context, formats strfm func (m *PowerOutletTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -431,7 +431,7 @@ func (m *PowerOutletTemplate) contextValidateID(ctx context.Context, formats str func (m *PowerOutletTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_panel.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_panel.go index 31f44f9ca..574530d7b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_panel.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_panel.go @@ -38,7 +38,7 @@ type PowerPanel struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +54,7 @@ type PowerPanel struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // location Location *NestedLocation `json:"location,omitempty"` @@ -286,7 +286,7 @@ func (m *PowerPanel) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *PowerPanel) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -313,7 +313,7 @@ func (m *PowerPanel) contextValidateID(ctx context.Context, formats strfmt.Regis func (m *PowerPanel) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port.go index 9ef0223b7..8ab67e6f9 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port.go @@ -50,26 +50,29 @@ type PowerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -99,19 +102,17 @@ type PowerPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -158,6 +159,10 @@ func (m *PowerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -243,6 +248,18 @@ func (m *PowerPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *PowerPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *PowerPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -432,15 +449,19 @@ func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -464,11 +485,11 @@ func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -519,23 +540,36 @@ func (m *PowerPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *PowerPort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *PowerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerPort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *PowerPort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerPort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -544,7 +578,7 @@ func (m *PowerPort) contextValidateConnectedEndpointType(ctx context.Context, fo func (m *PowerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -587,21 +621,25 @@ func (m *PowerPort) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *PowerPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *PowerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *PowerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *PowerPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port_template.go index 13da623d3..1aa6b2f3f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/power_port_template.go @@ -45,7 +45,7 @@ type PowerPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -71,7 +71,7 @@ type PowerPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Maximum draw // @@ -366,7 +366,7 @@ func (m *PowerPortTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *PowerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -409,7 +409,7 @@ func (m *PowerPortTemplate) contextValidateID(ctx context.Context, formats strfm func (m *PowerPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/prefix.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/prefix.go index 839dcfd1a..c9dfd035a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/prefix.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/prefix.go @@ -47,7 +47,7 @@ type Prefix struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -75,7 +75,7 @@ type Prefix struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Mark utilized // @@ -483,7 +483,7 @@ func (m *Prefix) contextValidateChildren(ctx context.Context, formats strfmt.Reg func (m *Prefix) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -526,7 +526,7 @@ func (m *Prefix) contextValidateID(ctx context.Context, formats strfmt.Registry) func (m *Prefix) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider.go index f00a8d945..04b947599 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider.go @@ -63,7 +63,7 @@ type Provider struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -79,7 +79,7 @@ type Provider struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -408,7 +408,7 @@ func (m *Provider) contextValidateCircuitCount(ctx context.Context, formats strf func (m *Provider) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -435,7 +435,7 @@ func (m *Provider) contextValidateID(ctx context.Context, formats strfmt.Registr func (m *Provider) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider_network.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider_network.go index f0d482cc5..ed3a0beda 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider_network.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/provider_network.go @@ -41,7 +41,7 @@ type ProviderNetwork struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -61,7 +61,7 @@ type ProviderNetwork struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -291,7 +291,7 @@ func (m *ProviderNetwork) ContextValidate(ctx context.Context, formats strfmt.Re func (m *ProviderNetwork) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -318,7 +318,7 @@ func (m *ProviderNetwork) contextValidateID(ctx context.Context, formats strfmt. func (m *ProviderNetwork) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/r_i_r.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/r_i_r.go index 07ca40da6..40adc126c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/r_i_r.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/r_i_r.go @@ -42,7 +42,7 @@ type RIR struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -67,7 +67,7 @@ type RIR struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -290,7 +290,7 @@ func (m *RIR) contextValidateAggregateCount(ctx context.Context, formats strfmt. func (m *RIR) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -317,7 +317,7 @@ func (m *RIR) contextValidateID(ctx context.Context, formats strfmt.Registry) er func (m *RIR) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack.go index 79c2ea911..57196e35e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack.go @@ -48,7 +48,7 @@ type Rack struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -77,7 +77,7 @@ type Rack struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // location Location *NestedLocation `json:"location,omitempty"` @@ -626,7 +626,7 @@ func (m *Rack) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Rack) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -662,7 +662,7 @@ func (m *Rack) contextValidateID(ctx context.Context, formats strfmt.Registry) e func (m *Rack) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -1164,12 +1164,12 @@ type RackType struct { // label // Required: true - // Enum: [2-post frame 4-post frame 4-post cabinet Wall-mounted frame Wall-mounted cabinet] + // Enum: [2-post frame 4-post frame 4-post cabinet Wall-mounted frame Wall-mounted frame (vertical) Wall-mounted cabinet Wall-mounted cabinet (vertical)] Label *string `json:"label"` // value // Required: true - // Enum: [2-post-frame 4-post-frame 4-post-cabinet wall-frame wall-cabinet] + // Enum: [2-post-frame 4-post-frame 4-post-cabinet wall-frame wall-frame-vertical wall-cabinet wall-cabinet-vertical] Value *string `json:"value"` } @@ -1195,7 +1195,7 @@ var rackTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["2-post frame","4-post frame","4-post cabinet","Wall-mounted frame","Wall-mounted cabinet"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["2-post frame","4-post frame","4-post cabinet","Wall-mounted frame","Wall-mounted frame (vertical)","Wall-mounted cabinet","Wall-mounted cabinet (vertical)"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1217,8 +1217,14 @@ const ( // RackTypeLabelWallDashMountedFrame captures enum value "Wall-mounted frame" RackTypeLabelWallDashMountedFrame string = "Wall-mounted frame" + // RackTypeLabelWallDashMountedFrameVertical captures enum value "Wall-mounted frame (vertical)" + RackTypeLabelWallDashMountedFrameVertical string = "Wall-mounted frame (vertical)" + // RackTypeLabelWallDashMountedCabinet captures enum value "Wall-mounted cabinet" RackTypeLabelWallDashMountedCabinet string = "Wall-mounted cabinet" + + // RackTypeLabelWallDashMountedCabinetVertical captures enum value "Wall-mounted cabinet (vertical)" + RackTypeLabelWallDashMountedCabinetVertical string = "Wall-mounted cabinet (vertical)" ) // prop value enum @@ -1247,7 +1253,7 @@ var rackTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["2-post-frame","4-post-frame","4-post-cabinet","wall-frame","wall-cabinet"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["2-post-frame","4-post-frame","4-post-cabinet","wall-frame","wall-frame-vertical","wall-cabinet","wall-cabinet-vertical"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1269,8 +1275,14 @@ const ( // RackTypeValueWallDashFrame captures enum value "wall-frame" RackTypeValueWallDashFrame string = "wall-frame" + // RackTypeValueWallDashFrameDashVertical captures enum value "wall-frame-vertical" + RackTypeValueWallDashFrameDashVertical string = "wall-frame-vertical" + // RackTypeValueWallDashCabinet captures enum value "wall-cabinet" RackTypeValueWallDashCabinet string = "wall-cabinet" + + // RackTypeValueWallDashCabinetDashVertical captures enum value "wall-cabinet-vertical" + RackTypeValueWallDashCabinetDashVertical string = "wall-cabinet-vertical" ) // prop value enum diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_reservation.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_reservation.go index e15c3615a..85b31b46f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_reservation.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_reservation.go @@ -38,7 +38,7 @@ type RackReservation struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +60,7 @@ type RackReservation struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // rack // Required: true @@ -342,7 +342,7 @@ func (m *RackReservation) ContextValidate(ctx context.Context, formats strfmt.Re func (m *RackReservation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -369,7 +369,7 @@ func (m *RackReservation) contextValidateID(ctx context.Context, formats strfmt. func (m *RackReservation) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_role.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_role.go index e522e9bde..0f79ea0dc 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_role.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_role.go @@ -44,7 +44,7 @@ type RackRole struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +64,7 @@ type RackRole struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -306,7 +306,7 @@ func (m *RackRole) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *RackRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -333,7 +333,7 @@ func (m *RackRole) contextValidateID(ctx context.Context, formats strfmt.Registr func (m *RackRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_unit.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_unit.go index 61813ec2f..7f25aaa94 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_unit.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rack_unit.go @@ -47,7 +47,7 @@ type RackUnit struct { // Id // Read Only: true - ID int64 `json:"id,omitempty"` + ID float64 `json:"id,omitempty"` // Name // Read Only: true @@ -208,7 +208,7 @@ func (m *RackUnit) contextValidateFace(ctx context.Context, formats strfmt.Regis func (m *RackUnit) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", float64(m.ID)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port.go index 11c798e19..c783479f4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port.go @@ -43,6 +43,11 @@ type RearPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -51,7 +56,7 @@ type RearPort struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -81,19 +86,17 @@ type RearPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -135,6 +138,10 @@ func (m *RearPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -208,6 +215,18 @@ func (m *RearPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *RearPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *RearPort) validateColor(formats strfmt.Registry) error { if swag.IsZero(m.Color) { // not required return nil @@ -414,6 +433,10 @@ func (m *RearPort) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -434,11 +457,11 @@ func (m *RearPort) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -489,9 +512,18 @@ func (m *RearPort) contextValidateCable(ctx context.Context, formats strfmt.Regi return nil } +func (m *RearPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *RearPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -534,21 +566,25 @@ func (m *RearPort) contextValidateID(ctx context.Context, formats strfmt.Registr func (m *RearPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *RearPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *RearPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *RearPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *RearPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port_template.go index f34b8a11a..b12f4e6a6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/rear_port_template.go @@ -43,7 +43,7 @@ type RearPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -69,7 +69,7 @@ type RearPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // module type ModuleType *NestedModuleType `json:"module_type,omitempty"` @@ -364,7 +364,7 @@ func (m *RearPortTemplate) ContextValidate(ctx context.Context, formats strfmt.R func (m *RearPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -407,7 +407,7 @@ func (m *RearPortTemplate) contextValidateID(ctx context.Context, formats strfmt func (m *RearPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/region.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/region.go index 792e6eb13..f49e0a027 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/region.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/region.go @@ -42,7 +42,7 @@ type Region struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type Region struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -323,7 +323,7 @@ func (m *Region) contextValidateDepth(ctx context.Context, formats strfmt.Regist func (m *Region) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -350,7 +350,7 @@ func (m *Region) contextValidateID(ctx context.Context, formats strfmt.Registry) func (m *Region) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/role.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/role.go index a7f2e4b86..721a13a4d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/role.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/role.go @@ -38,7 +38,7 @@ type Role struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type Role struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -309,7 +309,7 @@ func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Role) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -336,7 +336,7 @@ func (m *Role) contextValidateID(ctx context.Context, formats strfmt.Registry) e func (m *Role) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/route_target.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/route_target.go index 3629bc33c..37446e8d8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/route_target.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/route_target.go @@ -38,7 +38,7 @@ type RouteTarget struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type RouteTarget struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -268,7 +268,7 @@ func (m *RouteTarget) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *RouteTarget) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -295,7 +295,7 @@ func (m *RouteTarget) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *RouteTarget) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/service.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/service.go index dee27bfeb..4c4a02895 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/service.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/service.go @@ -39,7 +39,7 @@ type Service struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type Service struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -398,7 +398,7 @@ func (m *Service) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Service) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -461,7 +461,7 @@ func (m *Service) contextValidateIpaddresses(ctx context.Context, formats strfmt func (m *Service) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/service_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/service_template.go index c3a43faeb..18c89440b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/service_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/service_template.go @@ -39,7 +39,7 @@ type ServiceTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +59,7 @@ type ServiceTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -296,7 +296,7 @@ func (m *ServiceTemplate) ContextValidate(ctx context.Context, formats strfmt.Re func (m *ServiceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -323,7 +323,7 @@ func (m *ServiceTemplate) contextValidateID(ctx context.Context, formats strfmt. func (m *ServiceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/site.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/site.go index 10cb3df4e..a347f4594 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/site.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/site.go @@ -50,7 +50,7 @@ type Site struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -83,7 +83,7 @@ type Site struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Latitude // @@ -137,7 +137,7 @@ type Site struct { Tenant *NestedTenant `json:"tenant,omitempty"` // Time zone - TimeZone string `json:"time_zone,omitempty"` + TimeZone *string `json:"time_zone,omitempty"` // Url // Read Only: true @@ -586,7 +586,7 @@ func (m *Site) contextValidateCircuitCount(ctx context.Context, formats strfmt.R func (m *Site) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -638,7 +638,7 @@ func (m *Site) contextValidateID(ctx context.Context, formats strfmt.Registry) e func (m *Site) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/site_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/site_group.go index 99d5224b0..ffbbe24ae 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/site_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/site_group.go @@ -42,7 +42,7 @@ type SiteGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type SiteGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -323,7 +323,7 @@ func (m *SiteGroup) contextValidateDepth(ctx context.Context, formats strfmt.Reg func (m *SiteGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -350,7 +350,7 @@ func (m *SiteGroup) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *SiteGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tag.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tag.go index 16f0fee66..9d851b409 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tag.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tag.go @@ -43,7 +43,7 @@ type Tag struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -60,7 +60,7 @@ type Tag struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -72,7 +72,6 @@ type Tag struct { // Required: true // Max Length: 100 // Min Length: 1 - // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` // Tagged items @@ -210,10 +209,6 @@ func (m *Tag) validateSlug(formats strfmt.Registry) error { return err } - if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { - return err - } - return nil } @@ -265,7 +260,7 @@ func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *Tag) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -292,7 +287,7 @@ func (m *Tag) contextValidateID(ctx context.Context, formats strfmt.Registry) er func (m *Tag) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant.go index b9602c0c4..e47c83f13 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant.go @@ -49,7 +49,7 @@ type Tenant struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +80,7 @@ type Tenant struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -399,7 +399,7 @@ func (m *Tenant) contextValidateClusterCount(ctx context.Context, formats strfmt func (m *Tenant) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -460,7 +460,7 @@ func (m *Tenant) contextValidateIpaddressCount(ctx context.Context, formats strf func (m *Tenant) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant_group.go index b943528ab..91c44364f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/tenant_group.go @@ -42,7 +42,7 @@ type TenantGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type TenantGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -323,7 +323,7 @@ func (m *TenantGroup) contextValidateDepth(ctx context.Context, formats strfmt.R func (m *TenantGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -350,7 +350,7 @@ func (m *TenantGroup) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *TenantGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/token.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/token.go index 0d7aae04d..e2fae3097 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/token.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/token.go @@ -34,6 +34,9 @@ import ( // swagger:model Token type Token struct { + // allowed ips + AllowedIps []IPNetwork `json:"allowed_ips"` + // Created // Read Only: true // Format: date-time @@ -60,6 +63,10 @@ type Token struct { // Min Length: 40 Key string `json:"key,omitempty"` + // Last used + // Format: date-time + LastUsed *strfmt.DateTime `json:"last_used,omitempty"` + // Url // Read Only: true // Format: uri @@ -95,6 +102,10 @@ func (m *Token) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUsed(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -161,6 +172,18 @@ func (m *Token) validateKey(formats strfmt.Registry) error { return nil } +func (m *Token) validateLastUsed(formats strfmt.Registry) error { + if swag.IsZero(m.LastUsed) { // not required + return nil + } + + if err := validate.FormatOf("last_used", "body", "date-time", m.LastUsed.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Token) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n.go index ad7af98bb..6aaed092a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n.go @@ -39,7 +39,7 @@ type VLAN struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,10 +59,13 @@ type VLAN struct { // Read Only: true ID int64 `json:"id,omitempty"` + // l2vpn termination + L2vpnTermination *NestedL2VPNTermination `json:"l2vpn_termination,omitempty"` + // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -117,6 +120,10 @@ func (m *VLAN) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateL2vpnTermination(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastUpdated(formats); err != nil { res = append(res, err) } @@ -202,6 +209,25 @@ func (m *VLAN) validateGroup(formats strfmt.Registry) error { return nil } +func (m *VLAN) validateL2vpnTermination(formats strfmt.Registry) error { + if swag.IsZero(m.L2vpnTermination) { // not required + return nil + } + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *VLAN) validateLastUpdated(formats strfmt.Registry) error { if swag.IsZero(m.LastUpdated) { // not required return nil @@ -382,6 +408,10 @@ func (m *VLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -422,7 +452,7 @@ func (m *VLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *VLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -463,9 +493,25 @@ func (m *VLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) e return nil } +func (m *VLAN) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *VLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n_group.go index 37c9f7a8f..44d9ed7bb 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_l_a_n_group.go @@ -38,7 +38,7 @@ type VLANGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type VLANGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Maximum VLAN ID // @@ -88,7 +88,7 @@ type VLANGroup struct { ScopeID *int64 `json:"scope_id,omitempty"` // Scope type - ScopeType string `json:"scope_type,omitempty"` + ScopeType *string `json:"scope_type,omitempty"` // Slug // Required: true @@ -340,7 +340,7 @@ func (m *VLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *VLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -367,7 +367,7 @@ func (m *VLANGroup) contextValidateID(ctx context.Context, formats strfmt.Regist func (m *VLANGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_r_f.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_r_f.go index 073bc879c..aa0e6e2c6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_r_f.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/v_r_f.go @@ -38,7 +38,7 @@ type VRF struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -75,7 +75,7 @@ type VRF struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -393,7 +393,7 @@ func (m *VRF) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *VRF) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -469,7 +469,7 @@ func (m *VRF) contextValidateIpaddressCount(ctx context.Context, formats strfmt. func (m *VRF) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_chassis.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_chassis.go index c361e3535..ada4fa6c8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_chassis.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_chassis.go @@ -38,7 +38,7 @@ type VirtualChassis struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type VirtualChassis struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // master Master *NestedDevice `json:"master,omitempty"` @@ -274,7 +274,7 @@ func (m *VirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *VirtualChassis) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -301,7 +301,7 @@ func (m *VirtualChassis) contextValidateID(ctx context.Context, formats strfmt.R func (m *VirtualChassis) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_machine_with_config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_machine_with_config_context.go index 5149582f3..a072355be 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_machine_with_config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/virtual_machine_with_config_context.go @@ -37,8 +37,7 @@ import ( type VirtualMachineWithConfigContext struct { // cluster - // Required: true - Cluster *NestedCluster `json:"cluster"` + Cluster *NestedCluster `json:"cluster,omitempty"` // Comments Comments string `json:"comments,omitempty"` @@ -50,11 +49,14 @@ type VirtualMachineWithConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` + // device + Device *NestedDevice `json:"device,omitempty"` + // Disk (GB) // Maximum: 2.147483647e+09 // Minimum: 0 @@ -71,7 +73,7 @@ type VirtualMachineWithConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Local context data LocalContextData interface{} `json:"local_context_data,omitempty"` @@ -136,6 +138,10 @@ func (m *VirtualMachineWithConfigContext) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + if err := m.validateDisk(formats); err != nil { res = append(res, err) } @@ -203,9 +209,8 @@ func (m *VirtualMachineWithConfigContext) Validate(formats strfmt.Registry) erro } func (m *VirtualMachineWithConfigContext) validateCluster(formats strfmt.Registry) error { - - if err := validate.Required("cluster", "body", m.Cluster); err != nil { - return err + if swag.IsZero(m.Cluster) { // not required + return nil } if m.Cluster != nil { @@ -234,6 +239,25 @@ func (m *VirtualMachineWithConfigContext) validateCreated(formats strfmt.Registr return nil } +func (m *VirtualMachineWithConfigContext) validateDevice(formats strfmt.Registry) error { + if swag.IsZero(m.Device) { // not required + return nil + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + func (m *VirtualMachineWithConfigContext) validateDisk(formats strfmt.Registry) error { if swag.IsZero(m.Disk) { // not required return nil @@ -509,6 +533,10 @@ func (m *VirtualMachineWithConfigContext) ContextValidate(ctx context.Context, f res = append(res, err) } + if err := m.contextValidateDevice(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -585,13 +613,29 @@ func (m *VirtualMachineWithConfigContext) contextValidateCluster(ctx context.Con func (m *VirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } return nil } +func (m *VirtualMachineWithConfigContext) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + + if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + func (m *VirtualMachineWithConfigContext) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -612,7 +656,7 @@ func (m *VirtualMachineWithConfigContext) contextValidateID(ctx context.Context, func (m *VirtualMachineWithConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/vm_interface.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/vm_interface.go index 466e9d977..1c03b07ff 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/vm_interface.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/vm_interface.go @@ -50,7 +50,7 @@ type VMInterface struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,10 +70,13 @@ type VMInterface struct { // Read Only: true ID int64 `json:"id,omitempty"` + // l2vpn termination + L2vpnTermination *NestedL2VPNTermination `json:"l2vpn_termination,omitempty"` + // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -134,6 +137,10 @@ func (m *VMInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateL2vpnTermination(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastUpdated(formats); err != nil { res = append(res, err) } @@ -227,6 +234,25 @@ func (m *VMInterface) validateDescription(formats strfmt.Registry) error { return nil } +func (m *VMInterface) validateL2vpnTermination(formats strfmt.Registry) error { + if swag.IsZero(m.L2vpnTermination) { // not required + return nil + } + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *VMInterface) validateLastUpdated(formats strfmt.Registry) error { if swag.IsZero(m.LastUpdated) { // not required return nil @@ -464,6 +490,10 @@ func (m *VMInterface) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -542,7 +572,7 @@ func (m *VMInterface) contextValidateCountIpaddresses(ctx context.Context, forma func (m *VMInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -567,9 +597,25 @@ func (m *VMInterface) contextValidateID(ctx context.Context, formats strfmt.Regi return nil } +func (m *VMInterface) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if m.L2vpnTermination != nil { + if err := m.L2vpnTermination.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("l2vpn_termination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("l2vpn_termination") + } + return err + } + } + + return nil +} + func (m *VMInterface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/webhook.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/webhook.go index 1474c1467..5459eaa63 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/webhook.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/webhook.go @@ -54,7 +54,7 @@ type Webhook struct { // Conditions // // A set of conditions which determine whether the webhook will be generated. - Conditions *string `json:"conditions,omitempty"` + Conditions interface{} `json:"conditions,omitempty"` // content types // Required: true @@ -64,7 +64,7 @@ type Webhook struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -91,7 +91,7 @@ type Webhook struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -395,7 +395,7 @@ func (m *Webhook) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Webhook) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -422,7 +422,7 @@ func (m *Webhook) contextValidateID(ctx context.Context, formats strfmt.Registry func (m *Webhook) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n.go index 081228e45..6ee1b8920 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n.go @@ -49,7 +49,7 @@ type WirelessLAN struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -72,7 +72,7 @@ type WirelessLAN struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // SSID // Required: true @@ -83,6 +83,9 @@ type WirelessLAN struct { // tags Tags []*NestedTag `json:"tags"` + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -132,6 +135,10 @@ func (m *WirelessLAN) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -294,6 +301,25 @@ func (m *WirelessLAN) validateTags(formats strfmt.Registry) error { return nil } +func (m *WirelessLAN) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *WirelessLAN) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -361,6 +387,10 @@ func (m *WirelessLAN) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -409,7 +439,7 @@ func (m *WirelessLAN) contextValidateAuthType(ctx context.Context, formats strfm func (m *WirelessLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -452,7 +482,7 @@ func (m *WirelessLAN) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *WirelessLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -479,6 +509,22 @@ func (m *WirelessLAN) contextValidateTags(ctx context.Context, formats strfmt.Re return nil } +func (m *WirelessLAN) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *WirelessLAN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n_group.go index 976f1f6db..ba6a0e687 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_l_a_n_group.go @@ -42,7 +42,7 @@ type WirelessLANGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WirelessLANGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -323,7 +323,7 @@ func (m *WirelessLANGroup) contextValidateDepth(ctx context.Context, formats str func (m *WirelessLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -350,7 +350,7 @@ func (m *WirelessLANGroup) contextValidateID(ctx context.Context, formats strfmt func (m *WirelessLANGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_link.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_link.go index c56fb3ba6..064b60063 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_link.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/wireless_link.go @@ -49,7 +49,7 @@ type WirelessLink struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -77,7 +77,7 @@ type WirelessLink struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // SSID // Max Length: 32 @@ -89,6 +89,9 @@ type WirelessLink struct { // tags Tags []*NestedTag `json:"tags"` + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -143,6 +146,10 @@ func (m *WirelessLink) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -336,6 +343,25 @@ func (m *WirelessLink) validateTags(formats strfmt.Registry) error { return nil } +func (m *WirelessLink) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *WirelessLink) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -392,6 +418,10 @@ func (m *WirelessLink) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -436,7 +466,7 @@ func (m *WirelessLink) contextValidateAuthType(ctx context.Context, formats strf func (m *WirelessLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -495,7 +525,7 @@ func (m *WirelessLink) contextValidateInterfaceb(ctx context.Context, formats st func (m *WirelessLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -538,6 +568,22 @@ func (m *WirelessLink) contextValidateTags(ctx context.Context, formats strfmt.R return nil } +func (m *WirelessLink) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *WirelessLink) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_a_s_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_a_s_n.go index 9cabf31c0..ae3c109b7 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_a_s_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_a_s_n.go @@ -46,7 +46,7 @@ type WritableASN struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableASN struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Provider count // Read Only: true @@ -274,7 +274,7 @@ func (m *WritableASN) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *WritableASN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -301,7 +301,7 @@ func (m *WritableASN) contextValidateID(ctx context.Context, formats strfmt.Regi func (m *WritableASN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_aggregate.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_aggregate.go index deead8a60..845f43c16 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_aggregate.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_aggregate.go @@ -38,7 +38,7 @@ type WritableAggregate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableAggregate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Prefix // Required: true @@ -274,7 +274,7 @@ func (m *WritableAggregate) ContextValidate(ctx context.Context, formats strfmt. func (m *WritableAggregate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -310,7 +310,7 @@ func (m *WritableAggregate) contextValidateID(ctx context.Context, formats strfm func (m *WritableAggregate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cable.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cable.go index 8025cd0e6..7f030b542 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cable.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cable.go @@ -36,6 +36,12 @@ import ( // swagger:model WritableCable type WritableCable struct { + // a terminations + ATerminations []*GenericObject `json:"a_terminations"` + + // b terminations + BTerminations []*GenericObject `json:"b_terminations"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -44,7 +50,7 @@ type WritableCable struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +70,7 @@ type WritableCable struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Length Length *float64 `json:"length,omitempty"` @@ -83,34 +89,6 @@ type WritableCable struct { // Tenant Tenant *int64 `json:"tenant,omitempty"` - // Termination a - // Read Only: true - Terminationa map[string]*string `json:"termination_a,omitempty"` - - // Termination a id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - TerminationaID *int64 `json:"termination_a_id"` - - // Termination a type - // Required: true - TerminationaType *string `json:"termination_a_type"` - - // Termination b - // Read Only: true - Terminationb map[string]*string `json:"termination_b,omitempty"` - - // Termination b id - // Required: true - // Maximum: 2.147483647e+09 - // Minimum: 0 - TerminationbID *int64 `json:"termination_b_id"` - - // Termination b type - // Required: true - TerminationbType *string `json:"termination_b_type"` - // Type // Enum: [cat3 cat5 cat5e cat6 cat6a cat7 cat7a cat8 dac-active dac-passive mrj21-trunk coaxial mmf mmf-om1 mmf-om2 mmf-om3 mmf-om4 mmf-om5 smf smf-os1 smf-os2 aoc power] Type string `json:"type,omitempty"` @@ -125,6 +103,14 @@ type WritableCable struct { func (m *WritableCable) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateATerminations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBTerminations(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -153,33 +139,69 @@ func (m *WritableCable) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTerminationaID(formats); err != nil { + if err := m.validateType(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationaType(formats); err != nil { + if err := m.validateURL(formats); err != nil { res = append(res, err) } - if err := m.validateTerminationbID(formats); err != nil { - res = append(res, err) + if len(res) > 0 { + return errors.CompositeValidationError(res...) } + return nil +} - if err := m.validateTerminationbType(formats); err != nil { - res = append(res, err) +func (m *WritableCable) validateATerminations(formats strfmt.Registry) error { + if swag.IsZero(m.ATerminations) { // not required + return nil } - if err := m.validateType(formats); err != nil { - res = append(res, err) + for i := 0; i < len(m.ATerminations); i++ { + if swag.IsZero(m.ATerminations[i]) { // not required + continue + } + + if m.ATerminations[i] != nil { + if err := m.ATerminations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + } - if err := m.validateURL(formats); err != nil { - res = append(res, err) + return nil +} + +func (m *WritableCable) validateBTerminations(formats strfmt.Registry) error { + if swag.IsZero(m.BTerminations) { // not required + return nil } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + for i := 0; i < len(m.BTerminations); i++ { + if swag.IsZero(m.BTerminations[i]) { // not required + continue + } + + if m.BTerminations[i] != nil { + if err := m.BTerminations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + } + return nil } @@ -360,58 +382,6 @@ func (m *WritableCable) validateTags(formats strfmt.Registry) error { return nil } -func (m *WritableCable) validateTerminationaID(formats strfmt.Registry) error { - - if err := validate.Required("termination_a_id", "body", m.TerminationaID); err != nil { - return err - } - - if err := validate.MinimumInt("termination_a_id", "body", *m.TerminationaID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 2.147483647e+09, false); err != nil { - return err - } - - return nil -} - -func (m *WritableCable) validateTerminationaType(formats strfmt.Registry) error { - - if err := validate.Required("termination_a_type", "body", m.TerminationaType); err != nil { - return err - } - - return nil -} - -func (m *WritableCable) validateTerminationbID(formats strfmt.Registry) error { - - if err := validate.Required("termination_b_id", "body", m.TerminationbID); err != nil { - return err - } - - if err := validate.MinimumInt("termination_b_id", "body", *m.TerminationbID, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 2.147483647e+09, false); err != nil { - return err - } - - return nil -} - -func (m *WritableCable) validateTerminationbType(formats strfmt.Registry) error { - - if err := validate.Required("termination_b_type", "body", m.TerminationbType); err != nil { - return err - } - - return nil -} - var writableCableTypeTypePropEnum []interface{} func init() { @@ -533,31 +503,31 @@ func (m *WritableCable) validateURL(formats strfmt.Registry) error { func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateCreated(ctx, formats); err != nil { + if err := m.contextValidateATerminations(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateDisplay(ctx, formats); err != nil { + if err := m.contextValidateBTerminations(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateID(ctx, formats); err != nil { + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTags(ctx, formats); err != nil { + if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerminationa(ctx, formats); err != nil { + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerminationb(ctx, formats); err != nil { + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -571,9 +541,49 @@ func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Regi return nil } +func (m *WritableCable) contextValidateATerminations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ATerminations); i++ { + + if m.ATerminations[i] != nil { + if err := m.ATerminations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("a_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableCable) contextValidateBTerminations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.BTerminations); i++ { + + if m.BTerminations[i] != nil { + if err := m.BTerminations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("b_terminations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableCable) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -600,7 +610,7 @@ func (m *WritableCable) contextValidateID(ctx context.Context, formats strfmt.Re func (m *WritableCable) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -627,16 +637,6 @@ func (m *WritableCable) contextValidateTags(ctx context.Context, formats strfmt. return nil } -func (m *WritableCable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *WritableCable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableCable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit.go index 81c991a8d..87f8db4c1 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit.go @@ -53,7 +53,7 @@ type WritableCircuit struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,14 +70,14 @@ type WritableCircuit struct { // Read Only: true ID int64 `json:"id,omitempty"` - // Date installed + // Installed // Format: date InstallDate *strfmt.Date `json:"install_date,omitempty"` // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Provider // Required: true @@ -95,11 +95,15 @@ type WritableCircuit struct { // Termination a // Read Only: true - Terminationa int64 `json:"termination_a,omitempty"` + Terminationa *int64 `json:"termination_a,omitempty"` + + // Terminates + // Format: date + TerminationDate *strfmt.Date `json:"termination_date,omitempty"` // Termination z // Read Only: true - Terminationz int64 `json:"termination_z,omitempty"` + Terminationz *int64 `json:"termination_z,omitempty"` // Type // Required: true @@ -151,6 +155,10 @@ func (m *WritableCircuit) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTerminationDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -335,6 +343,18 @@ func (m *WritableCircuit) validateTags(formats strfmt.Registry) error { return nil } +func (m *WritableCircuit) validateTerminationDate(formats strfmt.Registry) error { + if swag.IsZero(m.TerminationDate) { // not required + return nil + } + + if err := validate.FormatOf("termination_date", "body", "date", m.TerminationDate.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCircuit) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { @@ -400,7 +420,7 @@ func (m *WritableCircuit) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableCircuit) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -427,7 +447,7 @@ func (m *WritableCircuit) contextValidateID(ctx context.Context, formats strfmt. func (m *WritableCircuit) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -456,7 +476,7 @@ func (m *WritableCircuit) contextValidateTags(ctx context.Context, formats strfm func (m *WritableCircuit) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "termination_a", "body", int64(m.Terminationa)); err != nil { + if err := validate.ReadOnly(ctx, "termination_a", "body", m.Terminationa); err != nil { return err } @@ -465,7 +485,7 @@ func (m *WritableCircuit) contextValidateTerminationa(ctx context.Context, forma func (m *WritableCircuit) contextValidateTerminationz(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "termination_z", "body", int64(m.Terminationz)); err != nil { + if err := validate.ReadOnly(ctx, "termination_z", "body", m.Terminationz); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit_termination.go index 4ccb69411..3c5d217ee 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit_termination.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_circuit_termination.go @@ -23,6 +23,7 @@ package models import ( "context" "encoding/json" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,6 +43,11 @@ type WritableCircuitTermination struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Circuit // Required: true Circuit *int64 `json:"circuit"` @@ -49,7 +55,10 @@ type WritableCircuitTermination struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` // Description // Max Length: 200 @@ -66,19 +75,17 @@ type WritableCircuitTermination struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -100,6 +107,9 @@ type WritableCircuitTermination struct { // Site Site *int64 `json:"site,omitempty"` + // tags + Tags []*NestedTag `json:"tags"` + // Termination // Required: true // Enum: [A Z] @@ -130,6 +140,10 @@ func (m *WritableCircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCircuit(formats); err != nil { res = append(res, err) } @@ -154,6 +168,10 @@ func (m *WritableCircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTermSide(formats); err != nil { res = append(res, err) } @@ -195,6 +213,18 @@ func (m *WritableCircuitTermination) validateCable(formats strfmt.Registry) erro return nil } +func (m *WritableCircuitTermination) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableCircuitTermination) validateCircuit(formats strfmt.Registry) error { if err := validate.Required("circuit", "body", m.Circuit); err != nil { @@ -268,6 +298,32 @@ func (m *WritableCircuitTermination) validatePpInfo(formats strfmt.Registry) err return nil } +func (m *WritableCircuitTermination) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + var writableCircuitTerminationTypeTermSidePropEnum []interface{} func init() { @@ -363,6 +419,10 @@ func (m *WritableCircuitTermination) ContextValidate(ctx context.Context, format res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -379,11 +439,15 @@ func (m *WritableCircuitTermination) ContextValidate(ctx context.Context, format res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -422,9 +486,18 @@ func (m *WritableCircuitTermination) contextValidateCable(ctx context.Context, f return nil } +func (m *WritableCircuitTermination) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *WritableCircuitTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -451,27 +524,51 @@ func (m *WritableCircuitTermination) contextValidateID(ctx context.Context, form func (m *WritableCircuitTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableCircuitTermination) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableCircuitTermination) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableCircuitTermination) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableCircuitTermination) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } return nil } +func (m *WritableCircuitTermination) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableCircuitTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cluster.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cluster.go index 6133e20c1..a119df7c9 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cluster.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_cluster.go @@ -22,6 +22,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -41,7 +42,7 @@ type WritableCluster struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -65,7 +66,7 @@ type WritableCluster struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -77,6 +78,10 @@ type WritableCluster struct { // Required: true Site *int64 `json:"site"` + // Status + // Enum: [planned staging active decommissioning offline] + Status string `json:"status,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -121,6 +126,10 @@ func (m *WritableCluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -198,6 +207,57 @@ func (m *WritableCluster) validateSite(formats strfmt.Registry) error { return nil } +var writableClusterTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["planned","staging","active","decommissioning","offline"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableClusterTypeStatusPropEnum = append(writableClusterTypeStatusPropEnum, v) + } +} + +const ( + + // WritableClusterStatusPlanned captures enum value "planned" + WritableClusterStatusPlanned string = "planned" + + // WritableClusterStatusStaging captures enum value "staging" + WritableClusterStatusStaging string = "staging" + + // WritableClusterStatusActive captures enum value "active" + WritableClusterStatusActive string = "active" + + // WritableClusterStatusDecommissioning captures enum value "decommissioning" + WritableClusterStatusDecommissioning string = "decommissioning" + + // WritableClusterStatusOffline captures enum value "offline" + WritableClusterStatusOffline string = "offline" +) + +// prop value enum +func (m *WritableCluster) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableClusterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableCluster) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *WritableCluster) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -289,7 +349,7 @@ func (m *WritableCluster) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableCluster) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -325,7 +385,7 @@ func (m *WritableCluster) contextValidateID(ctx context.Context, formats strfmt. func (m *WritableCluster) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_config_context.go index 14a54976e..c7659d6cf 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_config_context.go @@ -50,11 +50,11 @@ type WritableConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Data // Required: true - Data *string `json:"data"` + Data interface{} `json:"data"` // Description // Max Length: 200 @@ -78,7 +78,11 @@ type WritableConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // locations + // Unique: true + Locations []int64 `json:"locations"` // Name // Required: true @@ -165,6 +169,10 @@ func (m *WritableConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLocations(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -265,8 +273,8 @@ func (m *WritableConfigContext) validateCreated(formats strfmt.Registry) error { func (m *WritableConfigContext) validateData(formats strfmt.Registry) error { - if err := validate.Required("data", "body", m.Data); err != nil { - return err + if m.Data == nil { + return errors.Required("data", "body", nil) } return nil @@ -308,6 +316,18 @@ func (m *WritableConfigContext) validateLastUpdated(formats strfmt.Registry) err return nil } +func (m *WritableConfigContext) validateLocations(formats strfmt.Registry) error { + if swag.IsZero(m.Locations) { // not required + return nil + } + + if err := validate.UniqueItems("locations", "body", m.Locations); err != nil { + return err + } + + return nil +} + func (m *WritableConfigContext) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -396,7 +416,7 @@ func (m *WritableConfigContext) validateTags(formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { - if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", m.Tags[i], `^[-a-zA-Z0-9_]+$`); err != nil { + if err := validate.Pattern("tags"+"."+strconv.Itoa(i), "body", m.Tags[i], `^[-\w]+$`); err != nil { return err } @@ -489,7 +509,7 @@ func (m *WritableConfigContext) ContextValidate(ctx context.Context, formats str func (m *WritableConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -516,7 +536,7 @@ func (m *WritableConfigContext) contextValidateID(ctx context.Context, formats s func (m *WritableConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port.go index 6e0174ca4..0001d3dac 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port.go @@ -43,26 +43,29 @@ type WritableConsolePort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,19 +95,17 @@ type WritableConsolePort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -149,6 +150,10 @@ func (m *WritableConsolePort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -214,6 +219,18 @@ func (m *WritableConsolePort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableConsolePort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableConsolePort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -452,15 +469,19 @@ func (m *WritableConsolePort) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -480,11 +501,11 @@ func (m *WritableConsolePort) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -527,23 +548,36 @@ func (m *WritableConsolePort) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritableConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsolePort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritableConsolePort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritableConsolePort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsolePort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritableConsolePort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsolePort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -552,7 +586,7 @@ func (m *WritableConsolePort) contextValidateConnectedEndpointType(ctx context.C func (m *WritableConsolePort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -579,21 +613,25 @@ func (m *WritableConsolePort) contextValidateID(ctx context.Context, formats str func (m *WritableConsolePort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableConsolePort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsolePort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableConsolePort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsolePort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port_template.go index 9ffaf7507..e50b0b61e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_port_template.go @@ -38,7 +38,7 @@ type WritableConsolePortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -65,7 +65,7 @@ type WritableConsolePortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module type // Required: true @@ -345,7 +345,7 @@ func (m *WritableConsolePortTemplate) ContextValidate(ctx context.Context, forma func (m *WritableConsolePortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -372,7 +372,7 @@ func (m *WritableConsolePortTemplate) contextValidateID(ctx context.Context, for func (m *WritableConsolePortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port.go index 0ab32e591..9da24542f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port.go @@ -43,26 +43,29 @@ type WritableConsoleServerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,19 +95,17 @@ type WritableConsoleServerPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -149,6 +150,10 @@ func (m *WritableConsoleServerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -214,6 +219,18 @@ func (m *WritableConsoleServerPort) validateCable(formats strfmt.Registry) error return nil } +func (m *WritableConsoleServerPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableConsoleServerPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -452,15 +469,19 @@ func (m *WritableConsoleServerPort) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -480,11 +501,11 @@ func (m *WritableConsoleServerPort) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -527,23 +548,36 @@ func (m *WritableConsoleServerPort) contextValidateCable(ctx context.Context, fo return nil } -func (m *WritableConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsoleServerPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritableConsoleServerPort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritableConsoleServerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsoleServerPort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritableConsoleServerPort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsoleServerPort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -552,7 +586,7 @@ func (m *WritableConsoleServerPort) contextValidateConnectedEndpointType(ctx con func (m *WritableConsoleServerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -579,21 +613,25 @@ func (m *WritableConsoleServerPort) contextValidateID(ctx context.Context, forma func (m *WritableConsoleServerPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableConsoleServerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsoleServerPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableConsoleServerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableConsoleServerPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port_template.go index 035bde803..e7d5a243a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_console_server_port_template.go @@ -38,7 +38,7 @@ type WritableConsoleServerPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -65,7 +65,7 @@ type WritableConsoleServerPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module type // Required: true @@ -345,7 +345,7 @@ func (m *WritableConsoleServerPortTemplate) ContextValidate(ctx context.Context, func (m *WritableConsoleServerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -372,7 +372,7 @@ func (m *WritableConsoleServerPortTemplate) contextValidateID(ctx context.Contex func (m *WritableConsoleServerPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact.go index 6ade7e6cc..01551d0a4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact.go @@ -45,7 +45,7 @@ type WritableContact struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,7 +70,7 @@ type WritableContact struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Link // Max Length: 200 @@ -346,7 +346,7 @@ func (m *WritableContact) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableContact) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -373,7 +373,7 @@ func (m *WritableContact) contextValidateID(ctx context.Context, formats strfmt. func (m *WritableContact) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_assignment.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_assignment.go index be21b4f84..6439eb4de 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_assignment.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_assignment.go @@ -46,7 +46,7 @@ type WritableContactAssignment struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -59,11 +59,11 @@ type WritableContactAssignment struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Object // Read Only: true - Object map[string]*string `json:"object,omitempty"` + Object interface{} `json:"object,omitempty"` // Object id // Required: true @@ -277,10 +277,6 @@ func (m *WritableContactAssignment) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -293,7 +289,7 @@ func (m *WritableContactAssignment) ContextValidate(ctx context.Context, formats func (m *WritableContactAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -320,18 +316,13 @@ func (m *WritableContactAssignment) contextValidateID(ctx context.Context, forma func (m *WritableContactAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableContactAssignment) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableContactAssignment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_group.go index 3aea72329..63fad951a 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_contact_group.go @@ -46,7 +46,7 @@ type WritableContactGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableContactGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -319,7 +319,7 @@ func (m *WritableContactGroup) contextValidateContactCount(ctx context.Context, func (m *WritableContactGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -346,7 +346,7 @@ func (m *WritableContactGroup) contextValidateID(ctx context.Context, formats st func (m *WritableContactGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_custom_field.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_custom_field.go index eaa536acc..5e7aa2036 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_custom_field.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_custom_field.go @@ -47,7 +47,7 @@ type WritableCustomField struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Data type // Read Only: true @@ -56,7 +56,7 @@ type WritableCustomField struct { // Default // // Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo"). - Default *string `json:"default,omitempty"` + Default interface{} `json:"default,omitempty"` // Description // Max Length: 200 @@ -72,6 +72,12 @@ type WritableCustomField struct { // Enum: [disabled loose exact] FilterLogic string `json:"filter_logic,omitempty"` + // Group name + // + // Custom fields within the same group will be displayed together + // Max Length: 50 + GroupName string `json:"group_name,omitempty"` + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -85,7 +91,7 @@ type WritableCustomField struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -110,6 +116,12 @@ type WritableCustomField struct { // Enum: [text longtext integer boolean date url json select multiselect object multiobject] Type string `json:"type,omitempty"` + // UI visibility + // + // Specifies the visibility of custom field in the UI + // Enum: [read-write read-only hidden] + UIVisibility string `json:"ui_visibility,omitempty"` + // Url // Read Only: true // Format: uri @@ -167,6 +179,10 @@ func (m *WritableCustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateGroupName(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } @@ -183,6 +199,10 @@ func (m *WritableCustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUIVisibility(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -311,6 +331,18 @@ func (m *WritableCustomField) validateFilterLogic(formats strfmt.Registry) error return nil } +func (m *WritableCustomField) validateGroupName(formats strfmt.Registry) error { + if swag.IsZero(m.GroupName) { // not required + return nil + } + + if err := validate.MaxLength("group_name", "body", m.GroupName, 50); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -425,6 +457,51 @@ func (m *WritableCustomField) validateType(formats strfmt.Registry) error { return nil } +var writableCustomFieldTypeUIVisibilityPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["read-write","read-only","hidden"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableCustomFieldTypeUIVisibilityPropEnum = append(writableCustomFieldTypeUIVisibilityPropEnum, v) + } +} + +const ( + + // WritableCustomFieldUIVisibilityReadDashWrite captures enum value "read-write" + WritableCustomFieldUIVisibilityReadDashWrite string = "read-write" + + // WritableCustomFieldUIVisibilityReadDashOnly captures enum value "read-only" + WritableCustomFieldUIVisibilityReadDashOnly string = "read-only" + + // WritableCustomFieldUIVisibilityHidden captures enum value "hidden" + WritableCustomFieldUIVisibilityHidden string = "hidden" +) + +// prop value enum +func (m *WritableCustomField) validateUIVisibilityEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableCustomFieldTypeUIVisibilityPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableCustomField) validateUIVisibility(formats strfmt.Registry) error { + if swag.IsZero(m.UIVisibility) { // not required + return nil + } + + // value enum + if err := m.validateUIVisibilityEnum("ui_visibility", "body", m.UIVisibility); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -533,7 +610,7 @@ func (m *WritableCustomField) ContextValidate(ctx context.Context, formats strfm func (m *WritableCustomField) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -569,7 +646,7 @@ func (m *WritableCustomField) contextValidateID(ctx context.Context, formats str func (m *WritableCustomField) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay.go index 1aba256c2..d2b018056 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay.go @@ -38,7 +38,7 @@ type WritableDeviceBay struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -71,7 +71,7 @@ type WritableDeviceBay struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -278,7 +278,7 @@ func (m *WritableDeviceBay) ContextValidate(ctx context.Context, formats strfmt. func (m *WritableDeviceBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -305,7 +305,7 @@ func (m *WritableDeviceBay) contextValidateID(ctx context.Context, formats strfm func (m *WritableDeviceBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay_template.go index 043004503..1c02f8734 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_bay_template.go @@ -37,7 +37,7 @@ type WritableDeviceBayTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type WritableDeviceBayTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -238,7 +238,7 @@ func (m *WritableDeviceBayTemplate) ContextValidate(ctx context.Context, formats func (m *WritableDeviceBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -265,7 +265,7 @@ func (m *WritableDeviceBayTemplate) contextValidateID(ctx context.Context, forma func (m *WritableDeviceBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_type.go index 1f19cf509..d47de26c3 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_type.go @@ -46,7 +46,7 @@ type WritableDeviceType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -76,7 +76,7 @@ type WritableDeviceType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Manufacturer // Required: true @@ -115,10 +115,9 @@ type WritableDeviceType struct { // tags Tags []*NestedTag `json:"tags"` - // Height (U) - // Maximum: 32767 + // Position (U) // Minimum: 0 - UHeight *int64 `json:"u_height,omitempty"` + UHeight *float64 `json:"u_height,omitempty"` // Url // Read Only: true @@ -425,11 +424,7 @@ func (m *WritableDeviceType) validateUHeight(formats strfmt.Registry) error { return nil } - if err := validate.MinimumInt("u_height", "body", *m.UHeight, 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("u_height", "body", *m.UHeight, 32767, false); err != nil { + if err := validate.Minimum("u_height", "body", *m.UHeight, 0, false); err != nil { return err } @@ -496,7 +491,7 @@ func (m *WritableDeviceType) ContextValidate(ctx context.Context, formats strfmt func (m *WritableDeviceType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -541,7 +536,7 @@ func (m *WritableDeviceType) contextValidateID(ctx context.Context, formats strf func (m *WritableDeviceType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_with_config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_with_config_context.go index 72b6ed715..167a86e4b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_with_config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_device_with_config_context.go @@ -59,7 +59,7 @@ type WritableDeviceWithConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -88,7 +88,7 @@ type WritableDeviceWithConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Local context data LocalContextData interface{} `json:"local_context_data,omitempty"` @@ -108,8 +108,8 @@ type WritableDeviceWithConfigContext struct { Platform *int64 `json:"platform,omitempty"` // Position (U) - // Minimum: 1 - Position *int64 `json:"position,omitempty"` + // Minimum: 0.5 + Position *float64 `json:"position,omitempty"` // Primary ip // Read Only: true @@ -445,7 +445,7 @@ func (m *WritableDeviceWithConfigContext) validatePosition(formats strfmt.Regist return nil } - if err := validate.MinimumInt("position", "body", *m.Position, 1, false); err != nil { + if err := validate.Minimum("position", "body", *m.Position, 0.5, false); err != nil { return err } @@ -671,7 +671,7 @@ func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, f func (m *WritableDeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -698,7 +698,7 @@ func (m *WritableDeviceWithConfigContext) contextValidateID(ctx context.Context, func (m *WritableDeviceWithConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_f_h_r_p_group_assignment.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_f_h_r_p_group_assignment.go index 6b9f2e142..36dfac754 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_f_h_r_p_group_assignment.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_f_h_r_p_group_assignment.go @@ -37,7 +37,7 @@ type WritableFHRPGroupAssignment struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Display // Read Only: true @@ -53,7 +53,7 @@ type WritableFHRPGroupAssignment struct { // Interface // Read Only: true - Interface map[string]*string `json:"interface,omitempty"` + Interface interface{} `json:"interface,omitempty"` // Interface id // Required: true @@ -68,7 +68,7 @@ type WritableFHRPGroupAssignment struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Priority // Required: true @@ -224,10 +224,6 @@ func (m *WritableFHRPGroupAssignment) ContextValidate(ctx context.Context, forma res = append(res, err) } - if err := m.contextValidateInterface(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -244,7 +240,7 @@ func (m *WritableFHRPGroupAssignment) ContextValidate(ctx context.Context, forma func (m *WritableFHRPGroupAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -269,14 +265,9 @@ func (m *WritableFHRPGroupAssignment) contextValidateID(ctx context.Context, for return nil } -func (m *WritableFHRPGroupAssignment) contextValidateInterface(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableFHRPGroupAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port.go index 65a4cd1c5..de279daca 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port.go @@ -43,6 +43,11 @@ type WritableFrontPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -51,7 +56,7 @@ type WritableFrontPort struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -81,19 +86,17 @@ type WritableFrontPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -140,6 +143,10 @@ func (m *WritableFrontPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -213,6 +220,18 @@ func (m *WritableFrontPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableFrontPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableFrontPort) validateColor(formats strfmt.Registry) error { if swag.IsZero(m.Color) { // not required return nil @@ -544,6 +563,10 @@ func (m *WritableFrontPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -560,11 +583,11 @@ func (m *WritableFrontPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -607,9 +630,18 @@ func (m *WritableFrontPort) contextValidateCable(ctx context.Context, formats st return nil } +func (m *WritableFrontPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *WritableFrontPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -636,21 +668,25 @@ func (m *WritableFrontPort) contextValidateID(ctx context.Context, formats strfm func (m *WritableFrontPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableFrontPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableFrontPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableFrontPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableFrontPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port_template.go index 1846eca45..37d78a1df 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_front_port_template.go @@ -43,7 +43,7 @@ type WritableFrontPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -70,7 +70,7 @@ type WritableFrontPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module type // Required: true @@ -498,7 +498,7 @@ func (m *WritableFrontPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritableFrontPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -525,7 +525,7 @@ func (m *WritableFrontPortTemplate) contextValidateID(ctx context.Context, forma func (m *WritableFrontPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface.go index d254ab864..653eb1a7e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface.go @@ -46,21 +46,24 @@ type WritableInterface struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Count fhrp groups // Read Only: true @@ -73,7 +76,7 @@ type WritableInterface struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -101,6 +104,10 @@ type WritableInterface struct { // Read Only: true ID int64 `json:"id,omitempty"` + // L2vpn termination + // Read Only: true + L2vpnTermination string `json:"l2vpn_termination,omitempty"` + // Label // // Physical label @@ -113,19 +120,17 @@ type WritableInterface struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -161,6 +166,14 @@ type WritableInterface struct { // Parent interface Parent *int64 `json:"parent,omitempty"` + // PoE mode + // Enum: [pd pse] + PoeMode string `json:"poe_mode,omitempty"` + + // PoE type + // Enum: [type1-ieee802.3af type2-ieee802.3at type3-ieee802.3bt type4-ieee802.3bt passive-24v-2pair passive-24v-4pair passive-48v-2pair passive-48v-4pair] + PoeType string `json:"poe_type,omitempty"` + // Wireless channel // Enum: [2.4g-1-2412-22 2.4g-2-2417-22 2.4g-3-2422-22 2.4g-4-2427-22 2.4g-5-2432-22 2.4g-6-2437-22 2.4g-7-2442-22 2.4g-8-2447-22 2.4g-9-2452-22 2.4g-10-2457-22 2.4g-11-2462-22 2.4g-12-2467-22 2.4g-13-2472-22 5g-32-5160-20 5g-34-5170-40 5g-36-5180-20 5g-38-5190-40 5g-40-5200-20 5g-42-5210-80 5g-44-5220-20 5g-46-5230-40 5g-48-5240-20 5g-50-5250-160 5g-52-5260-20 5g-54-5270-40 5g-56-5280-20 5g-58-5290-80 5g-60-5300-20 5g-62-5310-40 5g-64-5320-20 5g-100-5500-20 5g-102-5510-40 5g-104-5520-20 5g-106-5530-80 5g-108-5540-20 5g-110-5550-40 5g-112-5560-20 5g-114-5570-160 5g-116-5580-20 5g-118-5590-40 5g-120-5600-20 5g-122-5610-80 5g-124-5620-20 5g-126-5630-40 5g-128-5640-20 5g-132-5660-20 5g-134-5670-40 5g-136-5680-20 5g-138-5690-80 5g-140-5700-20 5g-142-5710-40 5g-144-5720-20 5g-149-5745-20 5g-151-5755-40 5g-153-5765-20 5g-155-5775-80 5g-157-5785-20 5g-159-5795-40 5g-161-5805-20 5g-163-5815-160 5g-165-5825-20 5g-167-5835-40 5g-169-5845-20 5g-171-5855-80 5g-173-5865-20 5g-175-5875-40 5g-177-5885-20 6g-1-5955-20 6g-3-5965-40 6g-5-5975-20 6g-7-5985-80 6g-9-5995-20 6g-11-6005-40 6g-13-6015-20 6g-15-6025-160 6g-17-6035-20 6g-19-6045-40 6g-21-6055-20 6g-23-6065-80 6g-25-6075-20 6g-27-6085-40 6g-29-6095-20 6g-31-6105-320 6g-33-6115-20 6g-35-6125-40 6g-37-6135-20 6g-39-6145-80 6g-41-6155-20 6g-43-6165-40 6g-45-6175-20 6g-47-6185-160 6g-49-6195-20 6g-51-6205-40 6g-53-6215-20 6g-55-6225-80 6g-57-6235-20 6g-59-6245-40 6g-61-6255-20 6g-65-6275-20 6g-67-6285-40 6g-69-6295-20 6g-71-6305-80 6g-73-6315-20 6g-75-6325-40 6g-77-6335-20 6g-79-6345-160 6g-81-6355-20 6g-83-6365-40 6g-85-6375-20 6g-87-6385-80 6g-89-6395-20 6g-91-6405-40 6g-93-6415-20 6g-95-6425-320 6g-97-6435-20 6g-99-6445-40 6g-101-6455-20 6g-103-6465-80 6g-105-6475-20 6g-107-6485-40 6g-109-6495-20 6g-111-6505-160 6g-113-6515-20 6g-115-6525-40 6g-117-6535-20 6g-119-6545-80 6g-121-6555-20 6g-123-6565-40 6g-125-6575-20 6g-129-6595-20 6g-131-6605-40 6g-133-6615-20 6g-135-6625-80 6g-137-6635-20 6g-139-6645-40 6g-141-6655-20 6g-143-6665-160 6g-145-6675-20 6g-147-6685-40 6g-149-6695-20 6g-151-6705-80 6g-153-6715-20 6g-155-6725-40 6g-157-6735-20 6g-159-6745-320 6g-161-6755-20 6g-163-6765-40 6g-165-6775-20 6g-167-6785-80 6g-169-6795-20 6g-171-6805-40 6g-173-6815-20 6g-175-6825-160 6g-177-6835-20 6g-179-6845-40 6g-181-6855-20 6g-183-6865-80 6g-185-6875-20 6g-187-6885-40 6g-189-6895-20 6g-193-6915-20 6g-195-6925-40 6g-197-6935-20 6g-199-6945-80 6g-201-6955-20 6g-203-6965-40 6g-205-6975-20 6g-207-6985-160 6g-209-6995-20 6g-211-7005-40 6g-213-7015-20 6g-215-7025-80 6g-217-7035-20 6g-219-7045-40 6g-221-7055-20 6g-225-7075-20 6g-227-7085-40 6g-229-7095-20 6g-233-7115-20 60g-1-58320-2160 60g-2-60480-2160 60g-3-62640-2160 60g-4-64800-2160 60g-5-66960-2160 60g-6-69120-2160 60g-9-59400-4320 60g-10-61560-4320 60g-11-63720-4320 60g-12-65880-4320 60g-13-68040-4320 60g-17-60480-6480 60g-18-62640-6480 60g-19-64800-6480 60g-20-66960-6480 60g-25-61560-6480 60g-26-63720-6480 60g-27-65880-6480] RfChannel string `json:"rf_channel,omitempty"` @@ -194,7 +207,7 @@ type WritableInterface struct { // Type // Required: true - // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp 1000base-kx 10gbase-kr 10gbase-kx4 25gbase-kr 40gbase-kr4 50gbase-kr 100gbase-kp4 100gbase-kr2 100gbase-kr4 ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.11ay ieee802.15.1 other-wireless gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Type *string `json:"type"` // Untagged VLAN @@ -229,6 +242,10 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -265,6 +282,14 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePoeMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoeType(formats); err != nil { + res = append(res, err) + } + if err := m.validateRfChannel(formats); err != nil { res = append(res, err) } @@ -326,6 +351,18 @@ func (m *WritableInterface) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableInterface) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -506,6 +543,108 @@ func (m *WritableInterface) validateName(formats strfmt.Registry) error { return nil } +var writableInterfaceTypePoeModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["pd","pse"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTypePoeModePropEnum = append(writableInterfaceTypePoeModePropEnum, v) + } +} + +const ( + + // WritableInterfacePoeModePd captures enum value "pd" + WritableInterfacePoeModePd string = "pd" + + // WritableInterfacePoeModePse captures enum value "pse" + WritableInterfacePoeModePse string = "pse" +) + +// prop value enum +func (m *WritableInterface) validatePoeModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTypePoeModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterface) validatePoeMode(formats strfmt.Registry) error { + if swag.IsZero(m.PoeMode) { // not required + return nil + } + + // value enum + if err := m.validatePoeModeEnum("poe_mode", "body", m.PoeMode); err != nil { + return err + } + + return nil +} + +var writableInterfaceTypePoeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["type1-ieee802.3af","type2-ieee802.3at","type3-ieee802.3bt","type4-ieee802.3bt","passive-24v-2pair","passive-24v-4pair","passive-48v-2pair","passive-48v-4pair"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTypePoeTypePropEnum = append(writableInterfaceTypePoeTypePropEnum, v) + } +} + +const ( + + // WritableInterfacePoeTypeType1DashIeee802Dot3af captures enum value "type1-ieee802.3af" + WritableInterfacePoeTypeType1DashIeee802Dot3af string = "type1-ieee802.3af" + + // WritableInterfacePoeTypeType2DashIeee802Dot3at captures enum value "type2-ieee802.3at" + WritableInterfacePoeTypeType2DashIeee802Dot3at string = "type2-ieee802.3at" + + // WritableInterfacePoeTypeType3DashIeee802Dot3bt captures enum value "type3-ieee802.3bt" + WritableInterfacePoeTypeType3DashIeee802Dot3bt string = "type3-ieee802.3bt" + + // WritableInterfacePoeTypeType4DashIeee802Dot3bt captures enum value "type4-ieee802.3bt" + WritableInterfacePoeTypeType4DashIeee802Dot3bt string = "type4-ieee802.3bt" + + // WritableInterfacePoeTypePassiveDash24vDash2pair captures enum value "passive-24v-2pair" + WritableInterfacePoeTypePassiveDash24vDash2pair string = "passive-24v-2pair" + + // WritableInterfacePoeTypePassiveDash24vDash4pair captures enum value "passive-24v-4pair" + WritableInterfacePoeTypePassiveDash24vDash4pair string = "passive-24v-4pair" + + // WritableInterfacePoeTypePassiveDash48vDash2pair captures enum value "passive-48v-2pair" + WritableInterfacePoeTypePassiveDash48vDash2pair string = "passive-48v-2pair" + + // WritableInterfacePoeTypePassiveDash48vDash4pair captures enum value "passive-48v-4pair" + WritableInterfacePoeTypePassiveDash48vDash4pair string = "passive-48v-4pair" +) + +// prop value enum +func (m *WritableInterface) validatePoeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTypePoeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterface) validatePoeType(formats strfmt.Registry) error { + if swag.IsZero(m.PoeType) { // not required + return nil + } + + // value enum + if err := m.validatePoeTypeEnum("poe_type", "body", m.PoeType); err != nil { + return err + } + + return nil +} + var writableInterfaceTypeRfChannelPropEnum []interface{} func init() { @@ -1249,7 +1388,7 @@ var writableInterfaceTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","1000base-kx","10gbase-kr","10gbase-kx4","25gbase-kr","40gbase-kr4","50gbase-kr","100gbase-kp4","100gbase-kr2","100gbase-kr4","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.11ay","ieee802.15.1","other-wireless","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1343,6 +1482,33 @@ const ( // WritableInterfaceTypeNr400gbaseDashxDashOsfp captures enum value "400gbase-x-osfp" WritableInterfaceTypeNr400gbaseDashxDashOsfp string = "400gbase-x-osfp" + // WritableInterfaceTypeNr1000baseDashKx captures enum value "1000base-kx" + WritableInterfaceTypeNr1000baseDashKx string = "1000base-kx" + + // WritableInterfaceTypeNr10gbaseDashKr captures enum value "10gbase-kr" + WritableInterfaceTypeNr10gbaseDashKr string = "10gbase-kr" + + // WritableInterfaceTypeNr10gbaseDashKx4 captures enum value "10gbase-kx4" + WritableInterfaceTypeNr10gbaseDashKx4 string = "10gbase-kx4" + + // WritableInterfaceTypeNr25gbaseDashKr captures enum value "25gbase-kr" + WritableInterfaceTypeNr25gbaseDashKr string = "25gbase-kr" + + // WritableInterfaceTypeNr40gbaseDashKr4 captures enum value "40gbase-kr4" + WritableInterfaceTypeNr40gbaseDashKr4 string = "40gbase-kr4" + + // WritableInterfaceTypeNr50gbaseDashKr captures enum value "50gbase-kr" + WritableInterfaceTypeNr50gbaseDashKr string = "50gbase-kr" + + // WritableInterfaceTypeNr100gbaseDashKp4 captures enum value "100gbase-kp4" + WritableInterfaceTypeNr100gbaseDashKp4 string = "100gbase-kp4" + + // WritableInterfaceTypeNr100gbaseDashKr2 captures enum value "100gbase-kr2" + WritableInterfaceTypeNr100gbaseDashKr2 string = "100gbase-kr2" + + // WritableInterfaceTypeNr100gbaseDashKr4 captures enum value "100gbase-kr4" + WritableInterfaceTypeNr100gbaseDashKr4 string = "100gbase-kr4" + // WritableInterfaceTypeIeee802Dot11a captures enum value "ieee802.11a" WritableInterfaceTypeIeee802Dot11a string = "ieee802.11a" @@ -1361,9 +1527,15 @@ const ( // WritableInterfaceTypeIeee802Dot11ax captures enum value "ieee802.11ax" WritableInterfaceTypeIeee802Dot11ax string = "ieee802.11ax" + // WritableInterfaceTypeIeee802Dot11ay captures enum value "ieee802.11ay" + WritableInterfaceTypeIeee802Dot11ay string = "ieee802.11ay" + // WritableInterfaceTypeIeee802Dot15Dot1 captures enum value "ieee802.15.1" WritableInterfaceTypeIeee802Dot15Dot1 string = "ieee802.15.1" + // WritableInterfaceTypeOtherDashWireless captures enum value "other-wireless" + WritableInterfaceTypeOtherDashWireless string = "other-wireless" + // WritableInterfaceTypeGsm captures enum value "gsm" WritableInterfaceTypeGsm string = "gsm" @@ -1582,15 +1754,19 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -1614,15 +1790,19 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -1665,23 +1845,36 @@ func (m *WritableInterface) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritableInterface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableInterface) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritableInterface) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritableInterface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableInterface) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritableInterface) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableInterface) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -1708,7 +1901,7 @@ func (m *WritableInterface) contextValidateCountIpaddresses(ctx context.Context, func (m *WritableInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -1733,23 +1926,36 @@ func (m *WritableInterface) contextValidateID(ctx context.Context, formats strfm return nil } +func (m *WritableInterface) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "l2vpn_termination", "body", string(m.L2vpnTermination)); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableInterface) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableInterface) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableInterface) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableInterface) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface_template.go index a09e8c3e2..2a91ad7c2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_interface_template.go @@ -38,7 +38,7 @@ type WritableInterfaceTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -65,7 +65,7 @@ type WritableInterfaceTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Management only MgmtOnly bool `json:"mgmt_only,omitempty"` @@ -84,9 +84,17 @@ type WritableInterfaceTemplate struct { // Min Length: 1 Name *string `json:"name"` + // PoE mode + // Enum: [pd pse] + PoeMode string `json:"poe_mode,omitempty"` + + // PoE type + // Enum: [type1-ieee802.3af type2-ieee802.3at type3-ieee802.3bt type4-ieee802.3bt passive-24v-2pair passive-24v-4pair passive-48v-2pair passive-48v-4pair] + PoeType string `json:"poe_type,omitempty"` + // Type // Required: true - // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp 1000base-kx 10gbase-kr 10gbase-kx4 25gbase-kr 40gbase-kr4 50gbase-kr 100gbase-kp4 100gbase-kr2 100gbase-kr4 ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.11ay ieee802.15.1 other-wireless gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl docsis gpon xg-pon xgs-pon ng-pon2 epon 10g-epon cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Type *string `json:"type"` // Url @@ -127,6 +135,14 @@ func (m *WritableInterfaceTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePoeMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoeType(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -224,11 +240,113 @@ func (m *WritableInterfaceTemplate) validateName(formats strfmt.Registry) error return nil } +var writableInterfaceTemplateTypePoeModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["pd","pse"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTemplateTypePoeModePropEnum = append(writableInterfaceTemplateTypePoeModePropEnum, v) + } +} + +const ( + + // WritableInterfaceTemplatePoeModePd captures enum value "pd" + WritableInterfaceTemplatePoeModePd string = "pd" + + // WritableInterfaceTemplatePoeModePse captures enum value "pse" + WritableInterfaceTemplatePoeModePse string = "pse" +) + +// prop value enum +func (m *WritableInterfaceTemplate) validatePoeModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTemplateTypePoeModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterfaceTemplate) validatePoeMode(formats strfmt.Registry) error { + if swag.IsZero(m.PoeMode) { // not required + return nil + } + + // value enum + if err := m.validatePoeModeEnum("poe_mode", "body", m.PoeMode); err != nil { + return err + } + + return nil +} + +var writableInterfaceTemplateTypePoeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["type1-ieee802.3af","type2-ieee802.3at","type3-ieee802.3bt","type4-ieee802.3bt","passive-24v-2pair","passive-24v-4pair","passive-48v-2pair","passive-48v-4pair"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTemplateTypePoeTypePropEnum = append(writableInterfaceTemplateTypePoeTypePropEnum, v) + } +} + +const ( + + // WritableInterfaceTemplatePoeTypeType1DashIeee802Dot3af captures enum value "type1-ieee802.3af" + WritableInterfaceTemplatePoeTypeType1DashIeee802Dot3af string = "type1-ieee802.3af" + + // WritableInterfaceTemplatePoeTypeType2DashIeee802Dot3at captures enum value "type2-ieee802.3at" + WritableInterfaceTemplatePoeTypeType2DashIeee802Dot3at string = "type2-ieee802.3at" + + // WritableInterfaceTemplatePoeTypeType3DashIeee802Dot3bt captures enum value "type3-ieee802.3bt" + WritableInterfaceTemplatePoeTypeType3DashIeee802Dot3bt string = "type3-ieee802.3bt" + + // WritableInterfaceTemplatePoeTypeType4DashIeee802Dot3bt captures enum value "type4-ieee802.3bt" + WritableInterfaceTemplatePoeTypeType4DashIeee802Dot3bt string = "type4-ieee802.3bt" + + // WritableInterfaceTemplatePoeTypePassiveDash24vDash2pair captures enum value "passive-24v-2pair" + WritableInterfaceTemplatePoeTypePassiveDash24vDash2pair string = "passive-24v-2pair" + + // WritableInterfaceTemplatePoeTypePassiveDash24vDash4pair captures enum value "passive-24v-4pair" + WritableInterfaceTemplatePoeTypePassiveDash24vDash4pair string = "passive-24v-4pair" + + // WritableInterfaceTemplatePoeTypePassiveDash48vDash2pair captures enum value "passive-48v-2pair" + WritableInterfaceTemplatePoeTypePassiveDash48vDash2pair string = "passive-48v-2pair" + + // WritableInterfaceTemplatePoeTypePassiveDash48vDash4pair captures enum value "passive-48v-4pair" + WritableInterfaceTemplatePoeTypePassiveDash48vDash4pair string = "passive-48v-4pair" +) + +// prop value enum +func (m *WritableInterfaceTemplate) validatePoeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTemplateTypePoeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterfaceTemplate) validatePoeType(formats strfmt.Registry) error { + if swag.IsZero(m.PoeType) { // not required + return nil + } + + // value enum + if err := m.validatePoeTypeEnum("poe_type", "body", m.PoeType); err != nil { + return err + } + + return nil +} + var writableInterfaceTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","1000base-kx","10gbase-kr","10gbase-kx4","25gbase-kr","40gbase-kr4","50gbase-kr","100gbase-kp4","100gbase-kr2","100gbase-kr4","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.11ay","ieee802.15.1","other-wireless","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","docsis","gpon","xg-pon","xgs-pon","ng-pon2","epon","10g-epon","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -322,6 +440,33 @@ const ( // WritableInterfaceTemplateTypeNr400gbaseDashxDashOsfp captures enum value "400gbase-x-osfp" WritableInterfaceTemplateTypeNr400gbaseDashxDashOsfp string = "400gbase-x-osfp" + // WritableInterfaceTemplateTypeNr1000baseDashKx captures enum value "1000base-kx" + WritableInterfaceTemplateTypeNr1000baseDashKx string = "1000base-kx" + + // WritableInterfaceTemplateTypeNr10gbaseDashKr captures enum value "10gbase-kr" + WritableInterfaceTemplateTypeNr10gbaseDashKr string = "10gbase-kr" + + // WritableInterfaceTemplateTypeNr10gbaseDashKx4 captures enum value "10gbase-kx4" + WritableInterfaceTemplateTypeNr10gbaseDashKx4 string = "10gbase-kx4" + + // WritableInterfaceTemplateTypeNr25gbaseDashKr captures enum value "25gbase-kr" + WritableInterfaceTemplateTypeNr25gbaseDashKr string = "25gbase-kr" + + // WritableInterfaceTemplateTypeNr40gbaseDashKr4 captures enum value "40gbase-kr4" + WritableInterfaceTemplateTypeNr40gbaseDashKr4 string = "40gbase-kr4" + + // WritableInterfaceTemplateTypeNr50gbaseDashKr captures enum value "50gbase-kr" + WritableInterfaceTemplateTypeNr50gbaseDashKr string = "50gbase-kr" + + // WritableInterfaceTemplateTypeNr100gbaseDashKp4 captures enum value "100gbase-kp4" + WritableInterfaceTemplateTypeNr100gbaseDashKp4 string = "100gbase-kp4" + + // WritableInterfaceTemplateTypeNr100gbaseDashKr2 captures enum value "100gbase-kr2" + WritableInterfaceTemplateTypeNr100gbaseDashKr2 string = "100gbase-kr2" + + // WritableInterfaceTemplateTypeNr100gbaseDashKr4 captures enum value "100gbase-kr4" + WritableInterfaceTemplateTypeNr100gbaseDashKr4 string = "100gbase-kr4" + // WritableInterfaceTemplateTypeIeee802Dot11a captures enum value "ieee802.11a" WritableInterfaceTemplateTypeIeee802Dot11a string = "ieee802.11a" @@ -340,9 +485,15 @@ const ( // WritableInterfaceTemplateTypeIeee802Dot11ax captures enum value "ieee802.11ax" WritableInterfaceTemplateTypeIeee802Dot11ax string = "ieee802.11ax" + // WritableInterfaceTemplateTypeIeee802Dot11ay captures enum value "ieee802.11ay" + WritableInterfaceTemplateTypeIeee802Dot11ay string = "ieee802.11ay" + // WritableInterfaceTemplateTypeIeee802Dot15Dot1 captures enum value "ieee802.15.1" WritableInterfaceTemplateTypeIeee802Dot15Dot1 string = "ieee802.15.1" + // WritableInterfaceTemplateTypeOtherDashWireless captures enum value "other-wireless" + WritableInterfaceTemplateTypeOtherDashWireless string = "other-wireless" + // WritableInterfaceTemplateTypeGsm captures enum value "gsm" WritableInterfaceTemplateTypeGsm string = "gsm" @@ -569,7 +720,7 @@ func (m *WritableInterfaceTemplate) ContextValidate(ctx context.Context, formats func (m *WritableInterfaceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -596,7 +747,7 @@ func (m *WritableInterfaceTemplate) contextValidateID(ctx context.Context, forma func (m *WritableInterfaceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item.go index 649076200..79cb739a0 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item.go @@ -47,7 +47,7 @@ type WritableInventoryItem struct { // Component // Read Only: true - Component map[string]*string `json:"component,omitempty"` + Component interface{} `json:"component,omitempty"` // Component id // Maximum: 2.147483647e+09 @@ -60,7 +60,7 @@ type WritableInventoryItem struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -95,7 +95,7 @@ type WritableInventoryItem struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Manufacturer Manufacturer *int64 `json:"manufacturer,omitempty"` @@ -361,10 +361,6 @@ func (m *WritableInventoryItem) ContextValidate(ctx context.Context, formats str res = append(res, err) } - if err := m.contextValidateComponent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -404,14 +400,9 @@ func (m *WritableInventoryItem) contextValidateDepth(ctx context.Context, format return nil } -func (m *WritableInventoryItem) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableInventoryItem) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -438,7 +429,7 @@ func (m *WritableInventoryItem) contextValidateID(ctx context.Context, formats s func (m *WritableInventoryItem) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item_template.go index 6c464cadf..dcacb95dd 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_inventory_item_template.go @@ -40,7 +40,7 @@ type WritableInventoryItemTemplate struct { // Component // Read Only: true - Component map[string]*string `json:"component,omitempty"` + Component interface{} `json:"component,omitempty"` // Component id // Maximum: 2.147483647e+09 @@ -53,7 +53,7 @@ type WritableInventoryItemTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -80,7 +80,7 @@ type WritableInventoryItemTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Manufacturer Manufacturer *int64 `json:"manufacturer,omitempty"` @@ -281,10 +281,6 @@ func (m *WritableInventoryItemTemplate) ContextValidate(ctx context.Context, for res = append(res, err) } - if err := m.contextValidateComponent(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -320,14 +316,9 @@ func (m *WritableInventoryItemTemplate) contextValidateDepth(ctx context.Context return nil } -func (m *WritableInventoryItemTemplate) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableInventoryItemTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -354,7 +345,7 @@ func (m *WritableInventoryItemTemplate) contextValidateID(ctx context.Context, f func (m *WritableInventoryItemTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_address.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_address.go index 806e8349e..6cb225184 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_address.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_address.go @@ -44,7 +44,7 @@ type WritableIPAddress struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Maximum: 2.147483647e+09 @@ -57,7 +57,7 @@ type WritableIPAddress struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -88,16 +88,16 @@ type WritableIPAddress struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // NAT (Inside) // // The IP for which this address is the "outside" IP NatInside *int64 `json:"nat_inside,omitempty"` - // Nat outside + // nat outside // Read Only: true - NatOutside string `json:"nat_outside,omitempty"` + NatOutside []*NestedIPAddress `json:"nat_outside"` // Role // @@ -154,6 +154,10 @@ func (m *WritableIPAddress) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateNatOutside(formats); err != nil { + res = append(res, err) + } + if err := m.validateRole(formats); err != nil { res = append(res, err) } @@ -253,6 +257,32 @@ func (m *WritableIPAddress) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *WritableIPAddress) validateNatOutside(formats strfmt.Registry) error { + if swag.IsZero(m.NatOutside) { // not required + return nil + } + + for i := 0; i < len(m.NatOutside); i++ { + if swag.IsZero(m.NatOutside[i]) { // not required + continue + } + + if m.NatOutside[i] != nil { + if err := m.NatOutside[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + var writableIpAddressTypeRolePropEnum []interface{} func init() { @@ -406,10 +436,6 @@ func (m *WritableIPAddress) validateURL(formats strfmt.Registry) error { func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -448,14 +474,9 @@ func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt. return nil } -func (m *WritableIPAddress) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableIPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -491,7 +512,7 @@ func (m *WritableIPAddress) contextValidateID(ctx context.Context, formats strfm func (m *WritableIPAddress) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -500,10 +521,25 @@ func (m *WritableIPAddress) contextValidateLastUpdated(ctx context.Context, form func (m *WritableIPAddress) contextValidateNatOutside(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "nat_outside", "body", string(m.NatOutside)); err != nil { + if err := validate.ReadOnly(ctx, "nat_outside", "body", []*NestedIPAddress(m.NatOutside)); err != nil { return err } + for i := 0; i < len(m.NatOutside); i++ { + + if m.NatOutside[i] != nil { + if err := m.NatOutside[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_range.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_range.go index 617e83ab0..1483f1d22 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_range.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_ip_range.go @@ -43,7 +43,7 @@ type WritableIPRange struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -73,7 +73,7 @@ type WritableIPRange struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Role // @@ -347,7 +347,7 @@ func (m *WritableIPRange) contextValidateChildren(ctx context.Context, formats s func (m *WritableIPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -383,7 +383,7 @@ func (m *WritableIPRange) contextValidateID(ctx context.Context, formats strfmt. func (m *WritableIPRange) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_journal_entry.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_journal_entry.go index 6601dae84..b5326b698 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_journal_entry.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_journal_entry.go @@ -38,7 +38,7 @@ type WritableJournalEntry struct { // Assigned object // Read Only: true - AssignedObject map[string]*string `json:"assigned_object,omitempty"` + AssignedObject interface{} `json:"assigned_object,omitempty"` // Assigned object id // Required: true @@ -58,7 +58,7 @@ type WritableJournalEntry struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Created by CreatedBy *int64 `json:"created_by,omitempty"` @@ -81,7 +81,7 @@ type WritableJournalEntry struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // tags Tags []*NestedTag `json:"tags"` @@ -287,10 +287,6 @@ func (m *WritableJournalEntry) validateURL(formats strfmt.Registry) error { func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateAssignedObject(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -321,14 +317,9 @@ func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strf return nil } -func (m *WritableJournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - func (m *WritableJournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -355,7 +346,7 @@ func (m *WritableJournalEntry) contextValidateID(ctx context.Context, formats st func (m *WritableJournalEntry) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n.go new file mode 100644 index 000000000..677aba22f --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n.go @@ -0,0 +1,501 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableL2VPN writable l2 v p n +// +// swagger:model WritableL2VPN +type WritableL2VPN struct { + + // Created + // Read Only: true + // Format: date-time + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // export targets + // Unique: true + ExportTargets []int64 `json:"export_targets"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Identifier + // Maximum: 2.147483647e+09 + // Minimum: -2.147483648e+09 + Identifier *int64 `json:"identifier,omitempty"` + + // import targets + // Unique: true + ImportTargets []int64 `json:"import_targets"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + + // Type + // Required: true + // Enum: [vpws vpls vxlan vxlan-evpn mpls-evpn pbb-evpn epl evpl ep-lan evp-lan ep-tree evp-tree] + Type *string `json:"type"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable l2 v p n +func (m *WritableL2VPN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExportTargets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImportTargets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableL2VPN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateExportTargets(formats strfmt.Registry) error { + if swag.IsZero(m.ExportTargets) { // not required + return nil + } + + if err := validate.UniqueItems("export_targets", "body", m.ExportTargets); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.Identifier) { // not required + return nil + } + + if err := validate.MinimumInt("identifier", "body", *m.Identifier, -2.147483648e+09, false); err != nil { + return err + } + + if err := validate.MaximumInt("identifier", "body", *m.Identifier, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateImportTargets(formats strfmt.Registry) error { + if swag.IsZero(m.ImportTargets) { // not required + return nil + } + + if err := validate.UniqueItems("import_targets", "body", m.ImportTargets); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var writableL2VPNTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["vpws","vpls","vxlan","vxlan-evpn","mpls-evpn","pbb-evpn","epl","evpl","ep-lan","evp-lan","ep-tree","evp-tree"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableL2VPNTypeTypePropEnum = append(writableL2VPNTypeTypePropEnum, v) + } +} + +const ( + + // WritableL2VPNTypeVpws captures enum value "vpws" + WritableL2VPNTypeVpws string = "vpws" + + // WritableL2VPNTypeVpls captures enum value "vpls" + WritableL2VPNTypeVpls string = "vpls" + + // WritableL2VPNTypeVxlan captures enum value "vxlan" + WritableL2VPNTypeVxlan string = "vxlan" + + // WritableL2VPNTypeVxlanDashEvpn captures enum value "vxlan-evpn" + WritableL2VPNTypeVxlanDashEvpn string = "vxlan-evpn" + + // WritableL2VPNTypeMplsDashEvpn captures enum value "mpls-evpn" + WritableL2VPNTypeMplsDashEvpn string = "mpls-evpn" + + // WritableL2VPNTypePbbDashEvpn captures enum value "pbb-evpn" + WritableL2VPNTypePbbDashEvpn string = "pbb-evpn" + + // WritableL2VPNTypeEpl captures enum value "epl" + WritableL2VPNTypeEpl string = "epl" + + // WritableL2VPNTypeEvpl captures enum value "evpl" + WritableL2VPNTypeEvpl string = "evpl" + + // WritableL2VPNTypeEpDashLan captures enum value "ep-lan" + WritableL2VPNTypeEpDashLan string = "ep-lan" + + // WritableL2VPNTypeEvpDashLan captures enum value "evp-lan" + WritableL2VPNTypeEvpDashLan string = "evp-lan" + + // WritableL2VPNTypeEpDashTree captures enum value "ep-tree" + WritableL2VPNTypeEpDashTree string = "ep-tree" + + // WritableL2VPNTypeEvpDashTree captures enum value "evp-tree" + WritableL2VPNTypeEvpDashTree string = "evp-tree" +) + +// prop value enum +func (m *WritableL2VPN) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableL2VPNTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableL2VPN) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable l2 v p n based on the context it is used +func (m *WritableL2VPN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableL2VPN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableL2VPN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableL2VPN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableL2VPN) UnmarshalBinary(b []byte) error { + var res WritableL2VPN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n_termination.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n_termination.go new file mode 100644 index 000000000..b61d4192d --- /dev/null +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_l2_v_p_n_termination.go @@ -0,0 +1,336 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright (c) 2020 Samuel Mutel <12967891+smutel@users.noreply.github.com> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableL2VPNTermination writable l2 v p n termination +// +// swagger:model WritableL2VPNTermination +type WritableL2VPNTermination struct { + + // Assigned object + // Read Only: true + AssignedObject interface{} `json:"assigned_object,omitempty"` + + // Assigned object id + // Required: true + // Maximum: 2.147483647e+09 + // Minimum: 0 + AssignedObjectID *int64 `json:"assigned_object_id"` + + // Assigned object type + // Required: true + AssignedObjectType *string `json:"assigned_object_type"` + + // Created + // Read Only: true + // Format: date-time + Created *strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // L2vpn + // Required: true + L2vpn *int64 `json:"l2vpn"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable l2 v p n termination +func (m *WritableL2VPNTermination) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssignedObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAssignedObjectType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateL2vpn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableL2VPNTermination) validateAssignedObjectID(formats strfmt.Registry) error { + + if err := validate.Required("assigned_object_id", "body", m.AssignedObjectID); err != nil { + return err + } + + if err := validate.MinimumInt("assigned_object_id", "body", *m.AssignedObjectID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) validateAssignedObjectType(formats strfmt.Registry) error { + + if err := validate.Required("assigned_object_type", "body", m.AssignedObjectType); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) validateL2vpn(formats strfmt.Registry) error { + + if err := validate.Required("l2vpn", "body", m.L2vpn); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableL2VPNTermination) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable l2 v p n termination based on the context it is used +func (m *WritableL2VPNTermination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableL2VPNTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { + return err + } + + return nil +} + +func (m *WritableL2VPNTermination) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableL2VPNTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableL2VPNTermination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableL2VPNTermination) UnmarshalBinary(b []byte) error { + var res WritableL2VPNTermination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_location.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_location.go index 40c08c236..4fe3eb2d7 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_location.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_location.go @@ -22,6 +22,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -42,7 +43,7 @@ type WritableLocation struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +67,7 @@ type WritableLocation struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -92,6 +93,10 @@ type WritableLocation struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // Status + // Enum: [planned staging active decommissioning retired] + Status string `json:"status,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -132,6 +137,10 @@ func (m *WritableLocation) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -229,6 +238,57 @@ func (m *WritableLocation) validateSlug(formats strfmt.Registry) error { return nil } +var writableLocationTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["planned","staging","active","decommissioning","retired"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableLocationTypeStatusPropEnum = append(writableLocationTypeStatusPropEnum, v) + } +} + +const ( + + // WritableLocationStatusPlanned captures enum value "planned" + WritableLocationStatusPlanned string = "planned" + + // WritableLocationStatusStaging captures enum value "staging" + WritableLocationStatusStaging string = "staging" + + // WritableLocationStatusActive captures enum value "active" + WritableLocationStatusActive string = "active" + + // WritableLocationStatusDecommissioning captures enum value "decommissioning" + WritableLocationStatusDecommissioning string = "decommissioning" + + // WritableLocationStatusRetired captures enum value "retired" + WritableLocationStatusRetired string = "retired" +) + +// prop value enum +func (m *WritableLocation) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableLocationTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableLocation) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *WritableLocation) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -324,7 +384,7 @@ func (m *WritableLocation) contextValidateDepth(ctx context.Context, formats str func (m *WritableLocation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -360,7 +420,7 @@ func (m *WritableLocation) contextValidateID(ctx context.Context, formats strfmt func (m *WritableLocation) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module.go index 7cd3d78a6..62d6efe98 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module.go @@ -47,7 +47,7 @@ type WritableModule struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -67,7 +67,7 @@ type WritableModule struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module bay // Required: true @@ -285,7 +285,7 @@ func (m *WritableModule) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *WritableModule) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *WritableModule) contextValidateID(ctx context.Context, formats strfmt.R func (m *WritableModule) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay.go index 87e351e23..50d8a7a44 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay.go @@ -38,7 +38,7 @@ type WritableModuleBay struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -72,7 +72,7 @@ type WritableModuleBay struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -314,7 +314,7 @@ func (m *WritableModuleBay) ContextValidate(ctx context.Context, formats strfmt. func (m *WritableModuleBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -341,7 +341,7 @@ func (m *WritableModuleBay) contextValidateID(ctx context.Context, formats strfm func (m *WritableModuleBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay_template.go index 7c678455e..92e857448 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_bay_template.go @@ -37,7 +37,7 @@ type WritableModuleBayTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -64,7 +64,7 @@ type WritableModuleBayTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -260,7 +260,7 @@ func (m *WritableModuleBayTemplate) ContextValidate(ctx context.Context, formats func (m *WritableModuleBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -287,7 +287,7 @@ func (m *WritableModuleBayTemplate) contextValidateID(ctx context.Context, forma func (m *WritableModuleBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_type.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_type.go index 540e45c09..da31c9846 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_type.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_module_type.go @@ -41,7 +41,7 @@ type WritableModuleType struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -57,7 +57,7 @@ type WritableModuleType struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Manufacturer // Required: true @@ -258,7 +258,7 @@ func (m *WritableModuleType) ContextValidate(ctx context.Context, formats strfmt func (m *WritableModuleType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -285,7 +285,7 @@ func (m *WritableModuleType) contextValidateID(ctx context.Context, formats strf func (m *WritableModuleType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_object_permission.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_object_permission.go index 98023aba5..8b89993d4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_object_permission.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_object_permission.go @@ -42,7 +42,7 @@ type WritableObjectPermission struct { // Constraints // // Queryset filter matching the applicable objects of the selected type(s) - Constraints *string `json:"constraints,omitempty"` + Constraints interface{} `json:"constraints,omitempty"` // Description // Max Length: 200 diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_platform.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_platform.go index 414c40071..8bf9e376d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_platform.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_platform.go @@ -38,7 +38,7 @@ type WritablePlatform struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WritablePlatform struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Manufacturer // @@ -78,7 +78,7 @@ type WritablePlatform struct { // NAPALM arguments // // Additional arguments to pass when initiating the NAPALM driver (JSON format) - NapalmArgs *string `json:"napalm_args,omitempty"` + NapalmArgs interface{} `json:"napalm_args,omitempty"` // NAPALM driver // @@ -316,7 +316,7 @@ func (m *WritablePlatform) ContextValidate(ctx context.Context, formats strfmt.R func (m *WritablePlatform) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -352,7 +352,7 @@ func (m *WritablePlatform) contextValidateID(ctx context.Context, formats strfmt func (m *WritablePlatform) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_feed.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_feed.go index adcc35678..bef86b97d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_feed.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_feed.go @@ -48,29 +48,32 @@ type WritablePowerFeed struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Comments Comments string `json:"comments,omitempty"` - // Connected endpoint - // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -86,19 +89,17 @@ type WritablePowerFeed struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -167,6 +168,10 @@ func (m *WritablePowerFeed) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -256,6 +261,18 @@ func (m *WritablePowerFeed) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritablePowerFeed) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritablePowerFeed) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -562,15 +579,19 @@ func (m *WritablePowerFeed) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -590,11 +611,11 @@ func (m *WritablePowerFeed) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -637,23 +658,36 @@ func (m *WritablePowerFeed) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerFeed) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritablePowerFeed) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritablePowerFeed) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerFeed) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritablePowerFeed) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerFeed) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -662,7 +696,7 @@ func (m *WritablePowerFeed) contextValidateConnectedEndpointType(ctx context.Con func (m *WritablePowerFeed) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -689,21 +723,25 @@ func (m *WritablePowerFeed) contextValidateID(ctx context.Context, formats strfm func (m *WritablePowerFeed) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritablePowerFeed) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerFeed) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritablePowerFeed) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerFeed) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet.go index 3bff7b7d5..21f858998 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet.go @@ -43,26 +43,29 @@ type WritablePowerOutlet struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -98,19 +101,17 @@ type WritablePowerOutlet struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -152,6 +153,10 @@ func (m *WritablePowerOutlet) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -217,6 +222,18 @@ func (m *WritablePowerOutlet) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritablePowerOutlet) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritablePowerOutlet) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -692,15 +709,19 @@ func (m *WritablePowerOutlet) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -720,11 +741,11 @@ func (m *WritablePowerOutlet) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -767,23 +788,36 @@ func (m *WritablePowerOutlet) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritablePowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerOutlet) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritablePowerOutlet) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritablePowerOutlet) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerOutlet) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritablePowerOutlet) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerOutlet) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -792,7 +826,7 @@ func (m *WritablePowerOutlet) contextValidateConnectedEndpointType(ctx context.C func (m *WritablePowerOutlet) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -819,21 +853,25 @@ func (m *WritablePowerOutlet) contextValidateID(ctx context.Context, formats str func (m *WritablePowerOutlet) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritablePowerOutlet) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerOutlet) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritablePowerOutlet) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerOutlet) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet_template.go index e49180cc8..7698ef799 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_outlet_template.go @@ -38,7 +38,7 @@ type WritablePowerOutletTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -71,7 +71,7 @@ type WritablePowerOutletTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module type // Required: true @@ -628,7 +628,7 @@ func (m *WritablePowerOutletTemplate) ContextValidate(ctx context.Context, forma func (m *WritablePowerOutletTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -655,7 +655,7 @@ func (m *WritablePowerOutletTemplate) contextValidateID(ctx context.Context, for func (m *WritablePowerOutletTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_panel.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_panel.go index 0a953c145..b7b2e5823 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_panel.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_panel.go @@ -38,7 +38,7 @@ type WritablePowerPanel struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +54,7 @@ type WritablePowerPanel struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Location Location *int64 `json:"location,omitempty"` @@ -244,7 +244,7 @@ func (m *WritablePowerPanel) ContextValidate(ctx context.Context, formats strfmt func (m *WritablePowerPanel) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -271,7 +271,7 @@ func (m *WritablePowerPanel) contextValidateID(ctx context.Context, formats strf func (m *WritablePowerPanel) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port.go index 487126bd3..08a627177 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port.go @@ -50,26 +50,29 @@ type WritablePowerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Connected endpoint - // + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` + ConnectedEndpoints []*string `json:"connected_endpoints"` - // Connected endpoint reachable + // Connected endpoints reachable // Read Only: true - ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` + ConnectedEndpointsReachable *bool `json:"connected_endpoints_reachable,omitempty"` - // Connected endpoint type + // Connected endpoints type // Read Only: true - ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + ConnectedEndpointsType string `json:"connected_endpoints_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -99,19 +102,17 @@ type WritablePowerPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -161,6 +162,10 @@ func (m *WritablePowerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -242,6 +247,18 @@ func (m *WritablePowerPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritablePowerPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritablePowerPort) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -709,15 +726,19 @@ func (m *WritablePowerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { + if err := m.contextValidateCableEnd(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoints(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpointsReachable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConnectedEndpointsType(ctx, formats); err != nil { res = append(res, err) } @@ -737,11 +758,11 @@ func (m *WritablePowerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -784,23 +805,36 @@ func (m *WritablePowerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + +func (m *WritablePowerPort) contextValidateConnectedEndpoints(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoints", "body", []*string(m.ConnectedEndpoints)); err != nil { + return err + } return nil } -func (m *WritablePowerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerPort) contextValidateConnectedEndpointsReachable(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_reachable", "body", m.ConnectedEndpointsReachable); err != nil { return err } return nil } -func (m *WritablePowerPort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerPort) contextValidateConnectedEndpointsType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + if err := validate.ReadOnly(ctx, "connected_endpoints_type", "body", string(m.ConnectedEndpointsType)); err != nil { return err } @@ -809,7 +843,7 @@ func (m *WritablePowerPort) contextValidateConnectedEndpointType(ctx context.Con func (m *WritablePowerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -836,21 +870,25 @@ func (m *WritablePowerPort) contextValidateID(ctx context.Context, formats strfm func (m *WritablePowerPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritablePowerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritablePowerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritablePowerPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port_template.go index 4b55921b6..d900978eb 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_power_port_template.go @@ -45,7 +45,7 @@ type WritablePowerPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -72,7 +72,7 @@ type WritablePowerPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Maximum draw // @@ -645,7 +645,7 @@ func (m *WritablePowerPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritablePowerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -672,7 +672,7 @@ func (m *WritablePowerPortTemplate) contextValidateID(ctx context.Context, forma func (m *WritablePowerPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_prefix.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_prefix.go index 226eba582..2ac96746c 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_prefix.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_prefix.go @@ -47,7 +47,7 @@ type WritablePrefix struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -76,7 +76,7 @@ type WritablePrefix struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Mark utilized // @@ -356,7 +356,7 @@ func (m *WritablePrefix) contextValidateChildren(ctx context.Context, formats st func (m *WritablePrefix) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -392,7 +392,7 @@ func (m *WritablePrefix) contextValidateID(ctx context.Context, formats strfmt.R func (m *WritablePrefix) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider.go index 5afd5a8b2..da77eb880 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider.go @@ -63,7 +63,7 @@ type WritableProvider struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -79,7 +79,7 @@ type WritableProvider struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -366,7 +366,7 @@ func (m *WritableProvider) contextValidateCircuitCount(ctx context.Context, form func (m *WritableProvider) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -393,7 +393,7 @@ func (m *WritableProvider) contextValidateID(ctx context.Context, formats strfmt func (m *WritableProvider) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider_network.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider_network.go index fd87ef3dc..14c5122f4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider_network.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_provider_network.go @@ -41,7 +41,7 @@ type WritableProviderNetwork struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -61,7 +61,7 @@ type WritableProviderNetwork struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -276,7 +276,7 @@ func (m *WritableProviderNetwork) ContextValidate(ctx context.Context, formats s func (m *WritableProviderNetwork) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -303,7 +303,7 @@ func (m *WritableProviderNetwork) contextValidateID(ctx context.Context, formats func (m *WritableProviderNetwork) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack.go index 3990d0017..9ff9a09c4 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack.go @@ -48,7 +48,7 @@ type WritableRack struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -77,7 +77,7 @@ type WritableRack struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Location // Required: true @@ -135,7 +135,7 @@ type WritableRack struct { Tenant *int64 `json:"tenant,omitempty"` // Type - // Enum: [2-post-frame 4-post-frame 4-post-cabinet wall-frame wall-cabinet] + // Enum: [2-post-frame 4-post-frame 4-post-cabinet wall-frame wall-frame-vertical wall-cabinet wall-cabinet-vertical] Type string `json:"type,omitempty"` // Height (U) @@ -485,7 +485,7 @@ var writableRackTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["2-post-frame","4-post-frame","4-post-cabinet","wall-frame","wall-cabinet"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["2-post-frame","4-post-frame","4-post-cabinet","wall-frame","wall-frame-vertical","wall-cabinet","wall-cabinet-vertical"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -507,8 +507,14 @@ const ( // WritableRackTypeWallDashFrame captures enum value "wall-frame" WritableRackTypeWallDashFrame string = "wall-frame" + // WritableRackTypeWallDashFrameDashVertical captures enum value "wall-frame-vertical" + WritableRackTypeWallDashFrameDashVertical string = "wall-frame-vertical" + // WritableRackTypeWallDashCabinet captures enum value "wall-cabinet" WritableRackTypeWallDashCabinet string = "wall-cabinet" + + // WritableRackTypeWallDashCabinetDashVertical captures enum value "wall-cabinet-vertical" + WritableRackTypeWallDashCabinetDashVertical string = "wall-cabinet-vertical" ) // prop value enum @@ -637,7 +643,7 @@ func (m *WritableRack) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *WritableRack) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -673,7 +679,7 @@ func (m *WritableRack) contextValidateID(ctx context.Context, formats strfmt.Reg func (m *WritableRack) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack_reservation.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack_reservation.go index 9808a8426..54cc1ed5b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack_reservation.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rack_reservation.go @@ -38,7 +38,7 @@ type WritableRackReservation struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +60,7 @@ type WritableRackReservation struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Rack // Required: true @@ -285,7 +285,7 @@ func (m *WritableRackReservation) ContextValidate(ctx context.Context, formats s func (m *WritableRackReservation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -312,7 +312,7 @@ func (m *WritableRackReservation) contextValidateID(ctx context.Context, formats func (m *WritableRackReservation) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port.go index 31f93b89d..e9f5dee3e 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port.go @@ -43,6 +43,11 @@ type WritableRearPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` + // Cable end + // Read Only: true + // Min Length: 1 + CableEnd string `json:"cable_end,omitempty"` + // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -51,7 +56,7 @@ type WritableRearPort struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -81,19 +86,17 @@ type WritableRearPort struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` - // Link peer - // // // Return the appropriate serializer for the link termination model. // // Read Only: true - LinkPeer map[string]*string `json:"link_peer,omitempty"` + LinkPeers []*string `json:"link_peers"` - // Link peer type + // Link peers type // Read Only: true - LinkPeerType string `json:"link_peer_type,omitempty"` + LinkPeersType string `json:"link_peers_type,omitempty"` // Mark connected // @@ -136,6 +139,10 @@ func (m *WritableRearPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCableEnd(formats); err != nil { + res = append(res, err) + } + if err := m.validateColor(formats); err != nil { res = append(res, err) } @@ -205,6 +212,18 @@ func (m *WritableRearPort) validateCable(formats strfmt.Registry) error { return nil } +func (m *WritableRearPort) validateCableEnd(formats strfmt.Registry) error { + if swag.IsZero(m.CableEnd) { // not required + return nil + } + + if err := validate.MinLength("cable_end", "body", m.CableEnd, 1); err != nil { + return err + } + + return nil +} + func (m *WritableRearPort) validateColor(formats strfmt.Registry) error { if swag.IsZero(m.Color) { // not required return nil @@ -527,6 +546,10 @@ func (m *WritableRearPort) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateCableEnd(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -543,11 +566,11 @@ func (m *WritableRearPort) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } - if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + if err := m.contextValidateLinkPeers(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + if err := m.contextValidateLinkPeersType(ctx, formats); err != nil { res = append(res, err) } @@ -590,9 +613,18 @@ func (m *WritableRearPort) contextValidateCable(ctx context.Context, formats str return nil } +func (m *WritableRearPort) contextValidateCableEnd(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cable_end", "body", string(m.CableEnd)); err != nil { + return err + } + + return nil +} + func (m *WritableRearPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -619,21 +651,25 @@ func (m *WritableRearPort) contextValidateID(ctx context.Context, formats strfmt func (m *WritableRearPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } return nil } -func (m *WritableRearPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableRearPort) contextValidateLinkPeers(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peers", "body", []*string(m.LinkPeers)); err != nil { + return err + } return nil } -func (m *WritableRearPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableRearPort) contextValidateLinkPeersType(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + if err := validate.ReadOnly(ctx, "link_peers_type", "body", string(m.LinkPeersType)); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port_template.go index 65dfc2688..b3f43e4f6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_rear_port_template.go @@ -43,7 +43,7 @@ type WritableRearPortTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -70,7 +70,7 @@ type WritableRearPortTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Module type // Required: true @@ -481,7 +481,7 @@ func (m *WritableRearPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritableRearPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -508,7 +508,7 @@ func (m *WritableRearPortTemplate) contextValidateID(ctx context.Context, format func (m *WritableRearPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_region.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_region.go index eb019a3f2..dd209f49b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_region.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_region.go @@ -42,7 +42,7 @@ type WritableRegion struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WritableRegion struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -296,7 +296,7 @@ func (m *WritableRegion) contextValidateDepth(ctx context.Context, formats strfm func (m *WritableRegion) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -323,7 +323,7 @@ func (m *WritableRegion) contextValidateID(ctx context.Context, formats strfmt.R func (m *WritableRegion) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_route_target.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_route_target.go index 92f62aebc..cbf6d0670 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_route_target.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_route_target.go @@ -38,7 +38,7 @@ type WritableRouteTarget struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type WritableRouteTarget struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // @@ -241,7 +241,7 @@ func (m *WritableRouteTarget) ContextValidate(ctx context.Context, formats strfm func (m *WritableRouteTarget) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -268,7 +268,7 @@ func (m *WritableRouteTarget) contextValidateID(ctx context.Context, formats str func (m *WritableRouteTarget) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service.go index a670f7475..54d69415b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service.go @@ -39,7 +39,7 @@ type WritableService struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableService struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -347,7 +347,7 @@ func (m *WritableService) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableService) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -374,7 +374,7 @@ func (m *WritableService) contextValidateID(ctx context.Context, formats strfmt. func (m *WritableService) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service_template.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service_template.go index 55a3f6763..3acc1756d 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service_template.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_service_template.go @@ -39,7 +39,7 @@ type WritableServiceTemplate struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +59,7 @@ type WritableServiceTemplate struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -321,7 +321,7 @@ func (m *WritableServiceTemplate) ContextValidate(ctx context.Context, formats s func (m *WritableServiceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -348,7 +348,7 @@ func (m *WritableServiceTemplate) contextValidateID(ctx context.Context, formats func (m *WritableServiceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site.go index ccb79de95..7f19c32cf 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site.go @@ -50,7 +50,7 @@ type WritableSite struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -83,7 +83,7 @@ type WritableSite struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Latitude // @@ -138,7 +138,7 @@ type WritableSite struct { Tenant *int64 `json:"tenant,omitempty"` // Time zone - TimeZone string `json:"time_zone,omitempty"` + TimeZone *string `json:"time_zone,omitempty"` // Url // Read Only: true @@ -492,7 +492,7 @@ func (m *WritableSite) contextValidateCircuitCount(ctx context.Context, formats func (m *WritableSite) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -528,7 +528,7 @@ func (m *WritableSite) contextValidateID(ctx context.Context, formats strfmt.Reg func (m *WritableSite) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site_group.go index 0e22131ed..e3c10a97f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_site_group.go @@ -42,7 +42,7 @@ type WritableSiteGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WritableSiteGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -296,7 +296,7 @@ func (m *WritableSiteGroup) contextValidateDepth(ctx context.Context, formats st func (m *WritableSiteGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -323,7 +323,7 @@ func (m *WritableSiteGroup) contextValidateID(ctx context.Context, formats strfm func (m *WritableSiteGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant.go index 4b50dbda1..2aa8e1285 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant.go @@ -49,7 +49,7 @@ type WritableTenant struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +80,7 @@ type WritableTenant struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -372,7 +372,7 @@ func (m *WritableTenant) contextValidateClusterCount(ctx context.Context, format func (m *WritableTenant) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -417,7 +417,7 @@ func (m *WritableTenant) contextValidateIpaddressCount(ctx context.Context, form func (m *WritableTenant) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant_group.go index 0597252af..1e6200d00 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_tenant_group.go @@ -42,7 +42,7 @@ type WritableTenantGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WritableTenantGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -296,7 +296,7 @@ func (m *WritableTenantGroup) contextValidateDepth(ctx context.Context, formats func (m *WritableTenantGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -323,7 +323,7 @@ func (m *WritableTenantGroup) contextValidateID(ctx context.Context, formats str func (m *WritableTenantGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_token.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_token.go index d5401bd6e..87e1b2be6 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_token.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_token.go @@ -34,6 +34,9 @@ import ( // swagger:model WritableToken type WritableToken struct { + // allowed ips + AllowedIps []IPNetwork `json:"allowed_ips"` + // Created // Read Only: true // Format: date-time @@ -60,6 +63,10 @@ type WritableToken struct { // Min Length: 40 Key string `json:"key,omitempty"` + // Last used + // Format: date-time + LastUsed *strfmt.DateTime `json:"last_used,omitempty"` + // Url // Read Only: true // Format: uri @@ -95,6 +102,10 @@ func (m *WritableToken) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUsed(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -161,6 +172,18 @@ func (m *WritableToken) validateKey(formats strfmt.Registry) error { return nil } +func (m *WritableToken) validateLastUsed(formats strfmt.Registry) error { + if swag.IsZero(m.LastUsed) { // not required + return nil + } + + if err := validate.FormatOf("last_used", "body", "date-time", m.LastUsed.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableToken) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_l_a_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_l_a_n.go index fcf84f2a3..7978cff0f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_l_a_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_l_a_n.go @@ -39,7 +39,7 @@ type WritableVLAN struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,10 +60,14 @@ type WritableVLAN struct { // Read Only: true ID int64 `json:"id,omitempty"` + // L2vpn termination + // Read Only: true + L2vpnTermination string `json:"l2vpn_termination,omitempty"` + // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -327,6 +331,10 @@ func (m *WritableVLAN) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -351,7 +359,7 @@ func (m *WritableVLAN) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *WritableVLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -376,9 +384,18 @@ func (m *WritableVLAN) contextValidateID(ctx context.Context, formats strfmt.Reg return nil } +func (m *WritableVLAN) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "l2vpn_termination", "body", string(m.L2vpnTermination)); err != nil { + return err + } + + return nil +} + func (m *WritableVLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_r_f.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_r_f.go index 029165425..3ed7c3a98 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_r_f.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_v_r_f.go @@ -38,7 +38,7 @@ type WritableVRF struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -75,7 +75,7 @@ type WritableVRF struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -322,7 +322,7 @@ func (m *WritableVRF) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *WritableVRF) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -358,7 +358,7 @@ func (m *WritableVRF) contextValidateIpaddressCount(ctx context.Context, formats func (m *WritableVRF) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_chassis.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_chassis.go index 64fe618c6..127054f2f 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_chassis.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_chassis.go @@ -38,7 +38,7 @@ type WritableVirtualChassis struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +58,7 @@ type WritableVirtualChassis struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Master Master *int64 `json:"master,omitempty"` @@ -247,7 +247,7 @@ func (m *WritableVirtualChassis) ContextValidate(ctx context.Context, formats st func (m *WritableVirtualChassis) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -274,7 +274,7 @@ func (m *WritableVirtualChassis) contextValidateID(ctx context.Context, formats func (m *WritableVirtualChassis) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_machine_with_config_context.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_machine_with_config_context.go index 5ea2b88fc..ef0863513 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_machine_with_config_context.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_virtual_machine_with_config_context.go @@ -37,8 +37,7 @@ import ( type WritableVirtualMachineWithConfigContext struct { // Cluster - // Required: true - Cluster *int64 `json:"cluster"` + Cluster *int64 `json:"cluster,omitempty"` // Comments Comments string `json:"comments,omitempty"` @@ -50,11 +49,14 @@ type WritableVirtualMachineWithConfigContext struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` + // Device + Device *int64 `json:"device,omitempty"` + // Disk (GB) // Maximum: 2.147483647e+09 // Minimum: 0 @@ -71,7 +73,7 @@ type WritableVirtualMachineWithConfigContext struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Local context data LocalContextData interface{} `json:"local_context_data,omitempty"` @@ -104,8 +106,7 @@ type WritableVirtualMachineWithConfigContext struct { Role *int64 `json:"role,omitempty"` // Site - // Read Only: true - Site string `json:"site,omitempty"` + Site *int64 `json:"site,omitempty"` // Status // Enum: [offline active planned staged failed decommissioning] @@ -131,10 +132,6 @@ type WritableVirtualMachineWithConfigContext struct { func (m *WritableVirtualMachineWithConfigContext) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -177,15 +174,6 @@ func (m *WritableVirtualMachineWithConfigContext) Validate(formats strfmt.Regist return nil } -func (m *WritableVirtualMachineWithConfigContext) validateCluster(formats strfmt.Registry) error { - - if err := validate.Required("cluster", "body", m.Cluster); err != nil { - return err - } - - return nil -} - func (m *WritableVirtualMachineWithConfigContext) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -387,10 +375,6 @@ func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Co res = append(res, err) } - if err := m.contextValidateSite(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -407,7 +391,7 @@ func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Co func (m *WritableVirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -434,7 +418,7 @@ func (m *WritableVirtualMachineWithConfigContext) contextValidateID(ctx context. func (m *WritableVirtualMachineWithConfigContext) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } @@ -450,15 +434,6 @@ func (m *WritableVirtualMachineWithConfigContext) contextValidatePrimaryIP(ctx c return nil } -func (m *WritableVirtualMachineWithConfigContext) contextValidateSite(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "site", "body", string(m.Site)); err != nil { - return err - } - - return nil -} - func (m *WritableVirtualMachineWithConfigContext) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_vm_interface.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_vm_interface.go index 84fd134b6..6dc2d13e8 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_vm_interface.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_vm_interface.go @@ -50,7 +50,7 @@ type WritableVMInterface struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,10 +70,14 @@ type WritableVMInterface struct { // Read Only: true ID int64 `json:"id,omitempty"` + // L2vpn termination + // Read Only: true + L2vpnTermination string `json:"l2vpn_termination,omitempty"` + // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -366,6 +370,10 @@ func (m *WritableVMInterface) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateL2vpnTermination(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { res = append(res, err) } @@ -404,7 +412,7 @@ func (m *WritableVMInterface) contextValidateCountIpaddresses(ctx context.Contex func (m *WritableVMInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -429,9 +437,18 @@ func (m *WritableVMInterface) contextValidateID(ctx context.Context, formats str return nil } +func (m *WritableVMInterface) contextValidateL2vpnTermination(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "l2vpn_termination", "body", string(m.L2vpnTermination)); err != nil { + return err + } + + return nil +} + func (m *WritableVMInterface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n.go index ff242688f..4b3331e0b 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n.go @@ -44,14 +44,14 @@ type WritableWirelessLAN struct { // Max Length: 64 AuthPsk string `json:"auth_psk,omitempty"` - // Auth type + // Auth Type // Enum: [open wep wpa-personal wpa-enterprise] AuthType string `json:"auth_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -74,7 +74,7 @@ type WritableWirelessLAN struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // SSID // Required: true @@ -85,6 +85,9 @@ type WritableWirelessLAN struct { // tags Tags []*NestedTag `json:"tags"` + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -372,7 +375,7 @@ func (m *WritableWirelessLAN) ContextValidate(ctx context.Context, formats strfm func (m *WritableWirelessLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -399,7 +402,7 @@ func (m *WritableWirelessLAN) contextValidateID(ctx context.Context, formats str func (m *WritableWirelessLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n_group.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n_group.go index 9c23dc8d5..67f5a5902 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n_group.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_l_a_n_group.go @@ -42,7 +42,7 @@ type WritableWirelessLANGroup struct { // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -62,7 +62,7 @@ type WritableWirelessLANGroup struct { // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // Name // Required: true @@ -310,7 +310,7 @@ func (m *WritableWirelessLANGroup) contextValidateDepth(ctx context.Context, for func (m *WritableWirelessLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -337,7 +337,7 @@ func (m *WritableWirelessLANGroup) contextValidateID(ctx context.Context, format func (m *WritableWirelessLANGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_link.go b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_link.go index 638f4bff5..5a8197af2 100644 --- a/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_link.go +++ b/vendor/github.com/smutel/go-netbox/v3/netbox/models/writable_wireless_link.go @@ -44,14 +44,14 @@ type WritableWirelessLink struct { // Max Length: 64 AuthPsk string `json:"auth_psk,omitempty"` - // Auth type + // Auth Type // Enum: [open wep wpa-personal wpa-enterprise] AuthType string `json:"auth_type,omitempty"` // Created // Read Only: true // Format: date-time - Created strfmt.DateTime `json:"created,omitempty"` + Created *strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -68,18 +68,18 @@ type WritableWirelessLink struct { // Read Only: true ID int64 `json:"id,omitempty"` - // Interface a + // Interface A // Required: true Interfacea *int64 `json:"interface_a"` - // Interface b + // Interface B // Required: true Interfaceb *int64 `json:"interface_b"` // Last updated // Read Only: true // Format: date-time - LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + LastUpdated *strfmt.DateTime `json:"last_updated,omitempty"` // SSID // Max Length: 32 @@ -92,6 +92,9 @@ type WritableWirelessLink struct { // tags Tags []*NestedTag `json:"tags"` + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -446,7 +449,7 @@ func (m *WritableWirelessLink) ContextValidate(ctx context.Context, formats strf func (m *WritableWirelessLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", m.Created); err != nil { return err } @@ -473,7 +476,7 @@ func (m *WritableWirelessLink) contextValidateID(ctx context.Context, formats st func (m *WritableWirelessLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + if err := validate.ReadOnly(ctx, "last_updated", "body", m.LastUpdated); err != nil { return err } diff --git a/vendor/go.opentelemetry.io/otel/.gitattributes b/vendor/go.opentelemetry.io/otel/.gitattributes new file mode 100644 index 000000000..314766e91 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf diff --git a/vendor/go.opentelemetry.io/otel/.gitignore b/vendor/go.opentelemetry.io/otel/.gitignore new file mode 100644 index 000000000..0b605b3d6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.gitignore @@ -0,0 +1,21 @@ +.DS_Store +Thumbs.db + +.tools/ +.idea/ +.vscode/ +*.iml +*.so +coverage.* + +gen/ + +/example/fib/fib +/example/fib/traces.txt +/example/jaeger/jaeger +/example/namedtracer/namedtracer +/example/opencensus/opencensus +/example/passthrough/passthrough +/example/prometheus/prometheus +/example/zipkin/zipkin +/example/otel-collector/otel-collector diff --git a/vendor/go.opentelemetry.io/otel/.gitmodules b/vendor/go.opentelemetry.io/otel/.gitmodules new file mode 100644 index 000000000..38a1f5698 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.gitmodules @@ -0,0 +1,3 @@ +[submodule "opentelemetry-proto"] + path = exporters/otlp/internal/opentelemetry-proto + url = https://github.com/open-telemetry/opentelemetry-proto diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml new file mode 100644 index 000000000..0f099f575 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.golangci.yml @@ -0,0 +1,244 @@ +# See https://github.com/golangci/golangci-lint#config-file +run: + issues-exit-code: 1 #Default + tests: true #Default + +linters: + # Disable everything by default so upgrades to not include new "default + # enabled" linters. + disable-all: true + # Specifically enable linters we want to use. + enable: + - depguard + - errcheck + - godot + - gofmt + - goimports + - gosimple + - govet + - ineffassign + - misspell + - revive + - staticcheck + - typecheck + - unused + +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + # Setting to unlimited so the linter only is run once to debug all issues. + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + # Setting to unlimited so the linter only is run once to debug all issues. + max-same-issues: 0 + # Excluding configuration per-path, per-linter, per-text and per-source. + exclude-rules: + # TODO: Having appropriate comments for exported objects helps development, + # even for objects in internal packages. Appropriate comments for all + # exported objects should be added and this exclusion removed. + - path: '.*internal/.*' + text: "exported (method|function|type|const) (.+) should have comment or be unexported" + linters: + - revive + # Yes, they are, but it's okay in a test. + - path: _test\.go + text: "exported func.*returns unexported type.*which can be annoying to use" + linters: + - revive + # Example test functions should be treated like main. + - path: example.*_test\.go + text: "calls to (.+) only in main[(][)] or init[(][)] functions" + linters: + - revive + include: + # revive exported should have comment or be unexported. + - EXC0012 + # revive package comment should be of the form ... + - EXC0013 + +linters-settings: + depguard: + # Check the list against standard lib. + # Default: false + include-go-root: true + # A list of packages for the list type specified. + # Default: [] + packages: + - "crypto/md5" + - "crypto/sha1" + - "crypto/**/pkix" + ignore-file-rules: + - "**/*_test.go" + additional-guards: + # Do not allow testing packages in non-test files. + - list-type: denylist + include-go-root: true + packages: + - testing + - github.com/stretchr/testify + ignore-file-rules: + - "**/*_test.go" + - "**/*test/*.go" + - "**/internal/matchers/*.go" + godot: + exclude: + # Exclude sentence fragments for lists. + - '^[ ]*[-•]' + # Exclude sentences prefixing a list. + - ':$' + goimports: + local-prefixes: go.opentelemetry.io + misspell: + locale: US + ignore-words: + - cancelled + revive: + # Sets the default failure confidence. + # This means that linting errors with less than 0.8 confidence will be ignored. + # Default: 0.8 + confidence: 0.01 + rules: + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports + - name: blank-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr + - name: bool-literal-in-expr + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr + - name: constant-logical-expr + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument + # TODO (#3372) reenable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280 + - name: context-as-argument + disabled: true + arguments: + allowTypesBefore: "*testing.T" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type + - name: context-keys-type + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit + - name: deep-exit + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer + - name: defer + disabled: false + arguments: + - ["call-chain", "loop"] + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports + - name: dot-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports + - name: duplicated-imports + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return + - name: early-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block + - name: empty-block + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines + - name: empty-lines + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming + - name: error-naming + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return + - name: error-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings + - name: error-strings + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf + - name: errorf + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported + - name: exported + disabled: false + arguments: + - "sayRepetitiveInsteadOfStutters" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter + - name: flag-parameter + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches + - name: identical-branches + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return + - name: if-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement + - name: increment-decrement + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow + - name: indent-error-flow + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing + - name: import-shadowing + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments + - name: package-comments + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range + - name: range + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure + - name: range-val-in-closure + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address + - name: range-val-address + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id + - name: redefines-builtin-id + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format + - name: string-format + disabled: false + arguments: + - - panic + - '/^[^\n]*$/' + - must not contain line breaks + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag + - name: struct-tag + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else + - name: superfluous-else + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal + - name: time-equal + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming + - name: var-naming + disabled: false + arguments: + - ["ID"] # AllowList + - ["Otel", "Aws", "Gcp"] # DenyList + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration + - name: var-declaration + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion + - name: unconditional-recursion + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return + - name: unexported-return + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error + - name: unhandled-error + disabled: false + arguments: + - "fmt.Fprint" + - "fmt.Fprintf" + - "fmt.Fprintln" + - "fmt.Print" + - "fmt.Printf" + - "fmt.Println" + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt + - name: unnecessary-stmt + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break + - name: useless-break + disabled: false + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value + - name: waitgroup-by-value + disabled: false diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore new file mode 100644 index 000000000..545d63452 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.lycheeignore @@ -0,0 +1,3 @@ +http://localhost +http://jaeger-collector +https://github.com/open-telemetry/opentelemetry-go/milestone/ diff --git a/vendor/go.opentelemetry.io/otel/.markdownlint.yaml b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml new file mode 100644 index 000000000..3202496c3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml @@ -0,0 +1,29 @@ +# Default state for all rules +default: true + +# ul-style +MD004: false + +# hard-tabs +MD010: false + +# line-length +MD013: false + +# no-duplicate-header +MD024: + siblings_only: true + +#single-title +MD025: false + +# ol-prefix +MD029: + style: ordered + +# no-inline-html +MD033: false + +# fenced-code-language +MD040: false + diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md new file mode 100644 index 000000000..9f130b8be --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -0,0 +1,2147 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.11.2/0.34.0] 2022-12-05 + +### Added + +- The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package. + This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387) +- Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. + This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357) +- OTLP exporters now recognize: (#3363) + - `OTEL_EXPORTER_OTLP_INSECURE` + - `OTEL_EXPORTER_OTLP_TRACES_INSECURE` + - `OTEL_EXPORTER_OTLP_METRICS_INSECURE` + - `OTEL_EXPORTER_OTLP_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` + - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` +- The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`. + These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) +- The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`. + These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) +- The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459) +- The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487) + +### Changed + +- The `"go.opentelemetry.io/otel/sdk/metric".WithReader` option no longer accepts views to associate with the `Reader`. + Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option. + The views registered with the `MeterProvider` apply to all `Reader`s. (#3387) +- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/sdk/metric".Exporter` interface. (#3260) +- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client` interface. (#3260) +- The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260) +- The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260) + +### Fixed + +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369) +- Remove comparable requirement for `Reader`s. (#3387) +- Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389) +- Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398) +- Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) +- `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) +- Reenabled Attribute Filters in the Metric SDK. (#3396) +- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggragation. (#3408) +- Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) +- Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) +- Prevent duplicate Prometheus description, unit, and type. (#3469) +- Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489) + +## Removed + +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486) +- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486) + +### Deprecated + +- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated. + Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476) + +## [1.11.1/0.33.0] 2022-10-19 + +### Added + +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation. + By default, it will register with the default Prometheus registerer. + A non-default registerer can be used by passing the `WithRegisterer` option. (#3239) +- Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285) + +### Changed + +- The `"go.opentelemetry.io/otel/exporters/prometheus".New` function is updated to return an error. + It will return an error if the exporter fails to register with Prometheus. (#3239) + +### Fixed + +- The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963) +- The `baggage.NewMember` function decodes the `value` parameter instead of directly using it. + This fixes the implementation to be compliant with the W3C specification. (#3226) +- Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252) +- The `Shutdown` and `ForceFlush` methods of the `"go.opentelemetry.io/otel/sdk/trace".TraceProvider` no longer return an error when no processor is registered. (#3268) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281) +- The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293) +- Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278) +- `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358) +- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup. + Instead the exporter is defined as an "unchecked" collector for Prometheus. + This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342) +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360) +- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names. + This can be disabled using the `WithoutUnits()` option added to that package. (#3352) + +## [1.11.0/0.32.3] 2022-10-12 + +### Added + +- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261) + +### Changed + +- `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214) +- Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`. + This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235) + +## [0.32.2] Metric SDK (Alpha) - 2022-10-11 + +### Added + +- Added an example of using metric views to customize instruments. (#3177) +- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261) + +### Changed + +- Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220) +- Update histogram default bounds to match the requirements of the latest specification. (#3222) +- Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer. (#3265) + +### Fixed + +- Use default view if instrument does not match any registered view of a reader. (#3224, #3237) +- Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251) +- Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251) +- Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251) +- The OpenCensus bridge no longer sends empty batches of metrics. (#3263) + +## [0.32.1] Metric SDK (Alpha) - 2022-09-22 + +### Changed + +- The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting. + Invalid characters are replaced with `_`. (#3212) + +### Added + +- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192) +- The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206) + +### Fixed + +- Updated go.mods to point to valid versions of the sdk. (#3216) +- Set the `MeterProvider` resource on all exported metric data. (#3218) + +## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18 + +### Changed + +- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification. + Please see the package documentation for how the new SDK is initialized and configured. (#3175) +- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179) + +### Removed + +- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed. + A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed. + A replacement package that supports the new metric SDK will be added back in a future release. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175) +- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175) +- The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175) +- The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175) + +## [1.10.0] - 2022-09-09 + +### Added + +- Support Go 1.19. (#3077) + Include compatibility testing and document support. (#3077) +- Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106) +- Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107) + +### Changed + +- Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`). (#3096) +- Attempting to start a span with a nil `context` will no longer cause a panic. (#3110) +- All exporters will be shutdown even if one reports an error (#3091) +- Ensure valid UTF-8 when truncating over-length attribute values. (#3156) + +## [1.9.0/0.0.3] - 2022-08-01 + +### Added + +- Add support for Schema Files format 1.1.x (metric "split" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999) +- Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package. + The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009) +- Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package. + The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010) +- Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018) + +### Fixed + +- Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029) + +## [1.8.0/0.31.0] - 2022-07-08 + +### Added + +- Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods +of the `"go.opentelemetry.io/otel/bridge/opentracing".BridgeTracer` type. (#2911) + +### Changed + +- The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886) +- In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976) +- Move metric no-op implementation form `nonrecording` to `metric` package. (#2866) + +### Removed + +- Support for go1.16. Support is now only for go1.17 and go1.18 (#2917) + +### Deprecated + +- The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated. + Use the equivalent `Scope` struct instead. (#2977) +- The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated. + Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977) + +## [1.7.0/0.30.0] - 2022-04-28 + +### Added + +- Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package. + The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763) +- Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package. + The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792) +- Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package. + The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842) +- Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776) + +### Fixed + +- Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784) +- Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786) + +### Changed + +- The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790) +- The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`. + The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790) +- The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`. + Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790) + +### Deprecated + +- The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `Iterator.Attribute` method instead. (#2790) +- The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790) +- The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. + Use the equivalent `MergeIterator.Attribute` method instead. (#2790) + +### Removed + +- Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) +- Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) + +## [0.29.0] - 2022-04-11 + +### Added + +- The metrics global package was added back into several test files. (#2764) +- The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package. + This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750) + +### Removed + +- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`. + Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720) + +### Changed + +- Don't panic anymore when setting a global MeterProvider to itself. (#2749) +- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`. + This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748) + +## [1.6.3] - 2022-04-07 + +### Fixed + +- Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773) + +## [1.6.2] - 2022-04-06 + +### Changed + +- Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749) +- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`. + This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748) + +## [1.6.1] - 2022-03-28 + +### Fixed + +- The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant. + Instead of using `"https://opentelemetry.io/schemas/v"` they now use the correct URL without a `v` prefix, `"https://opentelemetry.io/schemas/"`. (#2743, #2744) + +### Security + +- Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`. + This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728) + +## [1.6.0/0.28.0] - 2022-03-23 + +### ⚠️ Notice ⚠️ + +This update is a breaking change of the unstable Metrics API. +Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified. + +### Added + +- Add metrics exponential histogram support. + New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502) +- Add Go 1.18 to our compatibility tests. (#2679) +- Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517) +- Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660) + +### Changed + +- The metrics API has been significantly changed to match the revised OpenTelemetry specification. + High-level changes include: + + - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s. + These `InstrumentProvider`s are managed with a `Meter`. + - Synchronous and asynchronous instruments are grouped into their own packages based on value types. + - Asynchronous callbacks can now be registered with a `Meter`. + + Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660) + +### Fixed + +- Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677) + +## [1.5.0] - 2022-03-16 + +### Added + +- Log the Exporters configuration in the TracerProviders message. (#2578) +- Added support to configure the span limits with environment variables. + The following environment variables are supported. (#2606, #2637) + - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` + - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` + - `OTEL_SPAN_EVENT_COUNT_LIMIT` + - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` + - `OTEL_SPAN_LINK_COUNT_LIMIT` + - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` + + If the provided environment variables are invalid (negative), the default values would be used. +- Rename the `gc` runtime name to `go` (#2560) +- Add resource container ID detection. (#2418) +- Add span attribute value length limit. + The new `AttributeValueLengthLimit` field is added to the `"go.opentelemetry.io/otel/sdk/trace".SpanLimits` type to configure this limit for a `TracerProvider`. + The default limit for this resource is "unlimited". (#2637) +- Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`. + This option replaces the `WithSpanLimits` option. + Zero or negative values will not be changed to the default value like `WithSpanLimits` does. + Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited. + Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637) + +### Changed + +- Drop oldest tracestate `Member` when capacity is reached. (#2592) +- Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601) +- Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639) +- Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640) +- Introduce new internal `envconfig` package for OTLP exporters. (#2608) +- If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661) + +### Fixed + +- Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616) +- Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625) +- Unlimited span limits are now supported (negative values). (#2636, #2637) + +### Deprecated + +- Deprecated `"go.opentelemetry.io/otel/sdk/trace".WithSpanLimits`. + Use `WithRawSpanLimits` instead. + That option allows setting unlimited and zero limits, this option does not. + This option will be kept until the next major version incremented release. (#2637) + +## [1.4.1] - 2022-02-16 + +### Fixed + +- Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615) + +## [1.4.0] - 2022-02-11 + +### Added + +- Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490) +- Log the configuration of `TracerProvider`s, and `Tracer`s for debugging. + To enable use a logger with Verbosity (V level) `>=1`. (#2500) +- Added support to configure the batch span-processor with environment variables. + The following environment variables are used. (#2515) + - `OTEL_BSP_SCHEDULE_DELAY` + - `OTEL_BSP_EXPORT_TIMEOUT` + - `OTEL_BSP_MAX_QUEUE_SIZE`. + - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` + +### Changed + +- Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589) + +### Deprecated + +- Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`. + Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382) +- Deprecate `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets`. (#2445) + +### Fixed + +- Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461) +- Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512) +- Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491) +- Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493) +- W3C baggage will now decode urlescaped values. (#2529) +- Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522) +- The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification. + Instead of dropping the least-recently-used attribute, the last added attribute is dropped. + This drop order still only applies to attributes with unique keys not already contained in the span. + If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576) + +### Removed + +- Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546) + - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge) + - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram) + - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum) + +## [1.3.0] - 2021-12-10 + +### ⚠️ Notice ⚠️ + +We have updated the project minimum supported Go version to 1.16 + +### Added + +- Added an internal Logger. + This can be used by the SDK and API to provide users with feedback of the internal state. + To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343) +- Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425) +- Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296) + +### Changed + +- The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329) +- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425) +- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".RetrySettings` type is renamed to `RetryConfig`. (#2425) +- The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432) +- Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371) + +### Fixed + +- The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification. + Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP__ENDPOINT` environment variable is now used without modification of the path. + When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433) +- Basic metric controller updated to use sync.Map to avoid blocking calls (#2381) +- The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440) + +### Deprecated + +- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425) +- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425) + +### Removed + +- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350) +- Remove the metric Bound Instruments interface and implementations. (#2399) +- Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423) +- Metric SDK removes the "exact" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348) + +## [1.2.0] - 2021-11-12 + +### Changed + +- Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274) +- The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274) +- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface: + - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner` + - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`. + - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271) +- Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335) + +### Added + +- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) +- Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267) +- Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334) + +## [1.1.0] - 2021-10-27 + +### Added + +- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) +- Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package. + The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320) +- Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package. + The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321) +- Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package. + The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322) + - When upgrading from the `semconv/v1.4.0` package note the following name changes: + - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey` + - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey` + - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey` + - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey` + - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey` + - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey` + +### Changed + +- Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275). + +### Fixed + +- The `"go.opentelemetry.io/otel/semconv/v1.4.0".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284) +- The `"go.opentelemetry.io/otel/semconv/v1.4.0".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285) +- The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289) + +## [1.0.1] - 2021-10-01 + +### Fixed + +- json stdout exporter no longer crashes due to concurrency bug. (#2265) + +## [Metrics 0.24.0] - 2021-10-01 + +### Changed + +- NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237) +- The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197) + - The former `"go.opentelemetry.io/otel/sdk/export/metric".CheckpointSet` is renamed `Reader`. + - The new interface is named `"go.opentelemetry.io/otel/sdk/export/metric".InstrumentationLibraryReader`. + +## [1.0.0] - 2021-09-20 + +This is the first stable release for the project. +This release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md). + +### Added + +- OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242) + +### Fixed + +- Slice-valued attributes can correctly be used as map keys. (#2223) + +### Removed + +- Removed the `"go.opentelemetry.io/otel/exporters/zipkin".WithSDKOptions` function. (#2248) +- Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234) +- Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233) +- Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package. + Use the typed functions and methods added to the package instead. (#2235) + - The `Key.Array` method is removed. + - The `Array` function is removed. + - The `Any` function is removed. + - The `ArrayValue` function is removed. + - The `AsArray` function is removed. + +## [1.0.0-RC3] - 2021-09-02 + +### Added + +- Added `ErrorHandlerFunc` to use a function as an `"go.opentelemetry.io/otel".ErrorHandler`. (#2149) +- Added `"go.opentelemetry.io/otel/trace".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163) +- Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162) + - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package. +- Added the `go.opentelemetry.io/otel/example/fib` example package. + Included is an example application that computes Fibonacci numbers. (#2203) + +### Changed + +- Metric instruments have been renamed to match the (feature-frozen) metric API specification: + - ValueRecorder becomes Histogram + - ValueObserver becomes Gauge + - SumObserver becomes CounterObserver + - UpDownSumObserver becomes UpDownCounterObserver + The API exported from this project is still considered experimental. (#2202) +- Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091) +- The Metrics SDK export record no longer contains a Resource pointer, the SDK `"go.opentelemetry.io/otel/sdk/trace/export/metric".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `"go.opentelemetry.io/otel/sdk/metric/controller/basic".Controller.Resource()`. (#2120) +- The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is "plain" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196) +- Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212) + +### Deprecated + +- The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated. + All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package. + The functions from that package should be used instead. (#2166) +- The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated. + Use the typed `*Slice` functions and types added to the package instead. (#2162) +- The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated. + Use the typed functions instead. (#2181) +- The `go.opentelemetry.io/otel/oteltest` package is deprecated. + The `"go.opentelemetry.io/otel/sdk/trace/tracetest".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188) + +### Removed + +- Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105) + +### Fixed + +- The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138) +- Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140) +- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169) +- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120) +- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly ommit timestamps. (#2195) +- Fixed typos in resources.go. (#2201) + +## [1.0.0-RC2] - 2021-07-26 + +### Added + +- Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840) +- Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840) +- Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. + This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095) +- Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115) +- Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`. + This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK. + For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118) +- Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package. + This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132) + +### Changed + +- The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027) +- Rename the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".RetrySettings` to `RetryConfig`. (#2095) + +### Deprecated + +- The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114) +- The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123) +- The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated. + Use the `trace.ParseTraceState` function instead. (#2122) + +### Removed + +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020) +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020) +- Removed the `"go.opentelemetry.io/otel/sdk/resource".WithBuiltinDetectors` function. + The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097) +- Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. + The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095) +- Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118) + +### Fixed + +- When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032) +- `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073) +- OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092) +- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package. + This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102) +- The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108) +- Use `6831` as default Jaeger agent port instead of `6832`. (#2131) + +## [Experimental Metrics v0.22.0] - 2021-07-19 + +### Added + +- Adds HTTP support for OTLP metrics exporter. (#2022) + +### Removed + +- Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020) + +## [1.0.0-RC1] / 0.21.0 - 2021-06-18 + +With this release we are introducing a split in module versions. The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1` +while the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`. Modules at major version 1 or greater will not depend on modules +with major version 0. + +### Added + +- Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832) + - The following status codes are defined as transient errors: + | gRPC Status Code | Description | + | ---------------- | ----------- | + | 1 | Cancelled | + | 4 | Deadline Exceeded | + | 8 | Resource Exhausted | + | 10 | Aborted | + | 10 | Out of Range | + | 14 | Unavailable | + | 15 | Data Loss | +- Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874) +- Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package. + This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873) +- Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886) +- Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889) +- Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912) +- `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package. + It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937) +- Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package. + This method returns the number of list-members the `TraceState` holds. (#1937) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data. + Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922) +- Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967) +- Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package. + These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967) +- The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963) +- Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938) +- Several builtin resource detectors now correctly populate the schema URL. (#1938) +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data. +- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991) +- Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005) +- Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005) +- Added a `TracerProvider()` method to the `"go.opentelemetry.io/otel/trace".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline. (#2009) + +### Changed + +- Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item. + `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798) +- `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810) +- Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846) +- CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865) +- BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860) +- `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855) +- Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871) +- The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method. + This method returns the status of a span using the new `Status` type. (#1874) +- Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`. + This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873) +- Unembed `SpanContext` in `Link`. (#1877) +- Generate Semantic conventions from the specification YAML. (#1891) +- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901) +- The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902) +- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903) +- Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921) +- Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921) +- Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) +- Refactored option types according to the contribution style guide. (#1882) +- Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package. + This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use. + The new `ParseTraceState` function should be used to create a `TraceState`. (#1931) +- Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931) +- The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931) +- Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) +- Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931) +- Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985) +- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) +- Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) +- The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987) +- Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988) + +### Deprecated + +- The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993) +- The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993) +- The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993) + +### Removed + +- Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810) +- Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810) +- Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`. + The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate. + The `IsRecording` method returns if the span is recording or not. + A read-only span value does not need to know if updates to it will be recorded or not. + By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873) +- Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package. + The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type. + When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873) +- Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package. + Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own. + The `"go.opentelemetry.io/otel".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900) + - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009) +- The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919) +- Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931) +- Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package. + Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967) +- The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed. + These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985) +- The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990) +- The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005) + +### Fixed + +- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851) +- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856) +- BatchSpanProcessor now drops span batches that failed to be exported. (#1860) +- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898) +- Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931) +- Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973) +- Avoid transport security when OTLP endpoint is a Unix socket. (#2001) + +### Security + +## [0.20.0] - 2021-04-23 + +### Added + +- The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373) +- Adds semantic conventions for exceptions. (#1492) +- Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT` + These environment variables can be used to override Jaeger agent hostname and port (#1752) +- Option `ExportTimeout` was added to batch span processor. (#1755) +- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770) +- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771) +- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771) +- Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772) +- Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785) +- Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788) +- Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788) + - `process.pid` + - `process.executable.name` + - `process.executable.path` + - `process.command_args` + - `process.owner` + - `process.runtime.name` + - `process.runtime.version` + - `process.runtime.description` +- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789) +- Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811) + - `OTEL_EXPORTER_OTLP_ENDPOINT` + - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` + - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` + - `OTEL_EXPORTER_OTLP_HEADERS` + - `OTEL_EXPORTER_OTLP_TRACES_HEADERS` + - `OTEL_EXPORTER_OTLP_METRICS_HEADERS` + - `OTEL_EXPORTER_OTLP_COMPRESSION` + - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` + - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` + - `OTEL_EXPORTER_OTLP_TIMEOUT` + - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` + - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` + - `OTEL_EXPORTER_OTLP_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` + - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` +- Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821) +- Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853) + +### Fixed + +- The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750) +- The Jaeger exporter now correctly sets tags for the Span status code and message. + This means it uses the correct tag keys (`"otel.status_code"`, `"otel.status_description"`) and does not set the status message as a tag unless it is set on the span. (#1761) +- The Jaeger exporter now correctly records Span event's names using the `"event"` key for a tag. + Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768) +- Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688) +- Fixed typo for default service name in Jaeger Exporter. (#1797) +- Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814) +- Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit. + Instead, the exporter now splits the batch into smaller sendable batches. (#1828) + +### Changed + +- Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492) +- Jaeger exporter was updated to use thrift v0.14.1. (#1712) +- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713) +- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713) +- The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span. + The Span's SpanContext can now self-identify as being remote or not. + This means that `"go.opentelemetry.io/otel/trace".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731) +- Improve OTLP/gRPC exporter connection errors. (#1737) +- Information about a parent span context in a `"go.opentelemetry.io/otel/export/trace".SpanSnapshot` is unified in a new `Parent` field. + The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748) +- The `ParentContext` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is updated to hold a `context.Context` containing the parent span. + This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749) +- Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD` + to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752) +- Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757) +- The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself. + It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771) +- Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773) +- Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777) +- The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778) +- The prometheus.InstallNewPipeline example is moved from comment to example test (#1796) +- The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800) +- Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create. + This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822) +- Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824) +- Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument. + The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824) +- The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830) +- The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830) + +### Removed + +- Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS` + These environment variables will no longer be used to override values of the Jaeger exporter (#1752) +- No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root. + This is unspecified behavior that the OpenTelemetry community plans to standardize in the future. + To prevent backwards incompatible changes when it is specified, these links are removed. (#1726) +- Setting error status while recording error with Span from oteltest package. (#1729) +- The concept of a remote and local Span stored in a context is unified to just the current Span. + Because of this `"go.opentelemetry.io/otel/trace".RemoteSpanContextFromContext` is removed as it is no longer needed. + Instead, `"go.opentelemetry.io/otel/trace".SpanContextFromContex` can be used to return the current Span. + If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731) +- The `HasRemoteParent` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is removed. + This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749) +- The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770) +- Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package. + The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804) +- Remove the `WithDisabled` option from the Jaeger exporter. + To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806) +- Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter. + These functions for retrieving specific environment variable values are redundant of other internal functions and + are not intended for end user use. (#1824) +- Removed the Jaeger exporter `WithSDKOptions` `Option`. + This option was used to set SDK options for the exporter creation convenience functions. + These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases. + If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825) +- The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed. + The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830) +- The Jaeger exporter `Option` type is removed. + The type is no longer used by the exporter to configure anything. + All the previous configurations these options provided were duplicates of SDK configuration. + They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830) + +## [0.19.0] - 2021-03-18 + +### Added + +- Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586) +- A `ForceFlush` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` to flush all registered `SpanProcessor`s. (#1608) +- Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702) +- `"go.opentelemetry.io/otel/trace".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701) +- A `Valid` method to the `"go.opentelemetry.io/otel/attribute".KeyValue` type. (#1703) + +### Changed + +- `trace.SpanContext` is now immutable and has no exported fields. (#1573) + - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known. +- Update the `ForceFlush` method signature to the `"go.opentelemetry.io/otel/sdk/trace".SpanProcessor` to accept a `context.Context` and return an error. (#1608) +- Update the `Shutdown` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` return an error on shutdown failure. (#1608) +- The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612) +- `"go.opentelemetry.io/sdk/metric/controller.basic".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656) +- Added non-empty string check for trace `Attribute` keys. (#1659) +- Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662) +- Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673) +- Jaeger exporter populates Jaeger's Span Process from Resource. (#1673) +- Renamed the `LabelSet` method of `"go.opentelemetry.io/otel/sdk/resource".Resource` to `Set`. (#1692) +- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693) +- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693) + +### Removed + +- Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549) +- Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633) +- Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs. + These are now returned as a SpanProcessor interface from their respective constructors. (#1638) +- Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660) +- Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663) +- Removed `jaeger.WithProcess` configuration option. (#1673) +- Removed `ApplyConfig` method from `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` and the now unneeded `Config` struct. (#1693) + +### Fixed + +- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626) +- `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655) +- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678) +- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681) +- Synchronization issues in global trace delegate implementation. (#1686) +- Reduced excess memory usage by global `TracerProvider`. (#1687) + +## [0.18.0] - 2021-03-03 + +### Added + +- Added `resource.Default()` for use with meter and tracer providers. (#1507) +- `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535) +- Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544) +- Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558) +- Compatibility testing suite in the CI system for the following systems. (#1567) + | OS | Go Version | Architecture | + | ------- | ---------- | ------------ | + | Ubuntu | 1.15 | amd64 | + | Ubuntu | 1.14 | amd64 | + | Ubuntu | 1.15 | 386 | + | Ubuntu | 1.14 | 386 | + | MacOS | 1.15 | amd64 | + | MacOS | 1.14 | amd64 | + | Windows | 1.15 | amd64 | + | Windows | 1.14 | amd64 | + | Windows | 1.15 | 386 | + | Windows | 1.14 | 386 | + +### Changed + +- Replaced interface `oteltest.SpanRecorder` with its existing implementation + `StandardSpanRecorder`. (#1542) +- Default span limit values to 128. (#1535) +- Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535) +- Renamed the `otel/label` package to `otel/attribute`. (#1541) +- Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551) +- Parallelize the CI linting and testing. (#1567) +- Stagger timestamps in exact aggregator tests. (#1569) +- Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621) +- Prevent end-users from implementing some interfaces (#1575) + + ``` + "otel/exporters/otlp/otlphttp".Option + "otel/exporters/stdout".Option + "otel/oteltest".Option + "otel/trace".TracerOption + "otel/trace".SpanOption + "otel/trace".EventOption + "otel/trace".LifeCycleOption + "otel/trace".InstrumentationOption + "otel/sdk/resource".Option + "otel/sdk/trace".ParentBasedSamplerOption + "otel/sdk/trace".ReadOnlySpan + "otel/sdk/trace".ReadWriteSpan + ``` + +### Removed + +- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545) +- The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567) +- Removed the `test-386` make target. + This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567) + +### Fixed + +- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572) +- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577) +- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579) +- Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581) +- The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570) + +## [0.17.0] - 2021-02-12 + +### Changed + +- Rename project default branch from `master` to `main`. (#1505) +- Reverse order in which `Resource` attributes are merged, per change in spec. (#1501) +- Add tooling to maintain "replace" directives in go.mod files automatically. (#1528) +- Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528) +- Move metric-related public global APIs from otel to otel/metric/global. (#1528) + +## Fixed + +- Fixed otlpgrpc reconnection issue. +- The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513) +- The otel-collector example now uses the default OTLP receiver port of the collector. + +## [0.16.0] - 2021-01-13 + +### Added + +- Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360) +- `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369) +- Added documentation about the project's versioning policy. (#1388) +- Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418) +- Added codeql worfklow to GitHub Actions (#1428) +- Added Gosec workflow to GitHub Actions (#1429) +- Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420) +- Add an OpenCensus exporter bridge. (#1444) + +### Changed + +- Rename `internal/testing` to `internal/internaltest`. (#1449) +- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360) +- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360) +- Improve span duration accuracy. (#1360) +- Migrated CI/CD from CircleCI to GitHub Actions (#1382) +- Remove duplicate checkout from GitHub Actions workflow (#1407) +- Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412) +- Metric `exact` aggregator includes per-point timestamps (#1412) +- Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412) +- `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) +- Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) +- Unify endpoint API that related to OTel exporter. (#1401) +- Optimize metric histogram aggregator to re-use its slice of buckets. (#1435) +- Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430) +- Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434) +- `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432) +- Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420) +- The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447) +- Metric Push and Pull Controller components are combined into a single "basic" Controller: + - `WithExporter()` and `Start()` to configure Push behavior + - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior + - `Start()` and `Stop()` accept Context. (#1378) +- The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452) + +### Removed + +- Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360) +- Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412) +- Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412) + +### Fixed + +- `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443) + +## [0.15.0] - 2020-12-10 + +### Added + +- The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363) + +### Changed + +- The Zipkin exporter now uses the Span status code to determine. (#1328) +- `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357) +- Move the OpenCensus example into `example` directory. (#1359) +- Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363) +- Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374) +- Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375) + +### Fixed + +- Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381) + +## [0.14.0] - 2020-11-19 + +### Added + +- An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254) +- A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259) +- `SpanContextFromContext` returns `SpanContext` from context. (#1255) +- `TraceState` has been added to `SpanContext`. (#1340) +- `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323) +- Add an OpenCensus to OpenTelemetry tracing bridge. (#1305) +- Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333) +- Add missing tests for `sdk/trace/attributes_map.go`. (#1337) + +### Changed + +- Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307) + - `ID` has been renamed to `TraceID`. + - `IDFromHex` has been renamed to `TraceIDFromHex`. + - `EmptySpanContext` is removed. +- Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229) +- OTLP Exporter updates: + - supports OTLP v0.6.0 (#1230, #1354) + - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296) +- The Sampler is now called on local child spans. (#1233) +- The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240) +- The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`. + This matches the returned type and fixes misuse of the term metric. (#1240) +- Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241) +- Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252) +- Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321) +- Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316) +- Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316) +- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254) +- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254) +- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330) +- Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330) +- Rename correlation context header from `"otcorrelations"` to `"baggage"` to match the OpenTelemetry specification. (#1267) +- Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276) +- The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and + `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235) +- The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210) +- Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310) +- Updated span collection limits for attribute, event and link counts to 1000 (#1318) +- Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338) + +### Removed + +- The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243) +- The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy. + It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254) +- The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`. + `Tracer` and `Span` from the same module should be used in their place instead. (#1306) +- `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350) +- Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314) + +### Fixed + +- Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244) +- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258) +- Fix condition in `label.Any`. (#1299) +- Fix global `TracerProvider` to pass options to its configured provider. (#1329) +- Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309) + +## [0.13.0] - 2020-10-08 + +### Added + +- OTLP Metric exporter supports Histogram aggregation. (#1209) +- The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214) +- A Baggage API to implement the OpenTelemetry specification. (#1217) +- Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227) + +### Changed + +- Set default propagator to no-op propagator. (#1184) +- The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325) +- The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212) +- The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification. + They now are `Unset`, `Error`, and `Ok`. + They no longer track the gRPC codes. (#1214) +- The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214) +- Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325) +- A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264) + +### Fixed + +- Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226) + +### Removed + +- The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212) +- The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification. + The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212) +- The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216) +- The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217) +- Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219) +- Nested array/slice support has been removed. (#1226) + +## [0.12.0] - 2020-09-24 + +### Added + +- A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108) +- In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s. + This addition was made to conform with our project option conventions. (#1155) +- Instrumentation library information was added to the Zipkin exporter. (#1119) +- The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166) +- More semantic conventions for k8s as resource attributes. (#1167) + +### Changed + +- Add reconnecting udp connection type to Jaeger exporter. + This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record. + It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063) +- Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`. + This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108) +- Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`. + This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108) +- The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109) +- Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package. + This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118) +- Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119) +- Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115) +- Move `tools` package under `internal`. (#1141) +- Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142) + The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`. Other exported functions and types are unchanged. +- Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153) +- In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155) +- Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161) +- The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to + recommend the use of `newConfig()` instead of `configure()`. (#1163) +- The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163) +- Ensure exported interface types include parameter names and update the + Style Guide to reflect this styling rule. (#1172) +- Don't consider unset environment variable for resource detection to be an error. (#1170) +- Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and + `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`. +- ValueObserver instruments use LastValue aggregator by default. (#1165) +- OTLP Metric exporter supports LastValue aggregation. (#1165) +- Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185) +- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) +- Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) +- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190) +- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190) +- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) +- Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) +- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) +- Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) +- Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) +- Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190) +- Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190) +- Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) +- Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192) +- Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201) +- The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195) +- Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203) + +### Removed + +- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the + `go.opentelemetry.io/contrib/propagators/` module. (#1191) +- Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194) + +### Fixed + +- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171) +- Fix missing shutdown processor in otel-collector example. (#1186) +- Fix missing shutdown processor in basic and namedtracer examples. (#1197) + +## [0.11.0] - 2020-08-24 + +### Added + +- Support for exporting array-valued attributes via OTLP. (#992) +- `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994) +- Support for filtering metric label sets. (#1047) +- A dimensionality-reducing metric Processor. (#1057) +- Integration tests for more OTel Collector Attribute types. (#1062) +- A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078) + +### Changed + +- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049) +- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049) +- Rename `api/testharness` to `api/apitest`. (#1049) +- Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049) +- Change Metric Processor to merge multiple observations. (#1024) +- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. + This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) +- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) +- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) +- Replace `WithSyncer` with `WithBatcher` in examples. (#1044) +- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046) +- Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060) +- Unify Callback Function Naming. + Rename `*Callback` with `*Func`. (#1061) +- CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064) +- The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface. + This interface still supports the export of `SpanData`, but only as a slice. + Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078) +- The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error. + If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078) +- The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`. + This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078) + +### Removed + +- Duplicate, unused API sampler interface. (#999) + Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead. +- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. + This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) +- The `WithSpan` method of the `Tracer` interface. + The functionality this method provided was limited compared to what a user can provide themselves. + It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043) +- The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions. + These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077) +- The `oterror` package. (#1026) +- The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032) + +### Fixed + +- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) +- Correct instrumentation version tag in Jaeger exporter. (#1037) +- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043) +- Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050) +- The `otel-collector` example referenced outdated collector processors. (#1006) + +## [0.10.0] - 2020-07-29 + +This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. + +### Added + +- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. + These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) +- Add propagator option for gRPC instrumentation. (#986) +- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987) + +### Changed + +- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. + This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) +- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. + This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963) +- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962) +- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) + - `value.Bool` was replaced with `kv.BoolValue`. + - `value.Int64` was replaced with `kv.Int64Value`. + - `value.Uint64` was replaced with `kv.Uint64Value`. + - `value.Float64` was replaced with `kv.Float64Value`. + - `value.Int32` was replaced with `kv.Int32Value`. + - `value.Uint32` was replaced with `kv.Uint32Value`. + - `value.Float32` was replaced with `kv.Float32Value`. + - `value.String` was replaced with `kv.StringValue`. + - `value.Int` was replaced with `kv.IntValue`. + - `value.Uint` was replaced with `kv.UintValue`. + - `value.Array` was replaced with `kv.ArrayValue`. +- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) +- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979) +- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) +- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) +- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) + +### Removed + +- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970) + +### Fixed + +- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953) +- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957) +- Use `global.Handle` for span export errors in the OTLP exporter. (#946) +- Correct Go language formatting in the README documentation. (#961) +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983) +- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) + +## [0.9.0] - 2020-07-20 + +### Added + +- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939) +- A Detector to automatically detect resources from an environment variable. (#939) +- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) +- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. + References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) + +### Changed + +- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) + +### Removed + +- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) + +## [0.8.0] - 2020-07-09 + +### Added + +- The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject. + A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882) +- The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882) +- The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882) +- Add `peer.service` semantic attribute. (#898) +- Add database-specific semantic attributes. (#899) +- Add semantic convention for `faas.coldstart` and `container.id`. (#909) +- Add http content size semantic conventions. (#905) +- Include `http.request_content_length` in HTTP request basic attributes. (#905) +- Add semantic conventions for operating system process resource attribute keys. (#919) +- The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931) + +### Changed + +- Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879) +- Use lowercase header names for B3 Multiple Headers. (#881) +- The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`. + This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings. + If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882) +- The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header. + Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid. + This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882) +- Extend semantic conventions for RPC. (#900) +- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920) + - `"api/standard".FaaSName` -> `FaaSNameKey` + - `"api/standard".FaaSID` -> `FaaSIDKey` + - `"api/standard".FaaSVersion` -> `FaaSVersionKey` + - `"api/standard".FaaSInstance` -> `FaaSInstanceKey` + +### Removed + +- The `FlagsUnused` trace flag is removed. + The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882) +- The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed. + If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882) + +### Fixed + +- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881) +- The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882) +- The B3 propagator now propagates the debug flag. + This removes the behavior of changing the debug flag into a set sampling bit. + Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882) +- The B3 propagator now tracks "unset" sampling state (meaning "defer the decision") and does not set the `X-B3-Sampling` header when injecting. (#882) +- Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883) +- Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885) +- The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896) +- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908) +- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912) +- Prometheus exporter will not apply stale updates or forget inactive metrics. (#903) +- Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905) +- Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913) +- Update otel-colector example to use the v0.5.0 collector. (#915) +- The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922) +- The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922) +- The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists. + This is in accordance with OpenTelemetry semantic conventions. (#922) +- Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923) +- Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925) +- Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926) +- Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930) + +## [0.7.0] - 2020-06-26 + +This release implements the v0.5.0 version of the OpenTelemetry specification. + +### Added + +- The othttp instrumentation now includes default metrics. (#861) +- This CHANGELOG file to track all changes in the project going forward. +- Support for array type attributes. (#798) +- Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844) +- Timestamps are now passed to exporters for each export. (#835) +- Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s. + This replaces the prior `Record` `struct` use for this purpose. (#835) +- New dependabot integration to automate package upgrades. (#814) +- `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument. + This instrumentation version is passed on to exporters. (#811) (#805) (#802) +- The OTLP exporter includes the instrumentation version in telemetry it exports. (#811) +- Environment variables for Jaeger exporter are supported. (#796) +- New `aggregation.Kind` in the export metric API. (#808) +- New example that uses OTLP and the collector. (#790) +- Handle errors in the span `SetName` during span initialization. (#791) +- Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777) +- New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778) +- New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`. + There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778) +- Options to specify propagators for httptrace and grpctrace instrumentation. (#784) +- The required `application/json` header for the Zipkin exporter is included in all exports. (#774) +- Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769 + +### Changed + +- Rename `Integrator` to `Processor` in the metric SDK. (#863) +- Rename `AggregationSelector` to `AggregatorSelector`. (#859) +- Rename `SynchronizedCopy` to `SynchronizedMove`. (#858) +- Rename `simple` integrator to `basic` integrator. (#857) +- Merge otlp collector examples. (#841) +- Change the metric SDK to support cumulative, delta, and pass-through exporters directly. + With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840) +- The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812) +- The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other. + All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`. + Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812) +- Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812) +- Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810) +- Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808 +- Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806) +- Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791) +- Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779) +- Makes the argument order to Histogram and DDSketch `New()` consistent. (#781) + +### Removed + +- `Uint64NumberKind` and related functions from the API. (#864) +- Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803) +- `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775) + +### Fixed + +- Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866) +- Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824) +- Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867) +- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853) +- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854) +- Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817) +- Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828) +- Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829) +- Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823) +- Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830) +- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822) +- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820) +- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837) +- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839) +- Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843) +- Set span status from HTTP status code in the othttp instrumentation. (#832) +- Fixed typo in push controller comment. (#834) +- The `Aggregator` testing has been updated and cleaned. (#812) +- `metric.Number(0)` expressions are replaced by `0` where possible. (#812) +- Fixed `global` `handler_test.go` test failure. #804 +- Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766) +- Fixed OTLP example's accidental early close of exporter. (#807) +- Ensure zipkin exporter reads and closes response body. (#788) +- Update instrumentation to use `api/standard` keys instead of custom keys. (#782) +- Clean up tools and RELEASING documentation. (#762) + +## [0.6.0] - 2020-05-21 + +### Added + +- Support for `Resource`s in the prometheus exporter. (#757) +- New pull controller. (#751) +- New `UpDownSumObserver` instrument. (#750) +- OpenTelemetry collector demo. (#711) +- New `SumObserver` instrument. (#747) +- New `UpDownCounter` instrument. (#745) +- New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742) +- New `api/standards` package to implement semantic conventions and standard key-value generation. (#731) + +### Changed + +- Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761) +- Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758) +- Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756) +- Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754) +- The prometheus exporter now uses the new pull controller. (#751) +- Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752) +- Support use of synchronous instruments in asynchronous callbacks (#725) +- Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739) +- Rename `Observer` instrument to `ValueObserver`. (#734) +- The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738) +- Replace `Measure` instrument by `ValueRecorder` instrument. (#732) +- Rename correlation context header from `"Correlation-Context"` to `"otcorrelations"` to match the OpenTelemetry specification. (#727) + +### Fixed + +- Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755) +- Disable parts of `BatchSpanProcessor` test until a fix is found. (#743) +- Fix `string` case in `kv` `Infer` function. (#746) +- Fix panic in grpctrace client interceptors. (#740) +- Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737) +- Rewrite span batch process queue batching logic. (#719) +- Remove the push controller named Meter map. (#738) +- Fix Histogram aggregator initial state (fix #735). (#736) +- Ensure golang alpine image is running `golang-1.14` for examples. (#733) +- Added test for grpctrace `UnaryInterceptorClient`. (#695) +- Rearrange `api/metric` code layout. (#724) + +## [0.5.0] - 2020-05-13 + +### Added + +- Batch `Observer` callback support. (#717) +- Alias `api` types to root package of project. (#696) +- Create basic `othttp.Transport` for simple client instrumentation. (#678) +- `SetAttribute(string, interface{})` to the trace API. (#674) +- Jaeger exporter option that allows user to specify custom http client. (#671) +- `Stringer` and `Infer` methods to `key`s. (#662) + +### Changed + +- Rename `NewKey` in the `kv` package to just `Key`. (#721) +- Move `core` and `key` to `kv` package. (#720) +- Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709) +- Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710) +- Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710) +- Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710) +- Move `Number` from `core` to `api/metric` package. (#706) +- Move `SpanContext` from `core` to `trace` package. (#692) +- Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681) + +### Fixed + +- Update tooling to run generators in all submodules. (#705) +- gRPC interceptor regexp to match methods without a service name. (#683) +- Use a `const` for padding 64-bit B3 trace IDs. (#701) +- Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700) +- Left-pad 64-bit B3 trace IDs with zero. (#698) +- Propagate at least the first W3C tracestate header. (#694) +- Remove internal `StateLocker` implementation. (#688) +- Increase instance size CI system uses. (#690) +- Add a `key` benchmark and use reflection in `key.Infer()`. (#679) +- Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680) +- Reimplement histogram using mutex instead of `StateLocker`. (#669) +- Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667) +- Update documentation to not include any references to `WithKeys`. (#672) +- Correct misspelling. (#668) +- Fix clobbering of the span context if extraction fails. (#656) +- Bump `golangci-lint` and work around the corrupting bug. (#666) (#670) + +## [0.4.3] - 2020-04-24 + +### Added + +- `Dockerfile` and `docker-compose.yml` to run example code. (#635) +- New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621) +- New `api/label` package, providing common label set implementation. (#651) +- Support for JSON marshaling of `Resources`. (#654) +- `TraceID` and `SpanID` implementations for `Stringer` interface. (#642) +- `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627) +- `WithSpanFormatter` option to the othttp plugin. (#617) +- Updated README to include section for compatible libraries and include reference to the contrib repository. (#612) +- The prometheus exporter now supports exporting histograms. (#601) +- A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613) +- An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613) +- An `Equal` method to the `Resource` test the equivalence of resources. (#613) +- An iterable structure (`AttributeIterator`) for `Resource` attributes. + +### Changed + +- zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644) +- Pass `Resources` through the metrics export pipeline. (#659) + +### Removed + +- `WithKeys` option from the metric API. (#639) + +### Fixed + +- Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658) +- Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653) +- Use type names for return values in jaeger exporter. (#648) +- Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650) +- `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647) +- Do not cache `reflect.ValueOf()` in metric Labels. (#649) +- Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626) +- Add error wrapping to the prometheus exporter. (#631) +- Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623) +- Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614) +- Update `Resource` internal representation to uniquely and reliably identify resources. (#613) +- Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622) +- Ensure spans created by httptrace client tracer reflect operation structure. (#618) +- Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610 +- The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611) + +## [0.4.2] - 2020-03-31 + +### Fixed + +- Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607) +- Fix time conversion from internal to OTLP in OTLP exporter. (#606) + +## [0.4.1] - 2020-03-31 + +### Fixed + +- Update `tag.sh` to create signed tags. (#604) + +## [0.4.0] - 2020-03-30 + +### Added + +- New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580) +- Script to verify examples after a new release. (#579) + +### Removed + +- The dogstatsd exporter due to lack of support. + This additionally removes support for statsd. (#591) +- `LabelSet` from the metric API. + This is replaced by a `[]core.KeyValue` slice. (#595) +- `Labels` from the metric API's `Meter` interface. (#595) + +### Changed + +- The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574) +- Renamed `internal/metric.Meter` to `MeterImpl`. (#580) +- Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580) + +### Fixed + +- Corrected missing return in mock span. (#582) +- Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596) +- Update to v0.3.0 of the OTLP in the OTLP exporter. (#588) +- Update pre-release script to be compatible between GNU and BSD based systems. (#592) +- Add a `RecordBatch` benchmark. (#594) +- Moved span transforms of the OTLP exporter to the internal package. (#593) +- Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569) +- Removed unneeded allocation on empty labels in OLTP exporter. (#597) +- Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599) +- Update project documentation godoc.org links to pkg.go.dev. (#602) + +## [0.3.0] - 2020-03-21 + +This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality. +There is still a possibility of breaking changes. + +### Added + +- Add `Observer` metric instrument. (#474) +- Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494) +- Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459) +- The zipkin trace exporter. (#495) +- The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545) +- Add `StatusMessage` field to the trace `Span`. (#524) +- Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525) +- The `Resource` type was added to the SDK. (#528) +- The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538) +- The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction. + Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560) +- A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560) +- Scripts to better automate the release process. (#576) + +### Changed + +- Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506) +- Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511) +- Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511) +- The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524) +- Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531) +- Rename metric API `Options` to `Config`. (#541) +- Rename metric `Counter` aggregator to be `Sum`. (#541) +- Unify metric options into `Option` from instrument specific options. (#541) +- The trace API's `TraceProvider` now support `Resource`s. (#545) +- Correct error in zipkin module name. (#548) +- The jaeger trace exporter now supports `Resource`s. (#551) +- Metric SDK now supports `Resource`s. + The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552) +- Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557) +- The stdout trace exporter now supports `Resource`s. (#558) +- The metric `Descriptor` is now included at the API instead of the SDK. (#560) +- Replace `Ordered` with an iterator in `export.Labels`. (#567) + +### Removed + +- The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452) +- The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560) +- `GetDescriptor` from the metric SDK. (#575) +- The `Gauge` instrument from the metric API. (#537) + +### Fixed + +- Make histogram aggregator checkpoint consistent. (#438) +- Update README with import instructions and how to build and test. (#505) +- The default label encoding was updated to be unique. (#508) +- Use `NewRoot` in the othttp plugin for public endpoints. (#513) +- Fix data race in `BatchedSpanProcessor`. (#518) +- Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521 +- Use a variable-size array to represent ordered labels in maps. (#523) +- Update the OTLP protobuf and update changed import path. (#532) +- Use `StateLocker` implementation in `MinMaxSumCount`. (#546) +- Eliminate goroutine leak in histogram stress test. (#547) +- Update OTLP exporter with latest protobuf. (#550) +- Add filters to the othttp plugin. (#556) +- Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565) +- Encode labels once during checkpoint. + The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter. + This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572) +- Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573) + +## [0.2.3] - 2020-03-04 + +### Added + +- `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473) +- Configurable push frequency for exporters setup pipeline. (#504) + +### Changed + +- Rename the `exporter` directory to `exporters`. + The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. + This resulted in all subsequent releases not becoming the default latest. + A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages. + Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags. + Consequentially, this action also renames *all* exporter packages. (#502) + +### Removed + +- The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503) + +## [0.2.2] - 2020-02-27 + +### Added + +- `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467) +- `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467) +- `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467) +- `Config` and configuring `Option` to the propagator API. (#467) +- `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467) +- `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467) +- `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467) +- `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467) +- Histogram aggregator. (#433) +- `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456) +- `AlwaysParentSample` sampler to the trace API. (#455) +- `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451) + +### Changed + +- Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481) +- Renamed `FromContext` to `MapFromContext` in the correlation package. (#481) +- Move correlation context propagation to correlation package. (#479) +- Do not default to putting remote span context into links. (#480) +- `Tracer.WithSpan` updated to accept `StartOptions`. (#472) +- Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432) +- Renamed the `export` package to `metric` to match directory structure. (#432) +- Rename the `api/distributedcontext` package to `api/correlation`. (#444) +- Rename the `api/propagators` package to `api/propagation`. (#444) +- Move the propagators from the `propagators` package into the `trace` API package. (#444) +- Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462) +- Moved all dependencies of tools package to a tools directory. (#466) + +### Removed + +- Binary propagators. (#467) +- NOOP propagator. (#467) + +### Fixed + +- Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492) +- Fix a possible nil-dereference crash (#478) +- Correct comments for `InstallNewPipeline` in the stdout exporter. (#483) +- Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484) +- Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482) +- Initialize `onError` based on `Config` in prometheus exporter. (#486) +- Correct module name in prometheus exporter README. (#475) +- Removed tracer name prefix from span names. (#430) +- Fix `aggregator_test.go` import package comment. (#431) +- Improved detail in stdout exporter. (#436) +- Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442) +- Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442) +- Reword function documentation in gRPC plugin. (#446) +- Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441) +- Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441) +- Upgraded to Go 1.13 in CI. (#465) +- Correct opentelemetry.io URL in trace SDK documentation. (#464) +- Refactored reference counting logic in SDK determination of stale records. (#468) +- Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469) + +## [0.2.1.1] - 2020-01-13 + +### Fixed + +- Use stateful batcher on Prometheus exporter fixing regresion introduced in #395. (#428) + +## [0.2.1] - 2020-01-08 + +### Added + +- Global meter forwarding implementation. + This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392) +- Global trace forwarding implementation. + This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406) +- Standardize export pipeline creation in all exporters. (#395) +- A testing, organization, and comments for 64-bit field alignment. (#418) +- Script to tag all modules in the project. (#414) + +### Changed + +- Renamed `propagation` package to `propagators`. (#362) +- Renamed `B3Propagator` propagator to `B3`. (#362) +- Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362) +- Renamed `BinaryPropagator` propagator to `Binary`. (#362) +- Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362) +- Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362) +- Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362) +- Renamed `SpanOption` to `StartOption` in the trace API. (#369) +- Renamed `StartOptions` to `StartConfig` in the trace API. (#369) +- Renamed `EndOptions` to `EndConfig` in the trace API. (#369) +- `Number` now has a pointer receiver for its methods. (#375) +- Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379) +- Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379) +- Renamed `Message` in Event to `Name` in the trace API. (#389) +- Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385) +- Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400) +- Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400) +- Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400) +- Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400) +- Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400) +- Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400) +- Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400) +- Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400) +- Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400) +- Renamed the `File` option in the stdout exporter to `Writer`. (#404) +- Renamed all `Options` to `Config` for all metric exports where this wasn't already the case. + +### Fixed + +- Aggregator import path corrected. (#421) +- Correct links in README. (#368) +- The README was updated to match latest code changes in its examples. (#374) +- Don't capitalize error statements. (#375) +- Fix ignored errors. (#375) +- Fix ambiguous variable naming. (#375) +- Removed unnecessary type casting. (#375) +- Use named parameters. (#375) +- Updated release schedule. (#378) +- Correct http-stackdriver example module name. (#394) +- Removed the `http.request` span in `httptrace` package. (#397) +- Add comments in the metrics SDK (#399) +- Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403) +- Add documentation of compatible exporters in the README. (#405) +- Typo fix. (#408) +- Simplify span check logic in SDK tracer implementation. (#419) + +## [0.2.0] - 2019-12-03 + +### Added + +- Unary gRPC tracing example. (#351) +- Prometheus exporter. (#334) +- Dogstatsd metrics exporter. (#326) + +### Changed + +- Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352) +- Rename `GetMeter` to `Meter`. (#357) +- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) +- Rename `HTTPB3Propagator` to `B3Propagator`. (#355) +- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) +- Move `/global` package to `/api/global`. (#356) +- Rename `GetTracer` to `Tracer`. (#347) + +### Removed + +- `SetAttribute` from the `Span` interface in the trace API. (#361) +- `AddLink` from the `Span` interface in the trace API. (#349) +- `Link` from the `Span` interface in the trace API. (#349) + +### Fixed + +- Exclude example directories from coverage report. (#365) +- Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360) +- Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359) +- Run the race checker for all test. (#354) +- Redundant commands in the Makefile are removed. (#354) +- Split the `generate` and `lint` targets of the Makefile. (#354) +- Renames `circle-ci` target to more generic `ci` in Makefile. (#354) +- Add example Prometheus binary to gitignore. (#358) +- Support negative numbers with the `MaxSumCount`. (#335) +- Resolve race conditions in `push_test.go` identified in #339. (#340) +- Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336) +- Trace benchmark now tests both `AlwaysSample` and `NeverSample`. + Previously it was testing `AlwaysSample` twice. (#325) +- Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325) +- Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325) +- The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint. + This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly. + This was corrected. (#333) + +## [0.1.2] - 2019-11-18 + +### Fixed + +- Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328) +- Removed unnecessary unslicing of parameters that are already a slice. (#324) + +## [0.1.1] - 2019-11-18 + +This release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch. + +### Added + +- Metrics stdout export pipeline. (#265) +- Array aggregation for raw measure metrics. (#282) +- The core.Value now have a `MarshalJSON` method. (#281) + +### Removed + +- `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314) +- Prefix slash in `Tracer.Start()` for the Jaeger example. (#292) + +### Changed + +- Allocation in LabelSet construction to reduce GC overhead. (#318) +- `trace.WithAttributes` to append values instead of replacing (#315) +- Use a formula for tolerance in sampling tests. (#298) +- Move export types into trace and metric-specific sub-directories. (#289) +- `SpanKind` back to being based on an `int` type. (#288) + +### Fixed + +- URL to OpenTelemetry website in README. (#323) +- Name of othttp default tracer. (#321) +- `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294) +- CI modules cache to correctly restore/save from/to the cache. (#316) +- Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293) +- README now reflects the new code structure introduced with these changes. (#291) +- Make the basic example work. (#279) + +## [0.1.0] - 2019-11-04 + +This is the first release of open-telemetry go library. +It contains api and sdk for trace and meter. + +### Added + +- Initial OpenTelemetry trace and metric API prototypes. +- Initial OpenTelemetry trace, metric, and export SDK packages. +- A wireframe bridge to support compatibility with OpenTracing. +- Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup. +- Exporters for Jaeger, Stackdriver, and stdout. +- Propagators for binary, B3, and trace-context protocols. +- Project information and guidelines in the form of a README and CONTRIBUTING. +- Tools to build the project and a Makefile to automate the process. +- Apache-2.0 license. +- CircleCI build CI manifest files. +- CODEOWNERS file to track owners of this project. + +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...HEAD +[1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2 +[1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1 +[1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0 +[0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2 +[0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1 +[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0 +[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0 +[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0 +[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0 +[1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0 +[0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0 +[1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3 +[1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2 +[1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1 +[1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0 +[1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0 +[1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1 +[1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0 +[1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0 +[1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0 +[1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0 +[1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1 +[Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0 +[1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0 +[1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3 +[1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2 +[Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0 +[1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1 +[0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0 +[0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0 +[0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0 +[0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0 +[0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0 +[0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0 +[0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0 +[0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0 +[0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0 +[0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0 +[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0 +[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 +[0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 +[0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 +[0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0 +[0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0 +[0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3 +[0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2 +[0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1 +[0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0 +[0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0 +[0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3 +[0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2 +[0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1 +[0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1 +[0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0 +[0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2 +[0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1 +[0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS new file mode 100644 index 000000000..c4012ed6c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS @@ -0,0 +1,17 @@ +##################################################### +# +# List of approvers for this repository +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/main/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + +* @jmacd @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu + +CODEOWNERS @MrAlias @Aneurysm9 @MadVikingGod diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md new file mode 100644 index 000000000..9371a481a --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -0,0 +1,526 @@ +# Contributing to opentelemetry-go + +The Go special interest group (SIG) meets regularly. See the +OpenTelemetry +[community](https://github.com/open-telemetry/community#golang-sdk) +repo for information on this and other language SIGs. + +See the [public meeting +notes](https://docs.google.com/document/d/1A63zSWX0x2CyCK_LoNhmQC4rqhLpYXJzXbEPDUQ2n6w/edit#heading=h.9tngw7jdwd6b) +for a summary description of past meetings. To request edit access, +join the meeting or get in touch on +[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT). + +## Development + +You can view and edit the source code by cloning this repository: + +```sh +git clone https://github.com/open-telemetry/opentelemetry-go.git +``` + +Run `make test` to run the tests instead of `go test`. + +There are some generated files checked into the repo. To make sure +that the generated files are up-to-date, run `make` (or `make +precommit` - the `precommit` target is the default). + +The `precommit` target also fixes the formatting of the code and +checks the status of the go module files. + +If after running `make precommit` the output of `git status` contains +`nothing to commit, working tree clean` then it means that everything +is up-to-date and properly formatted. + +## Pull Requests + +### How to Send Pull Requests + +Everyone is welcome to contribute code to `opentelemetry-go` via +GitHub pull requests (PRs). + +To create a new PR, fork the project in GitHub and clone the upstream +repo: + +```sh +go get -d go.opentelemetry.io/otel +``` + +(This may print some warning about "build constraints exclude all Go +files", just ignore it.) + +This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. You +can alternatively use `git` directly with: + +```sh +git clone https://github.com/open-telemetry/opentelemetry-go +``` + +(Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name - +that name is a kind of a redirector to GitHub that `go get` can +understand, but `git` does not.) + +This would put the project in the `opentelemetry-go` directory in +current working directory. + +Enter the newly created directory and add your fork as a new remote: + +```sh +git remote add git@github.com:/opentelemetry-go +``` + +Check out a new branch, make modifications, run linters and tests, update +`CHANGELOG.md`, and push the branch to your fork: + +```sh +git checkout -b +# edit files +# update changelog +make precommit +git add -p +git commit +git push +``` + +Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull +request ID to the entry you added to `CHANGELOG.md`. + +### How to Receive Comments + +* If the PR is not ready for review, please put `[WIP]` in the title, + tag it as `work-in-progress`, or mark it as + [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/). +* Make sure CLA is signed and CI is clear. + +### How to Get PRs Merged + +A PR is considered to be **ready to merge** when: + +* It has received two approvals from Collaborators/Maintainers (at + different companies). This is not enforced through technical means + and a PR may be **ready to merge** with a single approval if the change + and its approach have been discussed and consensus reached. +* Feedback has been addressed. +* Any substantive changes to your PR will require that you clear any prior + Approval reviews, this includes changes resulting from other feedback. Unless + the approver explicitly stated that their approval will persist across + changes it should be assumed that the PR needs their review again. Other + project members (e.g. approvers, maintainers) can help with this if there are + any questions or if you forget to clear reviews. +* It has been open for review for at least one working day. This gives + people reasonable time to review. +* Trivial changes (typo, cosmetic, doc, etc.) do not have to wait for + one day and may be merged with a single Maintainer's approval. +* `CHANGELOG.md` has been updated to reflect what has been + added, changed, removed, or fixed. +* `README.md` has been updated if necessary. +* Urgent fix can take exception as long as it has been actively + communicated. + +Any Maintainer can merge the PR once it is **ready to merge**. + +## Design Choices + +As with other OpenTelemetry clients, opentelemetry-go follows the +[opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification). + +It's especially valuable to read through the [library +guidelines](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-guidelines.md). + +### Focus on Capabilities, Not Structure Compliance + +OpenTelemetry is an evolving specification, one where the desires and +use cases are clear, but the method to satisfy those uses cases are +not. + +As such, Contributions should provide functionality and behavior that +conforms to the specification, but the interface and structure is +flexible. + +It is preferable to have contributions follow the idioms of the +language rather than conform to specific API names or argument +patterns in the spec. + +For a deeper discussion, see +[this](https://github.com/open-telemetry/opentelemetry-specification/issues/165). + +## Documentation + +Each non-example Go Module should have its own `README.md` containing: + +- A pkg.go.dev badge which can be generated [here](https://pkg.go.dev/badge/). +- Brief description. +- Installation instructions (and requirements if applicable). +- Hyperlink to an example. Depending on the component the example can be: + - An `example_test.go` like [here](exporters/stdout/stdouttrace/example_test.go). + - A sample Go application with its own `README.md`, like [here](example/zipkin). +- Additional documentation sections such us: + - Configuration, + - Contributing, + - References. + +[Here](exporters/jaeger/README.md) is an example of a concise `README.md`. + +Moreover, it should be possible to navigate to any `README.md` from the +root `README.md`. + +## Style Guide + +One of the primary goals of this project is that it is actually used by +developers. With this goal in mind the project strives to build +user-friendly and idiomatic Go code adhering to the Go community's best +practices. + +For a non-comprehensive but foundational overview of these best practices +the [Effective Go](https://golang.org/doc/effective_go.html) documentation +is an excellent starting place. + +As a convenience for developers building this project the `make precommit` +will format, lint, validate, and in some cases fix the changes you plan to +submit. This check will need to pass for your changes to be able to be +merged. + +In addition to idiomatic Go, the project has adopted certain standards for +implementations of common patterns. These standards should be followed as a +default, and if they are not followed documentation needs to be included as +to the reasons why. + +### Configuration + +When creating an instantiation function for a complex `type T struct`, it is +useful to allow variable number of options to be applied. However, the strong +type system of Go restricts the function design options. There are a few ways +to solve this problem, but we have landed on the following design. + +#### `config` + +Configuration should be held in a `struct` named `config`, or prefixed with +specific type name this Configuration applies to if there are multiple +`config` in the package. This type must contain configuration options. + +```go +// config contains configuration options for a thing. +type config struct { + // options ... +} +``` + +In general the `config` type will not need to be used externally to the +package and should be unexported. If, however, it is expected that the user +will likely want to build custom options for the configuration, the `config` +should be exported. Please, include in the documentation for the `config` +how the user can extend the configuration. + +It is important that internal `config` are not shared across package boundaries. +Meaning a `config` from one package should not be directly used by another. The +one exception is the API packages. The configs from the base API, eg. +`go.opentelemetry.io/otel/trace.TracerConfig` and +`go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed +by the SDK therefor it is expected that these are exported. + +When a config is exported we want to maintain forward and backward +compatibility, to achieve this no fields should be exported but should +instead be accessed by methods. + +Optionally, it is common to include a `newConfig` function (with the same +naming scheme). This function wraps any defaults setting and looping over +all options to create a configured `config`. + +```go +// newConfig returns an appropriately configured config. +func newConfig(options ...Option) config { + // Set default values for config. + config := config{/* […] */} + for _, option := range options { + config = option.apply(config) + } + // Preform any validation here. + return config +} +``` + +If validation of the `config` options is also preformed this can return an +error as well that is expected to be handled by the instantiation function +or propagated to the user. + +Given the design goal of not having the user need to work with the `config`, +the `newConfig` function should also be unexported. + +#### `Option` + +To set the value of the options a `config` contains, a corresponding +`Option` interface type should be used. + +```go +type Option interface { + apply(config) config +} +``` + +Having `apply` unexported makes sure that it will not be used externally. +Moreover, the interface becomes sealed so the user cannot easily implement +the interface on its own. + +The `apply` method should return a modified version of the passed config. +This approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap. + +The name of the interface should be prefixed in the same way the +corresponding `config` is (if at all). + +#### Options + +All user configurable options for a `config` must have a related unexported +implementation of the `Option` interface and an exported configuration +function that wraps this implementation. + +The wrapping function name should be prefixed with `With*` (or in the +special case of a boolean options `Without*`) and should have the following +function signature. + +```go +func With*(…) Option { … } +``` + +##### `bool` Options + +```go +type defaultFalseOption bool + +func (o defaultFalseOption) apply(c config) config { + c.Bool = bool(o) + return c +} + +// WithOption sets a T to have an option included. +func WithOption() Option { + return defaultFalseOption(true) +} +``` + +```go +type defaultTrueOption bool + +func (o defaultTrueOption) apply(c config) config { + c.Bool = bool(o) + return c +} + +// WithoutOption sets a T to have Bool option excluded. +func WithoutOption() Option { + return defaultTrueOption(false) +} +``` + +##### Declared Type Options + +```go +type myTypeOption struct { + MyType MyType +} + +func (o myTypeOption) apply(c config) config { + c.MyType = o.MyType + return c +} + +// WithMyType sets T to have include MyType. +func WithMyType(t MyType) Option { + return myTypeOption{t} +} +``` + +##### Functional Options + +```go +type optionFunc func(config) config + +func (fn optionFunc) apply(c config) config { + return fn(c) +} + +// WithMyType sets t as MyType. +func WithMyType(t MyType) Option { + return optionFunc(func(c config) config { + c.MyType = t + return c + }) +} +``` + +#### Instantiation + +Using this configuration pattern to configure instantiation with a `NewT` +function. + +```go +func NewT(options ...Option) T {…} +``` + +Any required parameters can be declared before the variadic `options`. + +#### Dealing with Overlap + +Sometimes there are multiple complex `struct` that share common +configuration and also have distinct configuration. To avoid repeated +portions of `config`s, a common `config` can be used with the union of +options being handled with the `Option` interface. + +For example. + +```go +// config holds options for all animals. +type config struct { + Weight float64 + Color string + MaxAltitude float64 +} + +// DogOption apply Dog specific options. +type DogOption interface { + applyDog(config) config +} + +// BirdOption apply Bird specific options. +type BirdOption interface { + applyBird(config) config +} + +// Option apply options for all animals. +type Option interface { + BirdOption + DogOption +} + +type weightOption float64 + +func (o weightOption) applyDog(c config) config { + c.Weight = float64(o) + return c +} + +func (o weightOption) applyBird(c config) config { + c.Weight = float64(o) + return c +} + +func WithWeight(w float64) Option { return weightOption(w) } + +type furColorOption string + +func (o furColorOption) applyDog(c config) config { + c.Color = string(o) + return c +} + +func WithFurColor(c string) DogOption { return furColorOption(c) } + +type maxAltitudeOption float64 + +func (o maxAltitudeOption) applyBird(c config) config { + c.MaxAltitude = float64(o) + return c +} + +func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) } + +func NewDog(name string, o ...DogOption) Dog {…} +func NewBird(name string, o ...BirdOption) Bird {…} +``` + +### Interfaces + +To allow other developers to better comprehend the code, it is important +to ensure it is sufficiently documented. One simple measure that contributes +to this aim is self-documenting by naming method parameters. Therefore, +where appropriate, methods of every exported interface type should have +their parameters appropriately named. + +#### Interface Stability + +All exported stable interfaces that include the following warning in their +doumentation are allowed to be extended with additional methods. + +> Warning: methods may be added to this interface in minor releases. + +Otherwise, stable interfaces MUST NOT be modified. + +If new functionality is needed for an interface that cannot be changed it MUST +be added by including an additional interface. That added interface can be a +simple interface for the specific functionality that you want to add or it can +be a super-set of the original interface. For example, if you wanted to a +`Close` method to the `Exporter` interface: + +```go +type Exporter interface { + Export() +} +``` + +A new interface, `Closer`, can be added: + +```go +type Closer interface { + Close() +} +``` + +Code that is passed the `Exporter` interface can now check to see if the passed +value also satisfies the new interface. E.g. + +```go +func caller(e Exporter) { + /* ... */ + if c, ok := e.(Closer); ok { + c.Close() + } + /* ... */ +} +``` + +Alternatively, a new type that is the super-set of an `Exporter` can be created. + +```go +type ClosingExporter struct { + Exporter + Close() +} +``` + +This new type can be used similar to the simple interface above in that a +passed `Exporter` type can be asserted to satisfy the `ClosingExporter` type +and the `Close` method called. + +This super-set approach can be useful if there is explicit behavior that needs +to be coupled with the original type and passed as a unified type to a new +function, but, because of this coupling, it also limits the applicability of +the added functionality. If there exist other interfaces where this +functionality should be added, each one will need their own super-set +interfaces and will duplicate the pattern. For this reason, the simple targeted +interface that defines the specific functionality should be preferred. + +## Approvers and Maintainers + +Approvers: + +- [Evan Torrie](https://github.com/evantorrie), Verizon Media +- [Josh MacDonald](https://github.com/jmacd), LightStep +- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics +- [David Ashpole](https://github.com/dashpole), Google +- [Robert Pająk](https://github.com/pellared), Splunk +- [Chester Cheung](https://github.com/hanyuancheung), Tencent +- [Damien Mathieu](https://github.com/dmathieu), Auth0/Okta + +Maintainers: + +- [Aaron Clawson](https://github.com/MadVikingGod), LightStep +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Tyler Yahn](https://github.com/MrAlias), Splunk + +Emeritus: + +- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep + +### Become an Approver or a Maintainer + +See the [community membership document in OpenTelemetry community +repo](https://github.com/open-telemetry/community/blob/main/community-membership.md). diff --git a/vendor/go.opentelemetry.io/otel/LICENSE b/vendor/go.opentelemetry.io/otel/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile new file mode 100644 index 000000000..68cdfef7d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -0,0 +1,226 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +TOOLS_MOD_DIR := ./internal/tools + +ALL_DOCS := $(shell find . -name '*.md' -type f | sort) +ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) +OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)) +ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort) + +GO = go +TIMEOUT = 60 + +.DEFAULT_GOAL := precommit + +.PHONY: precommit ci +precommit: dependabot-generate license-check vanity-import-fix misspell go-mod-tidy golangci-lint-fix test-default +ci: dependabot-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage + +# Tools + +TOOLS = $(CURDIR)/.tools + +$(TOOLS): + @mkdir -p $@ +$(TOOLS)/%: | $(TOOLS) + cd $(TOOLS_MOD_DIR) && \ + $(GO) build -o $@ $(PACKAGE) + +MULTIMOD = $(TOOLS)/multimod +$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod + +SEMCONVGEN = $(TOOLS)/semconvgen +$(TOOLS)/semconvgen: PACKAGE=go.opentelemetry.io/build-tools/semconvgen + +CROSSLINK = $(TOOLS)/crosslink +$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink + +SEMCONVKIT = $(TOOLS)/semconvkit +$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit + +DBOTCONF = $(TOOLS)/dbotconf +$(TOOLS)/dbotconf: PACKAGE=go.opentelemetry.io/build-tools/dbotconf + +GOLANGCI_LINT = $(TOOLS)/golangci-lint +$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint + +MISSPELL = $(TOOLS)/misspell +$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell + +GOCOVMERGE = $(TOOLS)/gocovmerge +$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge + +STRINGER = $(TOOLS)/stringer +$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer + +PORTO = $(TOOLS)/porto +$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto + +GOJQ = $(TOOLS)/gojq +$(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq + +.PHONY: tools +tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) + +# Build + +.PHONY: generate build + +generate: $(OTEL_GO_MOD_DIRS:%=generate/%) +generate/%: DIR=$* +generate/%: | $(STRINGER) $(PORTO) + @echo "$(GO) generate $(DIR)/..." \ + && cd $(DIR) \ + && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... && $(PORTO) -w . + +build: generate $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) +build/%: DIR=$* +build/%: + @echo "$(GO) build $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) build ./... + +build-tests/%: DIR=$* +build-tests/%: + @echo "$(GO) build tests $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) list ./... \ + | grep -v third_party \ + | xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null + +# Tests + +TEST_TARGETS := test-default test-bench test-short test-verbose test-race +.PHONY: $(TEST_TARGETS) test +test-default test-race: ARGS=-race +test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=. +test-short: ARGS=-short +test-verbose: ARGS=-v -race +$(TEST_TARGETS): test +test: $(OTEL_GO_MOD_DIRS:%=test/%) +test/%: DIR=$* +test/%: + @echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \ + && cd $(DIR) \ + && $(GO) list ./... \ + | grep -v third_party \ + | xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS) + +COVERAGE_MODE = atomic +COVERAGE_PROFILE = coverage.out +.PHONY: test-coverage +test-coverage: | $(GOCOVMERGE) + @set -e; \ + printf "" > coverage.txt; \ + for dir in $(ALL_COVERAGE_MOD_DIRS); do \ + echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \ + (cd "$${dir}" && \ + $(GO) list ./... \ + | grep -v third_party \ + | grep -v 'semconv/v.*' \ + | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \ + $(GO) tool cover -html=coverage.out -o coverage.html); \ + done; \ + $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt + +.PHONY: golangci-lint golangci-lint-fix +golangci-lint-fix: ARGS=--fix +golangci-lint-fix: golangci-lint +golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) +golangci-lint/%: DIR=$* +golangci-lint/%: | $(GOLANGCI_LINT) + @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ + && cd $(DIR) \ + && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) + +.PHONY: crosslink +crosslink: | $(CROSSLINK) + @echo "Updating intra-repository dependencies in all go modules" \ + && $(CROSSLINK) --root=$(shell pwd) --prune + +.PHONY: go-mod-tidy +go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) +go-mod-tidy/%: DIR=$* +go-mod-tidy/%: | crosslink + @echo "$(GO) mod tidy in $(DIR)" \ + && cd $(DIR) \ + && $(GO) mod tidy -compat=1.18 + +.PHONY: lint-modules +lint-modules: go-mod-tidy + +.PHONY: lint +lint: misspell lint-modules golangci-lint + +.PHONY: vanity-import-check +vanity-import-check: | $(PORTO) + @$(PORTO) --include-internal -l . || echo "(run: make vanity-import-fix)" + +.PHONY: vanity-import-fix +vanity-import-fix: | $(PORTO) + @$(PORTO) --include-internal -w . + +.PHONY: misspell +misspell: | $(MISSPELL) + @$(MISSPELL) -w $(ALL_DOCS) + +.PHONY: license-check +license-check: + @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \ + awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=3 { found=1; next } END { if (!found) print FILENAME }' $$f; \ + done); \ + if [ -n "$${licRes}" ]; then \ + echo "license header checking failed:"; echo "$${licRes}"; \ + exit 1; \ + fi + +DEPENDABOT_CONFIG = .github/dependabot.yml +.PHONY: dependabot-check +dependabot-check: | $(DBOTCONF) + @$(DBOTCONF) verify $(DEPENDABOT_CONFIG) || echo "(run: make dependabot-generate)" + +.PHONY: dependabot-generate +dependabot-generate: | $(DBOTCONF) + @$(DBOTCONF) generate > $(DEPENDABOT_CONFIG) + +.PHONY: check-clean-work-tree +check-clean-work-tree: + @if ! git diff --quiet; then \ + echo; \ + echo 'Working tree is not clean, did you forget to run "make precommit"?'; \ + echo; \ + git status; \ + exit 1; \ + fi + +SEMCONVPKG ?= "semconv/" +.PHONY: semconv-generate +semconv-generate: | $(SEMCONVGEN) $(SEMCONVKIT) + @[ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry specification tag"; exit 1 ) + @[ "$(OTEL_SPEC_REPO)" ] || ( echo "OTEL_SPEC_REPO unset: missing path to opentelemetry specification repo"; exit 1 ) + @$(SEMCONVGEN) -i "$(OTEL_SPEC_REPO)/semantic_conventions/trace" -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" + @$(SEMCONVGEN) -i "$(OTEL_SPEC_REPO)/semantic_conventions/resource" -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" + @$(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)" + +.PHONY: prerelease +prerelease: | $(MULTIMOD) + @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) + $(MULTIMOD) verify && $(MULTIMOD) prerelease -m ${MODSET} + +COMMIT ?= "HEAD" +.PHONY: add-tags +add-tags: | $(MULTIMOD) + @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) + $(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md new file mode 100644 index 000000000..1b2ee21fb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -0,0 +1,109 @@ +# OpenTelemetry-Go + +[![CI](https://github.com/open-telemetry/opentelemetry-go/workflows/ci/badge.svg)](https://github.com/open-telemetry/opentelemetry-go/actions?query=workflow%3Aci+branch%3Amain) +[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main) +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel) +[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel) +[![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT) + +OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/). +It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms. + +## Project Status + +| Signal | Status | Project | +| ------- | ---------- | ------- | +| Traces | Stable | N/A | +| Metrics | Alpha | N/A | +| Logs | Frozen [1] | N/A | + +- [1]: The Logs signal development is halted for this project while we develop both Traces and Metrics. + No Logs Pull Requests are currently being accepted. + +Progress and status specific to this repository is tracked in our local +[project boards](https://github.com/open-telemetry/opentelemetry-go/projects) +and +[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones). + +Project versioning information and stability guarantees can be found in the +[versioning documentation](./VERSIONING.md). + +### Compatibility + +OpenTelemetry-Go ensures compatibility with the current supported versions of +the [Go language](https://golang.org/doc/devel/release#policy): + +> Each major Go release is supported until there are two newer major releases. +> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. + +For versions of Go that are no longer supported upstream, opentelemetry-go will +stop ensuring compatibility with these versions in the following manner: + +- A minor release of opentelemetry-go will be made to add support for the new + supported release of Go. +- The following minor release of opentelemetry-go will remove compatibility + testing for the oldest (now archived upstream) version of Go. This, and + future, releases of opentelemetry-go may include features only supported by + the currently supported versions of Go. + +Currently, this project supports the following environments. + +| OS | Go Version | Architecture | +| ------- | ---------- | ------------ | +| Ubuntu | 1.19 | amd64 | +| Ubuntu | 1.18 | amd64 | +| Ubuntu | 1.19 | 386 | +| Ubuntu | 1.18 | 386 | +| MacOS | 1.19 | amd64 | +| MacOS | 1.18 | amd64 | +| Windows | 1.19 | amd64 | +| Windows | 1.18 | amd64 | +| Windows | 1.19 | 386 | +| Windows | 1.18 | 386 | + +While this project should work for other systems, no compatibility guarantees +are made for those systems currently. + +## Getting Started + +You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/go/getting-started/). + +OpenTelemetry's goal is to provide a single set of APIs to capture distributed +traces and metrics from your application and send them to an observability +platform. This project allows you to do just that for applications written in +Go. There are two steps to this process: instrument your application, and +configure an exporter. + +### Instrumentation + +To start capturing distributed traces and metric events from your application +it first needs to be instrumented. The easiest way to do this is by using an +instrumentation library for your code. Be sure to check out [the officially +supported instrumentation +libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation). + +If you need to extend the telemetry an instrumentation library provides or want +to build your own instrumentation for your application directly you will need +to use the +[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel) +package. The included [examples](./example/) are a good way to see some +practical uses of this process. + +### Export + +Now that your application is instrumented to collect telemetry, it needs an +export pipeline to send that telemetry to an observability platform. + +All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters). + +| Exporter | Metrics | Traces | +| :-----------------------------------: | :-----: | :----: | +| [Jaeger](./exporters/jaeger/) | | ✓ | +| [OTLP](./exporters/otlp/) | ✓ | ✓ | +| [Prometheus](./exporters/prometheus/) | ✓ | | +| [stdout](./exporters/stdout/) | ✓ | ✓ | +| [Zipkin](./exporters/zipkin/) | | ✓ | + +## Contributing + +See the [contributing documentation](CONTRIBUTING.md). diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md new file mode 100644 index 000000000..71e576254 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/RELEASING.md @@ -0,0 +1,122 @@ +# Release Process + +## Semantic Convention Generation + +New versions of the [OpenTelemetry specification] mean new versions of the `semconv` package need to be generated. +The `semconv-generate` make target is used for this. + +1. Checkout a local copy of the [OpenTelemetry specification] to the desired release tag. +2. Run the `make semconv-generate ...` target from this repository. + +For example, + +```sh +export TAG="v1.7.0" # Change to the release version you are generating. +export OTEL_SPEC_REPO="/absolute/path/to/opentelemetry-specification" +git -C "$OTEL_SPEC_REPO" checkout "tags/$TAG" +make semconv-generate # Uses the exported TAG and OTEL_SPEC_REPO. +``` + +This should create a new sub-package of [`semconv`](./semconv). +Ensure things look correct before submitting a pull request to include the addition. + +## Pre-Release + +First, decide which module sets will be released and update their versions +in `versions.yaml`. Commit this change to a new branch. + +Update go.mod for submodules to depend on the new release which will happen in the next step. + +1. Run the `prerelease` make target. It creates a branch + `prerelease__` that will contain all release changes. + + ``` + make prerelease MODSET= + ``` + +2. Verify the changes. + + ``` + git diff ...prerelease__ + ``` + + This should have changed the version for all modules to be ``. + If these changes look correct, merge them into your pre-release branch: + + ```go + git merge prerelease__ + ``` + +3. Update the [Changelog](./CHANGELOG.md). + - Make sure all relevant changes for this release are included and are in language that non-contributors to the project can understand. + To verify this, you can look directly at the commits since the ``. + + ``` + git --no-pager log --pretty=oneline "..HEAD" + ``` + + - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `). + - Update all the appropriate links at the bottom. + +4. Push the changes to upstream and create a Pull Request on GitHub. + Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. + +## Tag + +Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit. + +***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! +Failure to do so will leave things in a broken state. As long as you do not +change `versions.yaml` between pre-release and this step, things should be fine. + +***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189). +It is critical you make sure the version you push upstream is correct. +[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331). + +1. For each module set that will be released, run the `add-tags` make target + using the `` of the commit on the main branch for the merged Pull Request. + + ``` + make add-tags MODSET= COMMIT= + ``` + + It should only be necessary to provide an explicit `COMMIT` value if the + current `HEAD` of your working directory is not the correct commit. + +2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`). + Make sure you push all sub-modules as well. + + ``` + git push upstream + git push upstream + ... + ``` + +## Release + +Finally create a Release for the new `` on GitHub. +The release body should include all the release notes from the Changelog for this release. + +## Verify Examples + +After releasing verify that examples build outside of the repository. + +``` +./verify_examples.sh +``` + +The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. +This ensures they build with the published release, not the local copy. + +## Post-Release + +### Contrib Repository + +Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release. + +### Website Documentation + +Update [the documentation](./website_docs) for [the OpenTelemetry website](https://opentelemetry.io/docs/go/). +Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate. + +[OpenTelemetry specification]: https://github.com/open-telemetry/opentelemetry-specification diff --git a/vendor/go.opentelemetry.io/otel/VERSIONING.md b/vendor/go.opentelemetry.io/otel/VERSIONING.md new file mode 100644 index 000000000..412f1e362 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/VERSIONING.md @@ -0,0 +1,224 @@ +# Versioning + +This document describes the versioning policy for this repository. This policy +is designed so the following goals can be achieved. + +**Users are provided a codebase of value that is stable and secure.** + +## Policy + +* Versioning of this project will be idiomatic of a Go project using [Go + modules](https://github.com/golang/go/wiki/Modules). + * [Semantic import + versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) + will be used. + * Versions will comply with [semver + 2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions. + * New methods may be added to exported API interfaces. All exported + interfaces that fall within this exception will include the following + paragraph in their public documentation. + + > Warning: methods may be added to this interface in minor releases. + + * If a module is version `v2` or higher, the major version of the module + must be included as a `/vN` at the end of the module paths used in + `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require + go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path + (e.g., `import "go.opentelemetry.io/otel/v2/trace"`). This includes the + paths used in `go get` commands (e.g., `go get + go.opentelemetry.io/otel/v2@v2.0.1`. Note there is both a `/v2` and a + `@v2.0.1` in that example. One way to think about it is that the module + name now includes the `/v2`, so include `/v2` whenever you are using the + module name). + * If a module is version `v0` or `v1`, do not include the major version in + either the module path or the import path. + * Modules will be used to encapsulate signals and components. + * Experimental modules still under active development will be versioned at + `v0` to imply the stability guarantee defined by + [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). + + > Major version zero (0.y.z) is for initial development. Anything MAY + > change at any time. The public API SHOULD NOT be considered stable. + + * Mature modules for which we guarantee a stable public API will be versioned + with a major version greater than `v0`. + * The decision to make a module stable will be made on a case-by-case + basis by the maintainers of this project. + * Experimental modules will start their versioning at `v0.0.0` and will + increment their minor version when backwards incompatible changes are + released and increment their patch version when backwards compatible + changes are released. + * All stable modules that use the same major version number will use the + same entire version number. + * Stable modules may be released with an incremented minor or patch + version even though that module has not been changed, but rather so + that it will remain at the same version as other stable modules that + did undergo change. + * When an experimental module becomes stable a new stable module version + will be released and will include this now stable module. The new + stable module version will be an increment of the minor version number + and will be applied to all existing stable modules as well as the newly + stable module being released. +* Versioning of the associated [contrib + repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of + this project will be idiomatic of a Go project using [Go + modules](https://github.com/golang/go/wiki/Modules). + * [Semantic import + versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) + will be used. + * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html). + * If a module is version `v2` or higher, the + major version of the module must be included as a `/vN` at the end of the + module paths used in `go.mod` files (e.g., `module + go.opentelemetry.io/contrib/instrumentation/host/v2`, `require + go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the + package import path (e.g., `import + "go.opentelemetry.io/contrib/instrumentation/host/v2"`). This includes + the paths used in `go get` commands (e.g., `go get + go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`. Note there + is both a `/v2` and a `@v2.0.1` in that example. One way to think about + it is that the module name now includes the `/v2`, so include `/v2` + whenever you are using the module name). + * If a module is version `v0` or `v1`, do not include the major version + in either the module path or the import path. + * In addition to public APIs, telemetry produced by stable instrumentation + will remain stable and backwards compatible. This is to avoid breaking + alerts and dashboard. + * Modules will be used to encapsulate instrumentation, detectors, exporters, + propagators, and any other independent sets of related components. + * Experimental modules still under active development will be versioned at + `v0` to imply the stability guarantee defined by + [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). + + > Major version zero (0.y.z) is for initial development. Anything MAY + > change at any time. The public API SHOULD NOT be considered stable. + + * Mature modules for which we guarantee a stable public API and telemetry will + be versioned with a major version greater than `v0`. + * Experimental modules will start their versioning at `v0.0.0` and will + increment their minor version when backwards incompatible changes are + released and increment their patch version when backwards compatible + changes are released. + * Stable contrib modules cannot depend on experimental modules from this + project. + * All stable contrib modules of the same major version with this project + will use the same entire version as this project. + * Stable modules may be released with an incremented minor or patch + version even though that module's code has not been changed. Instead + the only change that will have been included is to have updated that + modules dependency on this project's stable APIs. + * When an experimental module in contrib becomes stable a new stable + module version will be released and will include this now stable + module. The new stable module version will be an increment of the minor + version number and will be applied to all existing stable contrib + modules, this project's modules, and the newly stable module being + released. + * Contrib modules will be kept up to date with this project's releases. + * Due to the dependency contrib modules will implicitly have on this + project's modules the release of stable contrib modules to match the + released version number will be staggered after this project's release. + There is no explicit time guarantee for how long after this projects + release the contrib release will be. Effort should be made to keep them + as close in time as possible. + * No additional stable release in this project can be made until the + contrib repository has a matching stable release. + * No release can be made in the contrib repository after this project's + stable release except for a stable release of the contrib repository. +* GitHub releases will be made for all releases. +* Go modules will be made available at Go package mirrors. + +## Example Versioning Lifecycle + +To better understand the implementation of the above policy the following +example is provided. This project is simplified to include only the following +modules and their versions: + +* `otel`: `v0.14.0` +* `otel/trace`: `v0.14.0` +* `otel/metric`: `v0.14.0` +* `otel/baggage`: `v0.14.0` +* `otel/sdk/trace`: `v0.14.0` +* `otel/sdk/metric`: `v0.14.0` + +These modules have been developed to a point where the `otel/trace`, +`otel/baggage`, and `otel/sdk/trace` modules have reached a point that they +should be considered for a stable release. The `otel/metric` and +`otel/sdk/metric` are still under active development and the `otel` module +depends on both `otel/trace` and `otel/metric`. + +The `otel` package is refactored to remove its dependencies on `otel/metric` so +it can be released as stable as well. With that done the following release +candidates are made: + +* `otel`: `v1.0.0-RC1` +* `otel/trace`: `v1.0.0-RC1` +* `otel/baggage`: `v1.0.0-RC1` +* `otel/sdk/trace`: `v1.0.0-RC1` + +The `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`. + +A few minor issues are discovered in the `otel/trace` package. These issues are +resolved with some minor, but backwards incompatible, changes and are released +as a second release candidate: + +* `otel`: `v1.0.0-RC2` +* `otel/trace`: `v1.0.0-RC2` +* `otel/baggage`: `v1.0.0-RC2` +* `otel/sdk/trace`: `v1.0.0-RC2` + +Notice that all module version numbers are incremented to adhere to our +versioning policy. + +After these release candidates have been evaluated to satisfaction, they are +released as version `v1.0.0`. + +* `otel`: `v1.0.0` +* `otel/trace`: `v1.0.0` +* `otel/baggage`: `v1.0.0` +* `otel/sdk/trace`: `v1.0.0` + +Since both the `go` utility and the Go module system support [the semantic +versioning definition of +precedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release +will correctly be interpreted as the successor to the previous release +candidates. + +Active development of this project continues. The `otel/metric` module now has +backwards incompatible changes to its API that need to be released and the +`otel/baggage` module has a minor bug fix that needs to be released. The +following release is made: + +* `otel`: `v1.0.1` +* `otel/trace`: `v1.0.1` +* `otel/metric`: `v0.15.0` +* `otel/baggage`: `v1.0.1` +* `otel/sdk/trace`: `v1.0.1` +* `otel/sdk/metric`: `v0.15.0` + +Notice that, again, all stable module versions are incremented in unison and +the `otel/sdk/metric` package, which depends on the `otel/metric` package, also +bumped its version. This bump of the `otel/sdk/metric` package makes sense +given their coupling, though it is not explicitly required by our versioning +policy. + +As we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a +point where they should be evaluated for stability. The `otel` module is +reintegrated with the `otel/metric` package and the following release is made: + +* `otel`: `v1.1.0-RC1` +* `otel/trace`: `v1.1.0-RC1` +* `otel/metric`: `v1.1.0-RC1` +* `otel/baggage`: `v1.1.0-RC1` +* `otel/sdk/trace`: `v1.1.0-RC1` +* `otel/sdk/metric`: `v1.1.0-RC1` + +All the modules are evaluated and determined to a viable stable release. They +are then released as version `v1.1.0` (the minor version is incremented to +indicate the addition of new signal). + +* `otel`: `v1.1.0` +* `otel/trace`: `v1.1.0` +* `otel/metric`: `v1.1.0` +* `otel/baggage`: `v1.1.0` +* `otel/sdk/trace`: `v1.1.0` +* `otel/sdk/metric`: `v1.1.0` diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go new file mode 100644 index 000000000..dafe7424d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/doc.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package attribute provides key and value attributes. +package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go new file mode 100644 index 000000000..fe2bc5766 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go @@ -0,0 +1,146 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "bytes" + "sync" + "sync/atomic" +) + +type ( + // Encoder is a mechanism for serializing an attribute set into a specific + // string representation that supports caching, to avoid repeated + // serialization. An example could be an exporter encoding the attribute + // set into a wire representation. + Encoder interface { + // Encode returns the serialized encoding of the attribute set using + // its Iterator. This result may be cached by a attribute.Set. + Encode(iterator Iterator) string + + // ID returns a value that is unique for each class of attribute + // encoder. Attribute encoders allocate these using `NewEncoderID`. + ID() EncoderID + } + + // EncoderID is used to identify distinct Encoder + // implementations, for caching encoded results. + EncoderID struct { + value uint64 + } + + // defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of + // allocations used in encoding attributes. This implementation encodes a + // comma-separated list of key=value, with '/'-escaping of '=', ',', and + // '\'. + defaultAttrEncoder struct { + // pool is a pool of attribute set builders. The buffers in this pool + // grow to a size that most attribute encodings will not allocate new + // memory. + pool sync.Pool // *bytes.Buffer + } +) + +// escapeChar is used to ensure uniqueness of the attribute encoding where +// keys or values contain either '=' or ','. Since there is no parser needed +// for this encoding and its only requirement is to be unique, this choice is +// arbitrary. Users will see these in some exporters (e.g., stdout), so the +// backslash ('\') is used as a conventional choice. +const escapeChar = '\\' + +var ( + _ Encoder = &defaultAttrEncoder{} + + // encoderIDCounter is for generating IDs for other attribute encoders. + encoderIDCounter uint64 + + defaultEncoderOnce sync.Once + defaultEncoderID = NewEncoderID() + defaultEncoderInstance *defaultAttrEncoder +) + +// NewEncoderID returns a unique attribute encoder ID. It should be called +// once per each type of attribute encoder. Preferably in init() or in var +// definition. +func NewEncoderID() EncoderID { + return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} +} + +// DefaultEncoder returns an attribute encoder that encodes attributes in such +// a way that each escaped attribute's key is followed by an equal sign and +// then by an escaped attribute's value. All key-value pairs are separated by +// a comma. +// +// Escaping is done by prepending a backslash before either a backslash, equal +// sign or a comma. +func DefaultEncoder() Encoder { + defaultEncoderOnce.Do(func() { + defaultEncoderInstance = &defaultAttrEncoder{ + pool: sync.Pool{ + New: func() interface{} { + return &bytes.Buffer{} + }, + }, + } + }) + return defaultEncoderInstance +} + +// Encode is a part of an implementation of the AttributeEncoder interface. +func (d *defaultAttrEncoder) Encode(iter Iterator) string { + buf := d.pool.Get().(*bytes.Buffer) + defer d.pool.Put(buf) + buf.Reset() + + for iter.Next() { + i, keyValue := iter.IndexedAttribute() + if i > 0 { + _, _ = buf.WriteRune(',') + } + copyAndEscape(buf, string(keyValue.Key)) + + _, _ = buf.WriteRune('=') + + if keyValue.Value.Type() == STRING { + copyAndEscape(buf, keyValue.Value.AsString()) + } else { + _, _ = buf.WriteString(keyValue.Value.Emit()) + } + } + return buf.String() +} + +// ID is a part of an implementation of the AttributeEncoder interface. +func (*defaultAttrEncoder) ID() EncoderID { + return defaultEncoderID +} + +// copyAndEscape escapes `=`, `,` and its own escape character (`\`), +// making the default encoding unique. +func copyAndEscape(buf *bytes.Buffer, val string) { + for _, ch := range val { + switch ch { + case '=', ',', escapeChar: + _, _ = buf.WriteRune(escapeChar) + } + _, _ = buf.WriteRune(ch) + } +} + +// Valid returns true if this encoder ID was allocated by +// `NewEncoderID`. Invalid encoder IDs will not be cached. +func (id EncoderID) Valid() bool { + return id.value != 0 +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go new file mode 100644 index 000000000..841b271fb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/iterator.go @@ -0,0 +1,161 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +// Iterator allows iterating over the set of attributes in order, sorted by +// key. +type Iterator struct { + storage *Set + idx int +} + +// MergeIterator supports iterating over two sets of attributes while +// eliminating duplicate values from the combined set. The first iterator +// value takes precedence. +type MergeIterator struct { + one oneIterator + two oneIterator + current KeyValue +} + +type oneIterator struct { + iter Iterator + done bool + attr KeyValue +} + +// Next moves the iterator to the next position. Returns false if there are no +// more attributes. +func (i *Iterator) Next() bool { + i.idx++ + return i.idx < i.Len() +} + +// Label returns current KeyValue. Must be called only after Next returns +// true. +// +// Deprecated: Use Attribute instead. +func (i *Iterator) Label() KeyValue { + return i.Attribute() +} + +// Attribute returns the current KeyValue of the Iterator. It must be called +// only after Next returns true. +func (i *Iterator) Attribute() KeyValue { + kv, _ := i.storage.Get(i.idx) + return kv +} + +// IndexedLabel returns current index and attribute. Must be called only +// after Next returns true. +// +// Deprecated: Use IndexedAttribute instead. +func (i *Iterator) IndexedLabel() (int, KeyValue) { + return i.idx, i.Attribute() +} + +// IndexedAttribute returns current index and attribute. Must be called only +// after Next returns true. +func (i *Iterator) IndexedAttribute() (int, KeyValue) { + return i.idx, i.Attribute() +} + +// Len returns a number of attributes in the iterated set. +func (i *Iterator) Len() int { + return i.storage.Len() +} + +// ToSlice is a convenience function that creates a slice of attributes from +// the passed iterator. The iterator is set up to start from the beginning +// before creating the slice. +func (i *Iterator) ToSlice() []KeyValue { + l := i.Len() + if l == 0 { + return nil + } + i.idx = -1 + slice := make([]KeyValue, 0, l) + for i.Next() { + slice = append(slice, i.Attribute()) + } + return slice +} + +// NewMergeIterator returns a MergeIterator for merging two attribute sets. +// Duplicates are resolved by taking the value from the first set. +func NewMergeIterator(s1, s2 *Set) MergeIterator { + mi := MergeIterator{ + one: makeOne(s1.Iter()), + two: makeOne(s2.Iter()), + } + return mi +} + +func makeOne(iter Iterator) oneIterator { + oi := oneIterator{ + iter: iter, + } + oi.advance() + return oi +} + +func (oi *oneIterator) advance() { + if oi.done = !oi.iter.Next(); !oi.done { + oi.attr = oi.iter.Attribute() + } +} + +// Next returns true if there is another attribute available. +func (m *MergeIterator) Next() bool { + if m.one.done && m.two.done { + return false + } + if m.one.done { + m.current = m.two.attr + m.two.advance() + return true + } + if m.two.done { + m.current = m.one.attr + m.one.advance() + return true + } + if m.one.attr.Key == m.two.attr.Key { + m.current = m.one.attr // first iterator attribute value wins + m.one.advance() + m.two.advance() + return true + } + if m.one.attr.Key < m.two.attr.Key { + m.current = m.one.attr + m.one.advance() + return true + } + m.current = m.two.attr + m.two.advance() + return true +} + +// Label returns the current value after Next() returns true. +// +// Deprecated: Use Attribute instead. +func (m *MergeIterator) Label() KeyValue { + return m.current +} + +// Attribute returns the current value after Next() returns true. +func (m *MergeIterator) Attribute() KeyValue { + return m.current +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go new file mode 100644 index 000000000..0656a04e4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/key.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +// Key represents the key part in key-value pairs. It's a string. The +// allowed character set in the key depends on the use of the key. +type Key string + +// Bool creates a KeyValue instance with a BOOL Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Bool(name, value). +func (k Key) Bool(v bool) KeyValue { + return KeyValue{ + Key: k, + Value: BoolValue(v), + } +} + +// BoolSlice creates a KeyValue instance with a BOOLSLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- BoolSlice(name, value). +func (k Key) BoolSlice(v []bool) KeyValue { + return KeyValue{ + Key: k, + Value: BoolSliceValue(v), + } +} + +// Int creates a KeyValue instance with an INT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int(name, value). +func (k Key) Int(v int) KeyValue { + return KeyValue{ + Key: k, + Value: IntValue(v), + } +} + +// IntSlice creates a KeyValue instance with an INT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- IntSlice(name, value). +func (k Key) IntSlice(v []int) KeyValue { + return KeyValue{ + Key: k, + Value: IntSliceValue(v), + } +} + +// Int64 creates a KeyValue instance with an INT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int64(name, value). +func (k Key) Int64(v int64) KeyValue { + return KeyValue{ + Key: k, + Value: Int64Value(v), + } +} + +// Int64Slice creates a KeyValue instance with an INT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Int64Slice(name, value). +func (k Key) Int64Slice(v []int64) KeyValue { + return KeyValue{ + Key: k, + Value: Int64SliceValue(v), + } +} + +// Float64 creates a KeyValue instance with a FLOAT64 Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Float64(name, value). +func (k Key) Float64(v float64) KeyValue { + return KeyValue{ + Key: k, + Value: Float64Value(v), + } +} + +// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- Float64(name, value). +func (k Key) Float64Slice(v []float64) KeyValue { + return KeyValue{ + Key: k, + Value: Float64SliceValue(v), + } +} + +// String creates a KeyValue instance with a STRING Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- String(name, value). +func (k Key) String(v string) KeyValue { + return KeyValue{ + Key: k, + Value: StringValue(v), + } +} + +// StringSlice creates a KeyValue instance with a STRINGSLICE Value. +// +// If creating both a key and value at the same time, use the provided +// convenience function instead -- StringSlice(name, value). +func (k Key) StringSlice(v []string) KeyValue { + return KeyValue{ + Key: k, + Value: StringSliceValue(v), + } +} + +// Defined returns true for non-empty keys. +func (k Key) Defined() bool { + return len(k) != 0 +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go new file mode 100644 index 000000000..1ddf3ce05 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/kv.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "fmt" +) + +// KeyValue holds a key and value pair. +type KeyValue struct { + Key Key + Value Value +} + +// Valid returns if kv is a valid OpenTelemetry attribute. +func (kv KeyValue) Valid() bool { + return kv.Key.Defined() && kv.Value.Type() != INVALID +} + +// Bool creates a KeyValue with a BOOL Value type. +func Bool(k string, v bool) KeyValue { + return Key(k).Bool(v) +} + +// BoolSlice creates a KeyValue with a BOOLSLICE Value type. +func BoolSlice(k string, v []bool) KeyValue { + return Key(k).BoolSlice(v) +} + +// Int creates a KeyValue with an INT64 Value type. +func Int(k string, v int) KeyValue { + return Key(k).Int(v) +} + +// IntSlice creates a KeyValue with an INT64SLICE Value type. +func IntSlice(k string, v []int) KeyValue { + return Key(k).IntSlice(v) +} + +// Int64 creates a KeyValue with an INT64 Value type. +func Int64(k string, v int64) KeyValue { + return Key(k).Int64(v) +} + +// Int64Slice creates a KeyValue with an INT64SLICE Value type. +func Int64Slice(k string, v []int64) KeyValue { + return Key(k).Int64Slice(v) +} + +// Float64 creates a KeyValue with a FLOAT64 Value type. +func Float64(k string, v float64) KeyValue { + return Key(k).Float64(v) +} + +// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type. +func Float64Slice(k string, v []float64) KeyValue { + return Key(k).Float64Slice(v) +} + +// String creates a KeyValue with a STRING Value type. +func String(k, v string) KeyValue { + return Key(k).String(v) +} + +// StringSlice creates a KeyValue with a STRINGSLICE Value type. +func StringSlice(k string, v []string) KeyValue { + return Key(k).StringSlice(v) +} + +// Stringer creates a new key-value pair with a passed name and a string +// value generated by the passed Stringer interface. +func Stringer(k string, v fmt.Stringer) KeyValue { + return Key(k).String(v.String()) +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go new file mode 100644 index 000000000..26be59832 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/set.go @@ -0,0 +1,424 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "encoding/json" + "reflect" + "sort" +) + +type ( + // Set is the representation for a distinct attribute set. It manages an + // immutable set of attributes, with an internal cache for storing + // attribute encodings. + // + // This type supports the Equivalent method of comparison using values of + // type Distinct. + Set struct { + equivalent Distinct + } + + // Distinct wraps a variable-size array of KeyValue, constructed with keys + // in sorted order. This can be used as a map key or for equality checking + // between Sets. + Distinct struct { + iface interface{} + } + + // Filter supports removing certain attributes from attribute sets. When + // the filter returns true, the attribute will be kept in the filtered + // attribute set. When the filter returns false, the attribute is excluded + // from the filtered attribute set, and the attribute instead appears in + // the removed list of excluded attributes. + Filter func(KeyValue) bool + + // Sortable implements sort.Interface, used for sorting KeyValue. This is + // an exported type to support a memory optimization. A pointer to one of + // these is needed for the call to sort.Stable(), which the caller may + // provide in order to avoid an allocation. See NewSetWithSortable(). + Sortable []KeyValue +) + +var ( + // keyValueType is used in computeDistinctReflect. + keyValueType = reflect.TypeOf(KeyValue{}) + + // emptySet is returned for empty attribute sets. + emptySet = &Set{ + equivalent: Distinct{ + iface: [0]KeyValue{}, + }, + } +) + +// EmptySet returns a reference to a Set with no elements. +// +// This is a convenience provided for optimized calling utility. +func EmptySet() *Set { + return emptySet +} + +// reflectValue abbreviates reflect.ValueOf(d). +func (d Distinct) reflectValue() reflect.Value { + return reflect.ValueOf(d.iface) +} + +// Valid returns true if this value refers to a valid Set. +func (d Distinct) Valid() bool { + return d.iface != nil +} + +// Len returns the number of attributes in this set. +func (l *Set) Len() int { + if l == nil || !l.equivalent.Valid() { + return 0 + } + return l.equivalent.reflectValue().Len() +} + +// Get returns the KeyValue at ordered position idx in this set. +func (l *Set) Get(idx int) (KeyValue, bool) { + if l == nil { + return KeyValue{}, false + } + value := l.equivalent.reflectValue() + + if idx >= 0 && idx < value.Len() { + // Note: The Go compiler successfully avoids an allocation for + // the interface{} conversion here: + return value.Index(idx).Interface().(KeyValue), true + } + + return KeyValue{}, false +} + +// Value returns the value of a specified key in this set. +func (l *Set) Value(k Key) (Value, bool) { + if l == nil { + return Value{}, false + } + rValue := l.equivalent.reflectValue() + vlen := rValue.Len() + + idx := sort.Search(vlen, func(idx int) bool { + return rValue.Index(idx).Interface().(KeyValue).Key >= k + }) + if idx >= vlen { + return Value{}, false + } + keyValue := rValue.Index(idx).Interface().(KeyValue) + if k == keyValue.Key { + return keyValue.Value, true + } + return Value{}, false +} + +// HasValue tests whether a key is defined in this set. +func (l *Set) HasValue(k Key) bool { + if l == nil { + return false + } + _, ok := l.Value(k) + return ok +} + +// Iter returns an iterator for visiting the attributes in this set. +func (l *Set) Iter() Iterator { + return Iterator{ + storage: l, + idx: -1, + } +} + +// ToSlice returns the set of attributes belonging to this set, sorted, where +// keys appear no more than once. +func (l *Set) ToSlice() []KeyValue { + iter := l.Iter() + return iter.ToSlice() +} + +// Equivalent returns a value that may be used as a map key. The Distinct type +// guarantees that the result will equal the equivalent. Distinct value of any +// attribute set with the same elements as this, where sets are made unique by +// choosing the last value in the input for any given key. +func (l *Set) Equivalent() Distinct { + if l == nil || !l.equivalent.Valid() { + return emptySet.equivalent + } + return l.equivalent +} + +// Equals returns true if the argument set is equivalent to this set. +func (l *Set) Equals(o *Set) bool { + return l.Equivalent() == o.Equivalent() +} + +// Encoded returns the encoded form of this set, according to encoder. +func (l *Set) Encoded(encoder Encoder) string { + if l == nil || encoder == nil { + return "" + } + + return encoder.Encode(l.Iter()) +} + +func empty() Set { + return Set{ + equivalent: emptySet.equivalent, + } +} + +// NewSet returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// Except for empty sets, this method adds an additional allocation compared +// with calls that include a Sortable. +func NewSet(kvs ...KeyValue) Set { + // Check for empty set. + if len(kvs) == 0 { + return empty() + } + s, _ := NewSetWithSortableFiltered(kvs, new(Sortable), nil) + return s +} + +// NewSetWithSortable returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// This call includes a Sortable option as a memory optimization. +func NewSetWithSortable(kvs []KeyValue, tmp *Sortable) Set { + // Check for empty set. + if len(kvs) == 0 { + return empty() + } + s, _ := NewSetWithSortableFiltered(kvs, tmp, nil) + return s +} + +// NewSetWithFiltered returns a new Set. See the documentation for +// NewSetWithSortableFiltered for more details. +// +// This call includes a Filter to include/exclude attribute keys from the +// return value. Excluded keys are returned as a slice of attribute values. +func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { + // Check for empty set. + if len(kvs) == 0 { + return empty(), nil + } + return NewSetWithSortableFiltered(kvs, new(Sortable), filter) +} + +// NewSetWithSortableFiltered returns a new Set. +// +// Duplicate keys are eliminated by taking the last value. This +// re-orders the input slice so that unique last-values are contiguous +// at the end of the slice. +// +// This ensures the following: +// +// - Last-value-wins semantics +// - Caller sees the reordering, but doesn't lose values +// - Repeated call preserve last-value wins. +// +// Note that methods are defined on Set, although this returns Set. Callers +// can avoid memory allocations by: +// +// - allocating a Sortable for use as a temporary in this method +// - allocating a Set for storing the return value of this constructor. +// +// The result maintains a cache of encoded attributes, by attribute.EncoderID. +// This value should not be copied after its first use. +// +// The second []KeyValue return value is a list of attributes that were +// excluded by the Filter (if non-nil). +func NewSetWithSortableFiltered(kvs []KeyValue, tmp *Sortable, filter Filter) (Set, []KeyValue) { + // Check for empty set. + if len(kvs) == 0 { + return empty(), nil + } + + *tmp = kvs + + // Stable sort so the following de-duplication can implement + // last-value-wins semantics. + sort.Stable(tmp) + + *tmp = nil + + position := len(kvs) - 1 + offset := position - 1 + + // The requirements stated above require that the stable + // result be placed in the end of the input slice, while + // overwritten values are swapped to the beginning. + // + // De-duplicate with last-value-wins semantics. Preserve + // duplicate values at the beginning of the input slice. + for ; offset >= 0; offset-- { + if kvs[offset].Key == kvs[position].Key { + continue + } + position-- + kvs[offset], kvs[position] = kvs[position], kvs[offset] + } + if filter != nil { + return filterSet(kvs[position:], filter) + } + return Set{ + equivalent: computeDistinct(kvs[position:]), + }, nil +} + +// filterSet reorders kvs so that included keys are contiguous at the end of +// the slice, while excluded keys precede the included keys. +func filterSet(kvs []KeyValue, filter Filter) (Set, []KeyValue) { + var excluded []KeyValue + + // Move attributes that do not match the filter so they're adjacent before + // calling computeDistinct(). + distinctPosition := len(kvs) + + // Swap indistinct keys forward and distinct keys toward the + // end of the slice. + offset := len(kvs) - 1 + for ; offset >= 0; offset-- { + if filter(kvs[offset]) { + distinctPosition-- + kvs[offset], kvs[distinctPosition] = kvs[distinctPosition], kvs[offset] + continue + } + } + excluded = kvs[:distinctPosition] + + return Set{ + equivalent: computeDistinct(kvs[distinctPosition:]), + }, excluded +} + +// Filter returns a filtered copy of this Set. See the documentation for +// NewSetWithSortableFiltered for more details. +func (l *Set) Filter(re Filter) (Set, []KeyValue) { + if re == nil { + return Set{ + equivalent: l.equivalent, + }, nil + } + + // Note: This could be refactored to avoid the temporary slice + // allocation, if it proves to be expensive. + return filterSet(l.ToSlice(), re) +} + +// computeDistinct returns a Distinct using either the fixed- or +// reflect-oriented code path, depending on the size of the input. The input +// slice is assumed to already be sorted and de-duplicated. +func computeDistinct(kvs []KeyValue) Distinct { + iface := computeDistinctFixed(kvs) + if iface == nil { + iface = computeDistinctReflect(kvs) + } + return Distinct{ + iface: iface, + } +} + +// computeDistinctFixed computes a Distinct for small slices. It returns nil +// if the input is too large for this code path. +func computeDistinctFixed(kvs []KeyValue) interface{} { + switch len(kvs) { + case 1: + ptr := new([1]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 2: + ptr := new([2]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 3: + ptr := new([3]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 4: + ptr := new([4]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 5: + ptr := new([5]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 6: + ptr := new([6]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 7: + ptr := new([7]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 8: + ptr := new([8]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 9: + ptr := new([9]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + case 10: + ptr := new([10]KeyValue) + copy((*ptr)[:], kvs) + return *ptr + default: + return nil + } +} + +// computeDistinctReflect computes a Distinct using reflection, works for any +// size input. +func computeDistinctReflect(kvs []KeyValue) interface{} { + at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() + for i, keyValue := range kvs { + *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue + } + return at.Interface() +} + +// MarshalJSON returns the JSON encoding of the Set. +func (l *Set) MarshalJSON() ([]byte, error) { + return json.Marshal(l.equivalent.iface) +} + +// MarshalLog is the marshaling function used by the logging system to represent this exporter. +func (l Set) MarshalLog() interface{} { + kvs := make(map[string]string) + for _, kv := range l.ToSlice() { + kvs[string(kv.Key)] = kv.Value.Emit() + } + return kvs +} + +// Len implements sort.Interface. +func (l *Sortable) Len() int { + return len(*l) +} + +// Swap implements sort.Interface. +func (l *Sortable) Swap(i, j int) { + (*l)[i], (*l)[j] = (*l)[j], (*l)[i] +} + +// Less implements sort.Interface. +func (l *Sortable) Less(i, j int) bool { + return (*l)[i].Key < (*l)[j].Key +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go new file mode 100644 index 000000000..e584b2477 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/type_string.go @@ -0,0 +1,31 @@ +// Code generated by "stringer -type=Type"; DO NOT EDIT. + +package attribute + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[INVALID-0] + _ = x[BOOL-1] + _ = x[INT64-2] + _ = x[FLOAT64-3] + _ = x[STRING-4] + _ = x[BOOLSLICE-5] + _ = x[INT64SLICE-6] + _ = x[FLOAT64SLICE-7] + _ = x[STRINGSLICE-8] +} + +const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" + +var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} + +func (i Type) String() string { + if i < 0 || i >= Type(len(_Type_index)-1) { + return "Type(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Type_name[_Type_index[i]:_Type_index[i+1]] +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go new file mode 100644 index 000000000..34a4e548d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/value.go @@ -0,0 +1,270 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "encoding/json" + "fmt" + "reflect" + "strconv" + + "go.opentelemetry.io/otel/internal" + "go.opentelemetry.io/otel/internal/attribute" +) + +//go:generate stringer -type=Type + +// Type describes the type of the data Value holds. +type Type int // nolint: revive // redefines builtin Type. + +// Value represents the value part in key-value pairs. +type Value struct { + vtype Type + numeric uint64 + stringly string + slice interface{} +} + +const ( + // INVALID is used for a Value with no value set. + INVALID Type = iota + // BOOL is a boolean Type Value. + BOOL + // INT64 is a 64-bit signed integral Type Value. + INT64 + // FLOAT64 is a 64-bit floating point Type Value. + FLOAT64 + // STRING is a string Type Value. + STRING + // BOOLSLICE is a slice of booleans Type Value. + BOOLSLICE + // INT64SLICE is a slice of 64-bit signed integral numbers Type Value. + INT64SLICE + // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value. + FLOAT64SLICE + // STRINGSLICE is a slice of strings Type Value. + STRINGSLICE +) + +// BoolValue creates a BOOL Value. +func BoolValue(v bool) Value { + return Value{ + vtype: BOOL, + numeric: internal.BoolToRaw(v), + } +} + +// BoolSliceValue creates a BOOLSLICE Value. +func BoolSliceValue(v []bool) Value { + return Value{vtype: BOOLSLICE, slice: attribute.SliceValue(v)} +} + +// IntValue creates an INT64 Value. +func IntValue(v int) Value { + return Int64Value(int64(v)) +} + +// IntSliceValue creates an INTSLICE Value. +func IntSliceValue(v []int) Value { + var int64Val int64 + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) + for i, val := range v { + cp.Elem().Index(i).SetInt(int64(val)) + } + return Value{ + vtype: INT64SLICE, + slice: cp.Elem().Interface(), + } +} + +// Int64Value creates an INT64 Value. +func Int64Value(v int64) Value { + return Value{ + vtype: INT64, + numeric: internal.Int64ToRaw(v), + } +} + +// Int64SliceValue creates an INT64SLICE Value. +func Int64SliceValue(v []int64) Value { + return Value{vtype: INT64SLICE, slice: attribute.SliceValue(v)} +} + +// Float64Value creates a FLOAT64 Value. +func Float64Value(v float64) Value { + return Value{ + vtype: FLOAT64, + numeric: internal.Float64ToRaw(v), + } +} + +// Float64SliceValue creates a FLOAT64SLICE Value. +func Float64SliceValue(v []float64) Value { + return Value{vtype: FLOAT64SLICE, slice: attribute.SliceValue(v)} +} + +// StringValue creates a STRING Value. +func StringValue(v string) Value { + return Value{ + vtype: STRING, + stringly: v, + } +} + +// StringSliceValue creates a STRINGSLICE Value. +func StringSliceValue(v []string) Value { + return Value{vtype: STRINGSLICE, slice: attribute.SliceValue(v)} +} + +// Type returns a type of the Value. +func (v Value) Type() Type { + return v.vtype +} + +// AsBool returns the bool value. Make sure that the Value's type is +// BOOL. +func (v Value) AsBool() bool { + return internal.RawToBool(v.numeric) +} + +// AsBoolSlice returns the []bool value. Make sure that the Value's type is +// BOOLSLICE. +func (v Value) AsBoolSlice() []bool { + if v.vtype != BOOLSLICE { + return nil + } + return v.asBoolSlice() +} + +func (v Value) asBoolSlice() []bool { + return attribute.AsSlice[bool](v.slice) +} + +// AsInt64 returns the int64 value. Make sure that the Value's type is +// INT64. +func (v Value) AsInt64() int64 { + return internal.RawToInt64(v.numeric) +} + +// AsInt64Slice returns the []int64 value. Make sure that the Value's type is +// INT64SLICE. +func (v Value) AsInt64Slice() []int64 { + if v.vtype != INT64SLICE { + return nil + } + return v.asInt64Slice() +} + +func (v Value) asInt64Slice() []int64 { + return attribute.AsSlice[int64](v.slice) +} + +// AsFloat64 returns the float64 value. Make sure that the Value's +// type is FLOAT64. +func (v Value) AsFloat64() float64 { + return internal.RawToFloat64(v.numeric) +} + +// AsFloat64Slice returns the []float64 value. Make sure that the Value's type is +// FLOAT64SLICE. +func (v Value) AsFloat64Slice() []float64 { + if v.vtype != FLOAT64SLICE { + return nil + } + return v.asFloat64Slice() +} + +func (v Value) asFloat64Slice() []float64 { + return attribute.AsSlice[float64](v.slice) +} + +// AsString returns the string value. Make sure that the Value's type +// is STRING. +func (v Value) AsString() string { + return v.stringly +} + +// AsStringSlice returns the []string value. Make sure that the Value's type is +// STRINGSLICE. +func (v Value) AsStringSlice() []string { + if v.vtype != STRINGSLICE { + return nil + } + return v.asStringSlice() +} + +func (v Value) asStringSlice() []string { + return attribute.AsSlice[string](v.slice) +} + +type unknownValueType struct{} + +// AsInterface returns Value's data as interface{}. +func (v Value) AsInterface() interface{} { + switch v.Type() { + case BOOL: + return v.AsBool() + case BOOLSLICE: + return v.asBoolSlice() + case INT64: + return v.AsInt64() + case INT64SLICE: + return v.asInt64Slice() + case FLOAT64: + return v.AsFloat64() + case FLOAT64SLICE: + return v.asFloat64Slice() + case STRING: + return v.stringly + case STRINGSLICE: + return v.asStringSlice() + } + return unknownValueType{} +} + +// Emit returns a string representation of Value's data. +func (v Value) Emit() string { + switch v.Type() { + case BOOLSLICE: + return fmt.Sprint(v.asBoolSlice()) + case BOOL: + return strconv.FormatBool(v.AsBool()) + case INT64SLICE: + return fmt.Sprint(v.asInt64Slice()) + case INT64: + return strconv.FormatInt(v.AsInt64(), 10) + case FLOAT64SLICE: + return fmt.Sprint(v.asFloat64Slice()) + case FLOAT64: + return fmt.Sprint(v.AsFloat64()) + case STRINGSLICE: + return fmt.Sprint(v.asStringSlice()) + case STRING: + return v.stringly + default: + return "unknown" + } +} + +// MarshalJSON returns the JSON encoding of the Value. +func (v Value) MarshalJSON() ([]byte, error) { + var jsonVal struct { + Type string + Value interface{} + } + jsonVal.Type = v.Type().String() + jsonVal.Value = v.AsInterface() + return json.Marshal(jsonVal) +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go new file mode 100644 index 000000000..a36db8f8d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -0,0 +1,570 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package baggage // import "go.opentelemetry.io/otel/baggage" + +import ( + "errors" + "fmt" + "net/url" + "regexp" + "strings" + + "go.opentelemetry.io/otel/internal/baggage" +) + +const ( + maxMembers = 180 + maxBytesPerMembers = 4096 + maxBytesPerBaggageString = 8192 + + listDelimiter = "," + keyValueDelimiter = "=" + propertyDelimiter = ";" + + keyDef = `([\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5a\x5e-\x7a\x7c\x7e]+)` + valueDef = `([\x21\x23-\x2b\x2d-\x3a\x3c-\x5B\x5D-\x7e]*)` + keyValueDef = `\s*` + keyDef + `\s*` + keyValueDelimiter + `\s*` + valueDef + `\s*` +) + +var ( + keyRe = regexp.MustCompile(`^` + keyDef + `$`) + valueRe = regexp.MustCompile(`^` + valueDef + `$`) + propertyRe = regexp.MustCompile(`^(?:\s*` + keyDef + `\s*|` + keyValueDef + `)$`) +) + +var ( + errInvalidKey = errors.New("invalid key") + errInvalidValue = errors.New("invalid value") + errInvalidProperty = errors.New("invalid baggage list-member property") + errInvalidMember = errors.New("invalid baggage list-member") + errMemberNumber = errors.New("too many list-members in baggage-string") + errMemberBytes = errors.New("list-member too large") + errBaggageBytes = errors.New("baggage-string too large") +) + +// Property is an additional metadata entry for a baggage list-member. +type Property struct { + key, value string + + // hasValue indicates if a zero-value value means the property does not + // have a value or if it was the zero-value. + hasValue bool + + // hasData indicates whether the created property contains data or not. + // Properties that do not contain data are invalid with no other check + // required. + hasData bool +} + +// NewKeyProperty returns a new Property for key. +// +// If key is invalid, an error will be returned. +func NewKeyProperty(key string) (Property, error) { + if !keyRe.MatchString(key) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + + p := Property{key: key, hasData: true} + return p, nil +} + +// NewKeyValueProperty returns a new Property for key with value. +// +// If key or value are invalid, an error will be returned. +func NewKeyValueProperty(key, value string) (Property, error) { + if !keyRe.MatchString(key) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + if !valueRe.MatchString(value) { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + + p := Property{ + key: key, + value: value, + hasValue: true, + hasData: true, + } + return p, nil +} + +func newInvalidProperty() Property { + return Property{} +} + +// parseProperty attempts to decode a Property from the passed string. It +// returns an error if the input is invalid according to the W3C Baggage +// specification. +func parseProperty(property string) (Property, error) { + if property == "" { + return newInvalidProperty(), nil + } + + match := propertyRe.FindStringSubmatch(property) + if len(match) != 4 { + return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property) + } + + p := Property{hasData: true} + if match[1] != "" { + p.key = match[1] + } else { + p.key = match[2] + p.value = match[3] + p.hasValue = true + } + + return p, nil +} + +// validate ensures p conforms to the W3C Baggage specification, returning an +// error otherwise. +func (p Property) validate() error { + errFunc := func(err error) error { + return fmt.Errorf("invalid property: %w", err) + } + + if !p.hasData { + return errFunc(fmt.Errorf("%w: %q", errInvalidProperty, p)) + } + + if !keyRe.MatchString(p.key) { + return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key)) + } + if p.hasValue && !valueRe.MatchString(p.value) { + return errFunc(fmt.Errorf("%w: %q", errInvalidValue, p.value)) + } + if !p.hasValue && p.value != "" { + return errFunc(errors.New("inconsistent value")) + } + return nil +} + +// Key returns the Property key. +func (p Property) Key() string { + return p.key +} + +// Value returns the Property value. Additionally, a boolean value is returned +// indicating if the returned value is the empty if the Property has a value +// that is empty or if the value is not set. +func (p Property) Value() (string, bool) { + return p.value, p.hasValue +} + +// String encodes Property into a string compliant with the W3C Baggage +// specification. +func (p Property) String() string { + if p.hasValue { + return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, p.value) + } + return p.key +} + +type properties []Property + +func fromInternalProperties(iProps []baggage.Property) properties { + if len(iProps) == 0 { + return nil + } + + props := make(properties, len(iProps)) + for i, p := range iProps { + props[i] = Property{ + key: p.Key, + value: p.Value, + hasValue: p.HasValue, + } + } + return props +} + +func (p properties) asInternal() []baggage.Property { + if len(p) == 0 { + return nil + } + + iProps := make([]baggage.Property, len(p)) + for i, prop := range p { + iProps[i] = baggage.Property{ + Key: prop.key, + Value: prop.value, + HasValue: prop.hasValue, + } + } + return iProps +} + +func (p properties) Copy() properties { + if len(p) == 0 { + return nil + } + + props := make(properties, len(p)) + copy(props, p) + return props +} + +// validate ensures each Property in p conforms to the W3C Baggage +// specification, returning an error otherwise. +func (p properties) validate() error { + for _, prop := range p { + if err := prop.validate(); err != nil { + return err + } + } + return nil +} + +// String encodes properties into a string compliant with the W3C Baggage +// specification. +func (p properties) String() string { + props := make([]string, len(p)) + for i, prop := range p { + props[i] = prop.String() + } + return strings.Join(props, propertyDelimiter) +} + +// Member is a list-member of a baggage-string as defined by the W3C Baggage +// specification. +type Member struct { + key, value string + properties properties + + // hasData indicates whether the created property contains data or not. + // Properties that do not contain data are invalid with no other check + // required. + hasData bool +} + +// NewMember returns a new Member from the passed arguments. The key will be +// used directly while the value will be url decoded after validation. An error +// is returned if the created Member would be invalid according to the W3C +// Baggage specification. +func NewMember(key, value string, props ...Property) (Member, error) { + m := Member{ + key: key, + value: value, + properties: properties(props).Copy(), + hasData: true, + } + if err := m.validate(); err != nil { + return newInvalidMember(), err + } + decodedValue, err := url.QueryUnescape(value) + if err != nil { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + m.value = decodedValue + return m, nil +} + +func newInvalidMember() Member { + return Member{} +} + +// parseMember attempts to decode a Member from the passed string. It returns +// an error if the input is invalid according to the W3C Baggage +// specification. +func parseMember(member string) (Member, error) { + if n := len(member); n > maxBytesPerMembers { + return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n) + } + + var ( + key, value string + props properties + ) + + parts := strings.SplitN(member, propertyDelimiter, 2) + switch len(parts) { + case 2: + // Parse the member properties. + for _, pStr := range strings.Split(parts[1], propertyDelimiter) { + p, err := parseProperty(pStr) + if err != nil { + return newInvalidMember(), err + } + props = append(props, p) + } + fallthrough + case 1: + // Parse the member key/value pair. + + // Take into account a value can contain equal signs (=). + kv := strings.SplitN(parts[0], keyValueDelimiter, 2) + if len(kv) != 2 { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidMember, member) + } + // "Leading and trailing whitespaces are allowed but MUST be trimmed + // when converting the header into a data structure." + key = strings.TrimSpace(kv[0]) + var err error + value, err = url.QueryUnescape(strings.TrimSpace(kv[1])) + if err != nil { + return newInvalidMember(), fmt.Errorf("%w: %q", err, value) + } + if !keyRe.MatchString(key) { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key) + } + if !valueRe.MatchString(value) { + return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) + } + default: + // This should never happen unless a developer has changed the string + // splitting somehow. Panic instead of failing silently and allowing + // the bug to slip past the CI checks. + panic("failed to parse baggage member") + } + + return Member{key: key, value: value, properties: props, hasData: true}, nil +} + +// validate ensures m conforms to the W3C Baggage specification. +// A key is just an ASCII string, but a value must be URL encoded UTF-8, +// returning an error otherwise. +func (m Member) validate() error { + if !m.hasData { + return fmt.Errorf("%w: %q", errInvalidMember, m) + } + + if !keyRe.MatchString(m.key) { + return fmt.Errorf("%w: %q", errInvalidKey, m.key) + } + if !valueRe.MatchString(m.value) { + return fmt.Errorf("%w: %q", errInvalidValue, m.value) + } + return m.properties.validate() +} + +// Key returns the Member key. +func (m Member) Key() string { return m.key } + +// Value returns the Member value. +func (m Member) Value() string { return m.value } + +// Properties returns a copy of the Member properties. +func (m Member) Properties() []Property { return m.properties.Copy() } + +// String encodes Member into a string compliant with the W3C Baggage +// specification. +func (m Member) String() string { + // A key is just an ASCII string, but a value is URL encoded UTF-8. + s := fmt.Sprintf("%s%s%s", m.key, keyValueDelimiter, url.QueryEscape(m.value)) + if len(m.properties) > 0 { + s = fmt.Sprintf("%s%s%s", s, propertyDelimiter, m.properties.String()) + } + return s +} + +// Baggage is a list of baggage members representing the baggage-string as +// defined by the W3C Baggage specification. +type Baggage struct { //nolint:golint + list baggage.List +} + +// New returns a new valid Baggage. It returns an error if it results in a +// Baggage exceeding limits set in that specification. +// +// It expects all the provided members to have already been validated. +func New(members ...Member) (Baggage, error) { + if len(members) == 0 { + return Baggage{}, nil + } + + b := make(baggage.List) + for _, m := range members { + if !m.hasData { + return Baggage{}, errInvalidMember + } + + // OpenTelemetry resolves duplicates by last-one-wins. + b[m.key] = baggage.Item{ + Value: m.value, + Properties: m.properties.asInternal(), + } + } + + // Check member numbers after deduplication. + if len(b) > maxMembers { + return Baggage{}, errMemberNumber + } + + bag := Baggage{b} + if n := len(bag.String()); n > maxBytesPerBaggageString { + return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) + } + + return bag, nil +} + +// Parse attempts to decode a baggage-string from the passed string. It +// returns an error if the input is invalid according to the W3C Baggage +// specification. +// +// If there are duplicate list-members contained in baggage, the last one +// defined (reading left-to-right) will be the only one kept. This diverges +// from the W3C Baggage specification which allows duplicate list-members, but +// conforms to the OpenTelemetry Baggage specification. +func Parse(bStr string) (Baggage, error) { + if bStr == "" { + return Baggage{}, nil + } + + if n := len(bStr); n > maxBytesPerBaggageString { + return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) + } + + b := make(baggage.List) + for _, memberStr := range strings.Split(bStr, listDelimiter) { + m, err := parseMember(memberStr) + if err != nil { + return Baggage{}, err + } + // OpenTelemetry resolves duplicates by last-one-wins. + b[m.key] = baggage.Item{ + Value: m.value, + Properties: m.properties.asInternal(), + } + } + + // OpenTelemetry does not allow for duplicate list-members, but the W3C + // specification does. Now that we have deduplicated, ensure the baggage + // does not exceed list-member limits. + if len(b) > maxMembers { + return Baggage{}, errMemberNumber + } + + return Baggage{b}, nil +} + +// Member returns the baggage list-member identified by key. +// +// If there is no list-member matching the passed key the returned Member will +// be a zero-value Member. +// The returned member is not validated, as we assume the validation happened +// when it was added to the Baggage. +func (b Baggage) Member(key string) Member { + v, ok := b.list[key] + if !ok { + // We do not need to worry about distinguishing between the situation + // where a zero-valued Member is included in the Baggage because a + // zero-valued Member is invalid according to the W3C Baggage + // specification (it has an empty key). + return newInvalidMember() + } + + return Member{ + key: key, + value: v.Value, + properties: fromInternalProperties(v.Properties), + hasData: true, + } +} + +// Members returns all the baggage list-members. +// The order of the returned list-members does not have significance. +// +// The returned members are not validated, as we assume the validation happened +// when they were added to the Baggage. +func (b Baggage) Members() []Member { + if len(b.list) == 0 { + return nil + } + + members := make([]Member, 0, len(b.list)) + for k, v := range b.list { + members = append(members, Member{ + key: k, + value: v.Value, + properties: fromInternalProperties(v.Properties), + hasData: true, + }) + } + return members +} + +// SetMember returns a copy the Baggage with the member included. If the +// baggage contains a Member with the same key the existing Member is +// replaced. +// +// If member is invalid according to the W3C Baggage specification, an error +// is returned with the original Baggage. +func (b Baggage) SetMember(member Member) (Baggage, error) { + if !member.hasData { + return b, errInvalidMember + } + + n := len(b.list) + if _, ok := b.list[member.key]; !ok { + n++ + } + list := make(baggage.List, n) + + for k, v := range b.list { + // Do not copy if we are just going to overwrite. + if k == member.key { + continue + } + list[k] = v + } + + list[member.key] = baggage.Item{ + Value: member.value, + Properties: member.properties.asInternal(), + } + + return Baggage{list: list}, nil +} + +// DeleteMember returns a copy of the Baggage with the list-member identified +// by key removed. +func (b Baggage) DeleteMember(key string) Baggage { + n := len(b.list) + if _, ok := b.list[key]; ok { + n-- + } + list := make(baggage.List, n) + + for k, v := range b.list { + if k == key { + continue + } + list[k] = v + } + + return Baggage{list: list} +} + +// Len returns the number of list-members in the Baggage. +func (b Baggage) Len() int { + return len(b.list) +} + +// String encodes Baggage into a string compliant with the W3C Baggage +// specification. The returned string will be invalid if the Baggage contains +// any invalid list-members. +func (b Baggage) String() string { + members := make([]string, 0, len(b.list)) + for k, v := range b.list { + members = append(members, Member{ + key: k, + value: v.Value, + properties: fromInternalProperties(v.Properties), + }.String()) + } + return strings.Join(members, listDelimiter) +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go new file mode 100644 index 000000000..24b34b756 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/context.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package baggage // import "go.opentelemetry.io/otel/baggage" + +import ( + "context" + + "go.opentelemetry.io/otel/internal/baggage" +) + +// ContextWithBaggage returns a copy of parent with baggage. +func ContextWithBaggage(parent context.Context, b Baggage) context.Context { + // Delegate so any hooks for the OpenTracing bridge are handled. + return baggage.ContextWithList(parent, b.list) +} + +// ContextWithoutBaggage returns a copy of parent with no baggage. +func ContextWithoutBaggage(parent context.Context) context.Context { + // Delegate so any hooks for the OpenTracing bridge are handled. + return baggage.ContextWithList(parent, nil) +} + +// FromContext returns the baggage contained in ctx. +func FromContext(ctx context.Context) Baggage { + // Delegate so any hooks for the OpenTracing bridge are handled. + return Baggage{list: baggage.ListFromContext(ctx)} +} diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go new file mode 100644 index 000000000..4545100df --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/doc.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package baggage provides functionality for storing and retrieving +baggage items in Go context. For propagating the baggage, see the +go.opentelemetry.io/otel/propagation package. +*/ +package baggage // import "go.opentelemetry.io/otel/baggage" diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go new file mode 100644 index 000000000..587ebae4e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/codes.go @@ -0,0 +1,116 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package codes // import "go.opentelemetry.io/otel/codes" + +import ( + "encoding/json" + "fmt" + "strconv" +) + +const ( + // Unset is the default status code. + Unset Code = 0 + + // Error indicates the operation contains an error. + // + // NOTE: The error code in OTLP is 2. + // The value of this enum is only relevant to the internals + // of the Go SDK. + Error Code = 1 + + // Ok indicates operation has been validated by an Application developers + // or Operator to have completed successfully, or contain no error. + // + // NOTE: The Ok code in OTLP is 1. + // The value of this enum is only relevant to the internals + // of the Go SDK. + Ok Code = 2 + + maxCode = 3 +) + +// Code is an 32-bit representation of a status state. +type Code uint32 + +var codeToStr = map[Code]string{ + Unset: "Unset", + Error: "Error", + Ok: "Ok", +} + +var strToCode = map[string]Code{ + `"Unset"`: Unset, + `"Error"`: Error, + `"Ok"`: Ok, +} + +// String returns the Code as a string. +func (c Code) String() string { + return codeToStr[c] +} + +// UnmarshalJSON unmarshals b into the Code. +// +// This is based on the functionality in the gRPC codes package: +// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 +func (c *Code) UnmarshalJSON(b []byte) error { + // From json.Unmarshaler: By convention, to approximate the behavior of + // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as + // a no-op. + if string(b) == "null" { + return nil + } + if c == nil { + return fmt.Errorf("nil receiver passed to UnmarshalJSON") + } + + var x interface{} + if err := json.Unmarshal(b, &x); err != nil { + return err + } + switch x.(type) { + case string: + if jc, ok := strToCode[string(b)]; ok { + *c = jc + return nil + } + return fmt.Errorf("invalid code: %q", string(b)) + case float64: + if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { + if ci >= maxCode { + return fmt.Errorf("invalid code: %q", ci) + } + + *c = Code(ci) + return nil + } + return fmt.Errorf("invalid code: %q", string(b)) + default: + return fmt.Errorf("invalid code: %q", string(b)) + } +} + +// MarshalJSON returns c as the JSON encoding of c. +func (c *Code) MarshalJSON() ([]byte, error) { + if c == nil { + return []byte("null"), nil + } + str, ok := codeToStr[*c] + if !ok { + return nil, fmt.Errorf("invalid code: %d", *c) + } + return []byte(fmt.Sprintf("%q", str)), nil +} diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go new file mode 100644 index 000000000..df3e0f1b6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/doc.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package codes defines the canonical error codes used by OpenTelemetry. + +It conforms to [the OpenTelemetry +specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#statuscanonicalcode). +*/ +package codes // import "go.opentelemetry.io/otel/codes" diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go new file mode 100644 index 000000000..daa36c89d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/doc.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package otel provides global access to the OpenTelemetry API. The subpackages of +the otel package provide an implementation of the OpenTelemetry API. + +The provided API is used to instrument code and measure data about that code's +performance and operation. The measured data, by default, is not processed or +transmitted anywhere. An implementation of the OpenTelemetry SDK, like the +default SDK implementation (go.opentelemetry.io/otel/sdk), and associated +exporters are used to process and transport this data. + +To read the getting started guide, see https://opentelemetry.io/docs/go/getting-started/. + +To read more about tracing, see go.opentelemetry.io/otel/trace. + +To read more about metrics, see go.opentelemetry.io/otel/metric. + +To read more about propagation, see go.opentelemetry.io/otel/propagation and +go.opentelemetry.io/otel/baggage. +*/ +package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go new file mode 100644 index 000000000..72fad8541 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/error_handler.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +// ErrorHandler handles irremediable events. +type ErrorHandler interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Handle handles any error deemed irremediable by an OpenTelemetry + // component. + Handle(error) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +// ErrorHandlerFunc is a convenience adapter to allow the use of a function +// as an ErrorHandler. +type ErrorHandlerFunc func(error) + +var _ ErrorHandler = ErrorHandlerFunc(nil) + +// Handle handles the irremediable error by calling the ErrorHandlerFunc itself. +func (f ErrorHandlerFunc) Handle(err error) { + f(err) +} diff --git a/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh new file mode 100644 index 000000000..9a58fb1d3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -euo pipefail + +top_dir='.' +if [[ $# -gt 0 ]]; then + top_dir="${1}" +fi + +p=$(pwd) +mod_dirs=() + +# Note `mapfile` does not exist in older bash versions: +# https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash + +while IFS= read -r line; do + mod_dirs+=("$line") +done < <(find "${top_dir}" -type f -name 'go.mod' -exec dirname {} \; | sort) + +for mod_dir in "${mod_dirs[@]}"; do + cd "${mod_dir}" + + while IFS= read -r line; do + echo ".${line#${p}}" + done < <(go list --find -f '{{.Name}}|{{.Dir}}' ./... | grep '^main|' | cut -f 2- -d '|') + cd "${p}" +done diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go new file mode 100644 index 000000000..36cf09f72 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/handler.go @@ -0,0 +1,97 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +import ( + "log" + "os" + "sync" +) + +var ( + // globalErrorHandler provides an ErrorHandler that can be used + // throughout an OpenTelemetry instrumented project. When a user + // specified ErrorHandler is registered (`SetErrorHandler`) all calls to + // `Handle` and will be delegated to the registered ErrorHandler. + globalErrorHandler = defaultErrorHandler() + + // Compile-time check that delegator implements ErrorHandler. + _ ErrorHandler = (*delegator)(nil) + // Compile-time check that errLogger implements ErrorHandler. + _ ErrorHandler = (*errLogger)(nil) +) + +type delegator struct { + lock *sync.RWMutex + eh ErrorHandler +} + +func (d *delegator) Handle(err error) { + d.lock.RLock() + defer d.lock.RUnlock() + d.eh.Handle(err) +} + +// setDelegate sets the ErrorHandler delegate. +func (d *delegator) setDelegate(eh ErrorHandler) { + d.lock.Lock() + defer d.lock.Unlock() + d.eh = eh +} + +func defaultErrorHandler() *delegator { + return &delegator{ + lock: &sync.RWMutex{}, + eh: &errLogger{l: log.New(os.Stderr, "", log.LstdFlags)}, + } +} + +// errLogger logs errors if no delegate is set, otherwise they are delegated. +type errLogger struct { + l *log.Logger +} + +// Handle logs err if no delegate is set, otherwise it is delegated. +func (h *errLogger) Handle(err error) { + h.l.Print(err) +} + +// GetErrorHandler returns the global ErrorHandler instance. +// +// The default ErrorHandler instance returned will log all errors to STDERR +// until an override ErrorHandler is set with SetErrorHandler. All +// ErrorHandler returned prior to this will automatically forward errors to +// the set instance instead of logging. +// +// Subsequent calls to SetErrorHandler after the first will not forward errors +// to the new ErrorHandler for prior returned instances. +func GetErrorHandler() ErrorHandler { + return globalErrorHandler +} + +// SetErrorHandler sets the global ErrorHandler to h. +// +// The first time this is called all ErrorHandler previously returned from +// GetErrorHandler will send errors to h instead of the default logging +// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not +// delegate errors to h. +func SetErrorHandler(h ErrorHandler) { + globalErrorHandler.setDelegate(h) +} + +// Handle is a convenience function for ErrorHandler().Handle(err). +func Handle(err error) { + GetErrorHandler().Handle(err) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go new file mode 100644 index 000000000..220348944 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package attribute provide several helper functions for some commonly used +logic of processing attributes. +*/ +package attribute // import "go.opentelemetry.io/otel/internal/attribute" + +import ( + "reflect" +) + +// SliceValue convert a slice into an array with same elements as slice. +func SliceValue[T bool | int64 | float64 | string](v []T) any { + var zero T + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))) + copy(cp.Elem().Slice(0, len(v)).Interface().([]T), v) + return cp.Elem().Interface() +} + +// AsSlice convert an array into a slice into with same elements as array. +func AsSlice[T bool | int64 | float64 | string](v any) []T { + rv := reflect.ValueOf(v) + if rv.Type().Kind() != reflect.Array { + return nil + } + var zero T + correctLen := rv.Len() + correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) + cpy := reflect.New(correctType) + _ = reflect.Copy(cpy.Elem(), rv) + return cpy.Elem().Slice(0, correctLen).Interface().([]T) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go new file mode 100644 index 000000000..b96e5408e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package baggage provides base types and functionality to store and retrieve +baggage in Go context. This package exists because the OpenTracing bridge to +OpenTelemetry needs to synchronize state whenever baggage for a context is +modified and that context contains an OpenTracing span. If it were not for +this need this package would not need to exist and the +`go.opentelemetry.io/otel/baggage` package would be the singular place where +W3C baggage is handled. +*/ +package baggage // import "go.opentelemetry.io/otel/internal/baggage" + +// List is the collection of baggage members. The W3C allows for duplicates, +// but OpenTelemetry does not, therefore, this is represented as a map. +type List map[string]Item + +// Item is the value and metadata properties part of a list-member. +type Item struct { + Value string + Properties []Property +} + +// Property is a metadata entry for a list-member. +type Property struct { + Key, Value string + + // HasValue indicates if a zero-value value means the property does not + // have a value or if it was the zero-value. + HasValue bool +} diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go new file mode 100644 index 000000000..4469700d9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package baggage // import "go.opentelemetry.io/otel/internal/baggage" + +import "context" + +type baggageContextKeyType int + +const baggageKey baggageContextKeyType = iota + +// SetHookFunc is a callback called when storing baggage in the context. +type SetHookFunc func(context.Context, List) context.Context + +// GetHookFunc is a callback called when getting baggage from the context. +type GetHookFunc func(context.Context, List) List + +type baggageState struct { + list List + + setHook SetHookFunc + getHook GetHookFunc +} + +// ContextWithSetHook returns a copy of parent with hook configured to be +// invoked every time ContextWithBaggage is called. +// +// Passing nil SetHookFunc creates a context with no set hook to call. +func ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.setHook = hook + return context.WithValue(parent, baggageKey, s) +} + +// ContextWithGetHook returns a copy of parent with hook configured to be +// invoked every time FromContext is called. +// +// Passing nil GetHookFunc creates a context with no get hook to call. +func ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.getHook = hook + return context.WithValue(parent, baggageKey, s) +} + +// ContextWithList returns a copy of parent with baggage. Passing nil list +// returns a context without any baggage. +func ContextWithList(parent context.Context, list List) context.Context { + var s baggageState + if v, ok := parent.Value(baggageKey).(baggageState); ok { + s = v + } + + s.list = list + ctx := context.WithValue(parent, baggageKey, s) + if s.setHook != nil { + ctx = s.setHook(ctx, list) + } + + return ctx +} + +// ListFromContext returns the baggage contained in ctx. +func ListFromContext(ctx context.Context) List { + switch v := ctx.Value(baggageKey).(type) { + case baggageState: + if v.getHook != nil { + return v.getHook(ctx, v.list) + } + return v.list + default: + return nil + } +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go new file mode 100644 index 000000000..ccb325871 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "log" + "os" + "sync" + + "github.com/go-logr/logr" + "github.com/go-logr/stdr" +) + +// globalLogger is the logging interface used within the otel api and sdk provide deatails of the internals. +// +// The default logger uses stdr which is backed by the standard `log.Logger` +// interface. This logger will only show messages at the Error Level. +var globalLogger logr.Logger = stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)) +var globalLoggerLock = &sync.RWMutex{} + +// SetLogger overrides the globalLogger with l. +// +// To see Info messages use a logger with `l.V(1).Enabled() == true` +// To see Debug messages use a logger with `l.V(5).Enabled() == true`. +func SetLogger(l logr.Logger) { + globalLoggerLock.Lock() + defer globalLoggerLock.Unlock() + globalLogger = l +} + +// Info prints messages about the general state of the API or SDK. +// This should usually be less then 5 messages a minute. +func Info(msg string, keysAndValues ...interface{}) { + globalLoggerLock.RLock() + defer globalLoggerLock.RUnlock() + globalLogger.V(1).Info(msg, keysAndValues...) +} + +// Error prints messages about exceptional states of the API or SDK. +func Error(err error, msg string, keysAndValues ...interface{}) { + globalLoggerLock.RLock() + defer globalLoggerLock.RUnlock() + globalLogger.Error(err, msg, keysAndValues...) +} + +// Debug prints messages about all internal changes in the API or SDK. +func Debug(msg string, keysAndValues ...interface{}) { + globalLoggerLock.RLock() + defer globalLoggerLock.RUnlock() + globalLogger.V(5).Info(msg, keysAndValues...) +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go new file mode 100644 index 000000000..06bac35c2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/propagation" +) + +// textMapPropagator is a default TextMapPropagator that delegates calls to a +// registered delegate if one is set, otherwise it defaults to delegating the +// calls to a the default no-op propagation.TextMapPropagator. +type textMapPropagator struct { + mtx sync.Mutex + once sync.Once + delegate propagation.TextMapPropagator + noop propagation.TextMapPropagator +} + +// Compile-time guarantee that textMapPropagator implements the +// propagation.TextMapPropagator interface. +var _ propagation.TextMapPropagator = (*textMapPropagator)(nil) + +func newTextMapPropagator() *textMapPropagator { + return &textMapPropagator{ + noop: propagation.NewCompositeTextMapPropagator(), + } +} + +// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are +// forwarded to. Delegation can only be performed once, all subsequent calls +// perform no delegation. +func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) { + if delegate == nil { + return + } + + p.mtx.Lock() + p.once.Do(func() { p.delegate = delegate }) + p.mtx.Unlock() +} + +// effectiveDelegate returns the current delegate of p if one is set, +// otherwise the default noop TextMapPropagator is returned. This method +// can be called concurrently. +func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator { + p.mtx.Lock() + defer p.mtx.Unlock() + if p.delegate != nil { + return p.delegate + } + return p.noop +} + +// Inject set cross-cutting concerns from the Context into the carrier. +func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { + p.effectiveDelegate().Inject(ctx, carrier) +} + +// Extract reads cross-cutting concerns from the carrier into a Context. +func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { + return p.effectiveDelegate().Extract(ctx, carrier) +} + +// Fields returns the keys whose values are set with Inject. +func (p *textMapPropagator) Fields() []string { + return p.effectiveDelegate().Fields() +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go new file mode 100644 index 000000000..1ad38f828 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go @@ -0,0 +1,115 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package global // import "go.opentelemetry.io/otel/internal/global" + +import ( + "errors" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" +) + +type ( + tracerProviderHolder struct { + tp trace.TracerProvider + } + + propagatorsHolder struct { + tm propagation.TextMapPropagator + } +) + +var ( + globalTracer = defaultTracerValue() + globalPropagators = defaultPropagatorsValue() + + delegateTraceOnce sync.Once + delegateTextMapPropagatorOnce sync.Once +) + +// TracerProvider is the internal implementation for global.TracerProvider. +func TracerProvider() trace.TracerProvider { + return globalTracer.Load().(tracerProviderHolder).tp +} + +// SetTracerProvider is the internal implementation for global.SetTracerProvider. +func SetTracerProvider(tp trace.TracerProvider) { + current := TracerProvider() + + if _, cOk := current.(*tracerProvider); cOk { + if _, tpOk := tp.(*tracerProvider); tpOk && current == tp { + // Do not assign the default delegating TracerProvider to delegate + // to itself. + Error( + errors.New("no delegate configured in tracer provider"), + "Setting tracer provider to it's current value. No delegate will be configured", + ) + return + } + } + + delegateTraceOnce.Do(func() { + if def, ok := current.(*tracerProvider); ok { + def.setDelegate(tp) + } + }) + globalTracer.Store(tracerProviderHolder{tp: tp}) +} + +// TextMapPropagator is the internal implementation for global.TextMapPropagator. +func TextMapPropagator() propagation.TextMapPropagator { + return globalPropagators.Load().(propagatorsHolder).tm +} + +// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator. +func SetTextMapPropagator(p propagation.TextMapPropagator) { + current := TextMapPropagator() + + if _, cOk := current.(*textMapPropagator); cOk { + if _, pOk := p.(*textMapPropagator); pOk && current == p { + // Do not assign the default delegating TextMapPropagator to + // delegate to itself. + Error( + errors.New("no delegate configured in text map propagator"), + "Setting text map propagator to it's current value. No delegate will be configured", + ) + return + } + } + + // For the textMapPropagator already returned by TextMapPropagator + // delegate to p. + delegateTextMapPropagatorOnce.Do(func() { + if def, ok := current.(*textMapPropagator); ok { + def.SetDelegate(p) + } + }) + // Return p when subsequent calls to TextMapPropagator are made. + globalPropagators.Store(propagatorsHolder{tm: p}) +} + +func defaultTracerValue() *atomic.Value { + v := &atomic.Value{} + v.Store(tracerProviderHolder{tp: &tracerProvider{}}) + return v +} + +func defaultPropagatorsValue() *atomic.Value { + v := &atomic.Value{} + v.Store(propagatorsHolder{tm: newTextMapPropagator()}) + return v +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go new file mode 100644 index 000000000..5f008d098 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go @@ -0,0 +1,192 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package global // import "go.opentelemetry.io/otel/internal/global" + +/* +This file contains the forwarding implementation of the TracerProvider used as +the default global instance. Prior to initialization of an SDK, Tracers +returned by the global TracerProvider will provide no-op functionality. This +means that all Span created prior to initialization are no-op Spans. + +Once an SDK has been initialized, all provided no-op Tracers are swapped for +Tracers provided by the SDK defined TracerProvider. However, any Span started +prior to this initialization does not change its behavior. Meaning, the Span +remains a no-op Span. + +The implementation to track and swap Tracers locks all new Tracer creation +until the swap is complete. This assumes that this operation is not +performance-critical. If that assumption is incorrect, be sure to configure an +SDK prior to any Tracer creation. +*/ + +import ( + "context" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +// tracerProvider is a placeholder for a configured SDK TracerProvider. +// +// All TracerProvider functionality is forwarded to a delegate once +// configured. +type tracerProvider struct { + mtx sync.Mutex + tracers map[il]*tracer + delegate trace.TracerProvider +} + +// Compile-time guarantee that tracerProvider implements the TracerProvider +// interface. +var _ trace.TracerProvider = &tracerProvider{} + +// setDelegate configures p to delegate all TracerProvider functionality to +// provider. +// +// All Tracers provided prior to this function call are switched out to be +// Tracers provided by provider. +// +// It is guaranteed by the caller that this happens only once. +func (p *tracerProvider) setDelegate(provider trace.TracerProvider) { + p.mtx.Lock() + defer p.mtx.Unlock() + + p.delegate = provider + + if len(p.tracers) == 0 { + return + } + + for _, t := range p.tracers { + t.setDelegate(provider) + } + + p.tracers = nil +} + +// Tracer implements TracerProvider. +func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + p.mtx.Lock() + defer p.mtx.Unlock() + + if p.delegate != nil { + return p.delegate.Tracer(name, opts...) + } + + // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map. + + c := trace.NewTracerConfig(opts...) + key := il{ + name: name, + version: c.InstrumentationVersion(), + } + + if p.tracers == nil { + p.tracers = make(map[il]*tracer) + } + + if val, ok := p.tracers[key]; ok { + return val + } + + t := &tracer{name: name, opts: opts, provider: p} + p.tracers[key] = t + return t +} + +type il struct { + name string + version string +} + +// tracer is a placeholder for a trace.Tracer. +// +// All Tracer functionality is forwarded to a delegate once configured. +// Otherwise, all functionality is forwarded to a NoopTracer. +type tracer struct { + name string + opts []trace.TracerOption + provider *tracerProvider + + delegate atomic.Value +} + +// Compile-time guarantee that tracer implements the trace.Tracer interface. +var _ trace.Tracer = &tracer{} + +// setDelegate configures t to delegate all Tracer functionality to Tracers +// created by provider. +// +// All subsequent calls to the Tracer methods will be passed to the delegate. +// +// It is guaranteed by the caller that this happens only once. +func (t *tracer) setDelegate(provider trace.TracerProvider) { + t.delegate.Store(provider.Tracer(t.name, t.opts...)) +} + +// Start implements trace.Tracer by forwarding the call to t.delegate if +// set, otherwise it forwards the call to a NoopTracer. +func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { + delegate := t.delegate.Load() + if delegate != nil { + return delegate.(trace.Tracer).Start(ctx, name, opts...) + } + + s := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t} + ctx = trace.ContextWithSpan(ctx, s) + return ctx, s +} + +// nonRecordingSpan is a minimal implementation of a Span that wraps a +// SpanContext. It performs no operations other than to return the wrapped +// SpanContext. +type nonRecordingSpan struct { + sc trace.SpanContext + tracer *tracer +} + +var _ trace.Span = nonRecordingSpan{} + +// SpanContext returns the wrapped SpanContext. +func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc } + +// IsRecording always returns false. +func (nonRecordingSpan) IsRecording() bool { return false } + +// SetStatus does nothing. +func (nonRecordingSpan) SetStatus(codes.Code, string) {} + +// SetError does nothing. +func (nonRecordingSpan) SetError(bool) {} + +// SetAttributes does nothing. +func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {} + +// End does nothing. +func (nonRecordingSpan) End(...trace.SpanEndOption) {} + +// RecordError does nothing. +func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} + +// AddEvent does nothing. +func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} + +// SetName does nothing. +func (nonRecordingSpan) SetName(string) {} + +func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider } diff --git a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go new file mode 100644 index 000000000..e07e79400 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal // import "go.opentelemetry.io/otel/internal" + +import ( + "math" + "unsafe" +) + +func BoolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag. + if b { + return 1 + } + return 0 +} + +func RawToBool(r uint64) bool { + return r != 0 +} + +func Int64ToRaw(i int64) uint64 { + return uint64(i) +} + +func RawToInt64(r uint64) int64 { + return int64(r) +} + +func Float64ToRaw(f float64) uint64 { + return math.Float64bits(f) +} + +func RawToFloat64(r uint64) float64 { + return math.Float64frombits(r) +} + +func RawPtrToFloat64Ptr(r *uint64) *float64 { + return (*float64)(unsafe.Pointer(r)) +} + +func RawPtrToInt64Ptr(r *uint64) *int64 { + return (*int64)(unsafe.Pointer(r)) +} diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go new file mode 100644 index 000000000..c4f8acd5d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/internal_logging.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +import ( + "github.com/go-logr/logr" + + "go.opentelemetry.io/otel/internal/global" +) + +// SetLogger configures the logger used internally to opentelemetry. +func SetLogger(logger logr.Logger) { + global.SetLogger(logger) +} diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go new file mode 100644 index 000000000..d29aaa32c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/propagation" +) + +// GetTextMapPropagator returns the global TextMapPropagator. If none has been +// set, a No-Op TextMapPropagator is returned. +func GetTextMapPropagator() propagation.TextMapPropagator { + return global.TextMapPropagator() +} + +// SetTextMapPropagator sets propagator as the global TextMapPropagator. +func SetTextMapPropagator(propagator propagation.TextMapPropagator) { + global.SetTextMapPropagator(propagator) +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go new file mode 100644 index 000000000..303cdf1cb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + + "go.opentelemetry.io/otel/baggage" +) + +const baggageHeader = "baggage" + +// Baggage is a propagator that supports the W3C Baggage format. +// +// This propagates user-defined baggage associated with a trace. The complete +// specification is defined at https://www.w3.org/TR/baggage/. +type Baggage struct{} + +var _ TextMapPropagator = Baggage{} + +// Inject sets baggage key-values from ctx into the carrier. +func (b Baggage) Inject(ctx context.Context, carrier TextMapCarrier) { + bStr := baggage.FromContext(ctx).String() + if bStr != "" { + carrier.Set(baggageHeader, bStr) + } +} + +// Extract returns a copy of parent with the baggage from the carrier added. +func (b Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context { + bStr := carrier.Get(baggageHeader) + if bStr == "" { + return parent + } + + bag, err := baggage.Parse(bStr) + if err != nil { + return parent + } + return baggage.ContextWithBaggage(parent, bag) +} + +// Fields returns the keys who's values are set with Inject. +func (b Baggage) Fields() []string { + return []string{baggageHeader} +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go new file mode 100644 index 000000000..c119eb285 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/doc.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package propagation contains OpenTelemetry context propagators. + +OpenTelemetry propagators are used to extract and inject context data from and +into messages exchanged by applications. The propagator supported by this +package is the W3C Trace Context encoding +(https://www.w3.org/TR/trace-context/), and W3C Baggage +(https://www.w3.org/TR/baggage/). +*/ +package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go new file mode 100644 index 000000000..c94438f73 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/propagation.go @@ -0,0 +1,153 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + "net/http" +) + +// TextMapCarrier is the storage medium used by a TextMapPropagator. +type TextMapCarrier interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Get returns the value associated with the passed key. + Get(key string) string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Set stores the key-value pair. + Set(key string, value string) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Keys lists the keys stored in this carrier. + Keys() []string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage +// medium for propagated key-value pairs. +type MapCarrier map[string]string + +// Compile time check that MapCarrier implements the TextMapCarrier. +var _ TextMapCarrier = MapCarrier{} + +// Get returns the value associated with the passed key. +func (c MapCarrier) Get(key string) string { + return c[key] +} + +// Set stores the key-value pair. +func (c MapCarrier) Set(key, value string) { + c[key] = value +} + +// Keys lists the keys stored in this carrier. +func (c MapCarrier) Keys() []string { + keys := make([]string, 0, len(c)) + for k := range c { + keys = append(keys, k) + } + return keys +} + +// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface. +type HeaderCarrier http.Header + +// Get returns the value associated with the passed key. +func (hc HeaderCarrier) Get(key string) string { + return http.Header(hc).Get(key) +} + +// Set stores the key-value pair. +func (hc HeaderCarrier) Set(key string, value string) { + http.Header(hc).Set(key, value) +} + +// Keys lists the keys stored in this carrier. +func (hc HeaderCarrier) Keys() []string { + keys := make([]string, 0, len(hc)) + for k := range hc { + keys = append(keys, k) + } + return keys +} + +// TextMapPropagator propagates cross-cutting concerns as key-value text +// pairs within a carrier that travels in-band across process boundaries. +type TextMapPropagator interface { + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Inject set cross-cutting concerns from the Context into the carrier. + Inject(ctx context.Context, carrier TextMapCarrier) + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Extract reads cross-cutting concerns from the carrier into a Context. + Extract(ctx context.Context, carrier TextMapCarrier) context.Context + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. + + // Fields returns the keys whose values are set with Inject. + Fields() []string + // DO NOT CHANGE: any modification will not be backwards compatible and + // must never be done outside of a new major release. +} + +type compositeTextMapPropagator []TextMapPropagator + +func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) { + for _, i := range p { + i.Inject(ctx, carrier) + } +} + +func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { + for _, i := range p { + ctx = i.Extract(ctx, carrier) + } + return ctx +} + +func (p compositeTextMapPropagator) Fields() []string { + unique := make(map[string]struct{}) + for _, i := range p { + for _, k := range i.Fields() { + unique[k] = struct{}{} + } + } + + fields := make([]string, 0, len(unique)) + for k := range unique { + fields = append(fields, k) + } + return fields +} + +// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the +// group of passed TextMapPropagator. This allows different cross-cutting +// concerns to be propagates in a unified manner. +// +// The returned TextMapPropagator will inject and extract cross-cutting +// concerns in the order the TextMapPropagators were provided. Additionally, +// the Fields method will return a de-duplicated slice of the keys that are +// set with the Inject method. +func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator { + return compositeTextMapPropagator(p) +} diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go new file mode 100644 index 000000000..902692da0 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go @@ -0,0 +1,159 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package propagation // import "go.opentelemetry.io/otel/propagation" + +import ( + "context" + "encoding/hex" + "fmt" + "regexp" + + "go.opentelemetry.io/otel/trace" +) + +const ( + supportedVersion = 0 + maxVersion = 254 + traceparentHeader = "traceparent" + tracestateHeader = "tracestate" +) + +// TraceContext is a propagator that supports the W3C Trace Context format +// (https://www.w3.org/TR/trace-context/) +// +// This propagator will propagate the traceparent and tracestate headers to +// guarantee traces are not broken. It is up to the users of this propagator +// to choose if they want to participate in a trace by modifying the +// traceparent header and relevant parts of the tracestate header containing +// their proprietary information. +type TraceContext struct{} + +var _ TextMapPropagator = TraceContext{} +var traceCtxRegExp = regexp.MustCompile("^(?P[0-9a-f]{2})-(?P[a-f0-9]{32})-(?P[a-f0-9]{16})-(?P[a-f0-9]{2})(?:-.*)?$") + +// Inject set tracecontext from the Context into the carrier. +func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { + sc := trace.SpanContextFromContext(ctx) + if !sc.IsValid() { + return + } + + if ts := sc.TraceState().String(); ts != "" { + carrier.Set(tracestateHeader, ts) + } + + // Clear all flags other than the trace-context supported sampling bit. + flags := sc.TraceFlags() & trace.FlagsSampled + + h := fmt.Sprintf("%.2x-%s-%s-%s", + supportedVersion, + sc.TraceID(), + sc.SpanID(), + flags) + carrier.Set(traceparentHeader, h) +} + +// Extract reads tracecontext from the carrier into a returned Context. +// +// The returned Context will be a copy of ctx and contain the extracted +// tracecontext as the remote SpanContext. If the extracted tracecontext is +// invalid, the passed ctx will be returned directly instead. +func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { + sc := tc.extract(carrier) + if !sc.IsValid() { + return ctx + } + return trace.ContextWithRemoteSpanContext(ctx, sc) +} + +func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { + h := carrier.Get(traceparentHeader) + if h == "" { + return trace.SpanContext{} + } + + matches := traceCtxRegExp.FindStringSubmatch(h) + + if len(matches) == 0 { + return trace.SpanContext{} + } + + if len(matches) < 5 { // four subgroups plus the overall match + return trace.SpanContext{} + } + + if len(matches[1]) != 2 { + return trace.SpanContext{} + } + ver, err := hex.DecodeString(matches[1]) + if err != nil { + return trace.SpanContext{} + } + version := int(ver[0]) + if version > maxVersion { + return trace.SpanContext{} + } + + if version == 0 && len(matches) != 5 { // four subgroups plus the overall match + return trace.SpanContext{} + } + + if len(matches[2]) != 32 { + return trace.SpanContext{} + } + + var scc trace.SpanContextConfig + + scc.TraceID, err = trace.TraceIDFromHex(matches[2][:32]) + if err != nil { + return trace.SpanContext{} + } + + if len(matches[3]) != 16 { + return trace.SpanContext{} + } + scc.SpanID, err = trace.SpanIDFromHex(matches[3]) + if err != nil { + return trace.SpanContext{} + } + + if len(matches[4]) != 2 { + return trace.SpanContext{} + } + opts, err := hex.DecodeString(matches[4]) + if err != nil || len(opts) < 1 || (version == 0 && opts[0] > 2) { + return trace.SpanContext{} + } + // Clear all flags other than the trace-context supported sampling bit. + scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled + + // Ignore the error returned here. Failure to parse tracestate MUST NOT + // affect the parsing of traceparent according to the W3C tracecontext + // specification. + scc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader)) + scc.Remote = true + + sc := trace.NewSpanContext(scc) + if !sc.IsValid() { + return trace.SpanContext{} + } + + return sc +} + +// Fields returns the keys who's values are set with Inject. +func (tc TraceContext) Fields() []string { + return []string{traceparentHeader, tracestateHeader} +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/http.go b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go new file mode 100644 index 000000000..b580eedef --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go @@ -0,0 +1,336 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal // import "go.opentelemetry.io/otel/semconv/internal" + +import ( + "fmt" + "net" + "net/http" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +// SemanticConventions are the semantic convention values defined for a +// version of the OpenTelemetry specification. +type SemanticConventions struct { + EnduserIDKey attribute.Key + HTTPClientIPKey attribute.Key + HTTPFlavorKey attribute.Key + HTTPHostKey attribute.Key + HTTPMethodKey attribute.Key + HTTPRequestContentLengthKey attribute.Key + HTTPRouteKey attribute.Key + HTTPSchemeHTTP attribute.KeyValue + HTTPSchemeHTTPS attribute.KeyValue + HTTPServerNameKey attribute.Key + HTTPStatusCodeKey attribute.Key + HTTPTargetKey attribute.Key + HTTPURLKey attribute.Key + HTTPUserAgentKey attribute.Key + NetHostIPKey attribute.Key + NetHostNameKey attribute.Key + NetHostPortKey attribute.Key + NetPeerIPKey attribute.Key + NetPeerNameKey attribute.Key + NetPeerPortKey attribute.Key + NetTransportIP attribute.KeyValue + NetTransportOther attribute.KeyValue + NetTransportTCP attribute.KeyValue + NetTransportUDP attribute.KeyValue + NetTransportUnix attribute.KeyValue +} + +// NetAttributesFromHTTPRequest generates attributes of the net +// namespace as specified by the OpenTelemetry specification for a +// span. The network parameter is a string that net.Dial function +// from standard library can understand. +func (sc *SemanticConventions) NetAttributesFromHTTPRequest(network string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + + switch network { + case "tcp", "tcp4", "tcp6": + attrs = append(attrs, sc.NetTransportTCP) + case "udp", "udp4", "udp6": + attrs = append(attrs, sc.NetTransportUDP) + case "ip", "ip4", "ip6": + attrs = append(attrs, sc.NetTransportIP) + case "unix", "unixgram", "unixpacket": + attrs = append(attrs, sc.NetTransportUnix) + default: + attrs = append(attrs, sc.NetTransportOther) + } + + peerIP, peerName, peerPort := hostIPNamePort(request.RemoteAddr) + if peerIP != "" { + attrs = append(attrs, sc.NetPeerIPKey.String(peerIP)) + } + if peerName != "" { + attrs = append(attrs, sc.NetPeerNameKey.String(peerName)) + } + if peerPort != 0 { + attrs = append(attrs, sc.NetPeerPortKey.Int(peerPort)) + } + + hostIP, hostName, hostPort := "", "", 0 + for _, someHost := range []string{request.Host, request.Header.Get("Host"), request.URL.Host} { + hostIP, hostName, hostPort = hostIPNamePort(someHost) + if hostIP != "" || hostName != "" || hostPort != 0 { + break + } + } + if hostIP != "" { + attrs = append(attrs, sc.NetHostIPKey.String(hostIP)) + } + if hostName != "" { + attrs = append(attrs, sc.NetHostNameKey.String(hostName)) + } + if hostPort != 0 { + attrs = append(attrs, sc.NetHostPortKey.Int(hostPort)) + } + + return attrs +} + +// hostIPNamePort extracts the IP address, name and (optional) port from hostWithPort. +// It handles both IPv4 and IPv6 addresses. If the host portion is not recognized +// as a valid IPv4 or IPv6 address, the `ip` result will be empty and the +// host portion will instead be returned in `name`. +func hostIPNamePort(hostWithPort string) (ip string, name string, port int) { + var ( + hostPart, portPart string + parsedPort uint64 + err error + ) + if hostPart, portPart, err = net.SplitHostPort(hostWithPort); err != nil { + hostPart, portPart = hostWithPort, "" + } + if parsedIP := net.ParseIP(hostPart); parsedIP != nil { + ip = parsedIP.String() + } else { + name = hostPart + } + if parsedPort, err = strconv.ParseUint(portPart, 10, 16); err == nil { + port = int(parsedPort) + } + return +} + +// EndUserAttributesFromHTTPRequest generates attributes of the +// enduser namespace as specified by the OpenTelemetry specification +// for a span. +func (sc *SemanticConventions) EndUserAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + if username, _, ok := request.BasicAuth(); ok { + return []attribute.KeyValue{sc.EnduserIDKey.String(username)} + } + return nil +} + +// HTTPClientAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the client side. +func (sc *SemanticConventions) HTTPClientAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + + // remove any username/password info that may be in the URL + // before adding it to the attributes + userinfo := request.URL.User + request.URL.User = nil + + attrs = append(attrs, sc.HTTPURLKey.String(request.URL.String())) + + // restore any username/password info that was removed + request.URL.User = userinfo + + return append(attrs, sc.httpCommonAttributesFromHTTPRequest(request)...) +} + +func (sc *SemanticConventions) httpCommonAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + if ua := request.UserAgent(); ua != "" { + attrs = append(attrs, sc.HTTPUserAgentKey.String(ua)) + } + if request.ContentLength > 0 { + attrs = append(attrs, sc.HTTPRequestContentLengthKey.Int64(request.ContentLength)) + } + + return append(attrs, sc.httpBasicAttributesFromHTTPRequest(request)...) +} + +func (sc *SemanticConventions) httpBasicAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + // as these attributes are used by HTTPServerMetricAttributesFromHTTPRequest, they should be low-cardinality + attrs := []attribute.KeyValue{} + + if request.TLS != nil { + attrs = append(attrs, sc.HTTPSchemeHTTPS) + } else { + attrs = append(attrs, sc.HTTPSchemeHTTP) + } + + if request.Host != "" { + attrs = append(attrs, sc.HTTPHostKey.String(request.Host)) + } else if request.URL != nil && request.URL.Host != "" { + attrs = append(attrs, sc.HTTPHostKey.String(request.URL.Host)) + } + + flavor := "" + if request.ProtoMajor == 1 { + flavor = fmt.Sprintf("1.%d", request.ProtoMinor) + } else if request.ProtoMajor == 2 { + flavor = "2" + } + if flavor != "" { + attrs = append(attrs, sc.HTTPFlavorKey.String(flavor)) + } + + if request.Method != "" { + attrs = append(attrs, sc.HTTPMethodKey.String(request.Method)) + } else { + attrs = append(attrs, sc.HTTPMethodKey.String(http.MethodGet)) + } + + return attrs +} + +// HTTPServerMetricAttributesFromHTTPRequest generates low-cardinality attributes +// to be used with server-side HTTP metrics. +func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(serverName string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + if serverName != "" { + attrs = append(attrs, sc.HTTPServerNameKey.String(serverName)) + } + return append(attrs, sc.httpBasicAttributesFromHTTPRequest(request)...) +} + +// HTTPServerAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the server side. Currently, only basic authentication is +// supported. +func (sc *SemanticConventions) HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{ + sc.HTTPTargetKey.String(request.RequestURI), + } + + if serverName != "" { + attrs = append(attrs, sc.HTTPServerNameKey.String(serverName)) + } + if route != "" { + attrs = append(attrs, sc.HTTPRouteKey.String(route)) + } + if values, ok := request.Header["X-Forwarded-For"]; ok && len(values) > 0 { + if addresses := strings.SplitN(values[0], ",", 2); len(addresses) > 0 { + attrs = append(attrs, sc.HTTPClientIPKey.String(addresses[0])) + } + } + + return append(attrs, sc.httpCommonAttributesFromHTTPRequest(request)...) +} + +// HTTPAttributesFromHTTPStatusCode generates attributes of the http +// namespace as specified by the OpenTelemetry specification for a +// span. +func (sc *SemanticConventions) HTTPAttributesFromHTTPStatusCode(code int) []attribute.KeyValue { + attrs := []attribute.KeyValue{ + sc.HTTPStatusCodeKey.Int(code), + } + return attrs +} + +type codeRange struct { + fromInclusive int + toInclusive int +} + +func (r codeRange) contains(code int) bool { + return r.fromInclusive <= code && code <= r.toInclusive +} + +var validRangesPerCategory = map[int][]codeRange{ + 1: { + {http.StatusContinue, http.StatusEarlyHints}, + }, + 2: { + {http.StatusOK, http.StatusAlreadyReported}, + {http.StatusIMUsed, http.StatusIMUsed}, + }, + 3: { + {http.StatusMultipleChoices, http.StatusUseProxy}, + {http.StatusTemporaryRedirect, http.StatusPermanentRedirect}, + }, + 4: { + {http.StatusBadRequest, http.StatusTeapot}, // yes, teapot is so useful… + {http.StatusMisdirectedRequest, http.StatusUpgradeRequired}, + {http.StatusPreconditionRequired, http.StatusTooManyRequests}, + {http.StatusRequestHeaderFieldsTooLarge, http.StatusRequestHeaderFieldsTooLarge}, + {http.StatusUnavailableForLegalReasons, http.StatusUnavailableForLegalReasons}, + }, + 5: { + {http.StatusInternalServerError, http.StatusLoopDetected}, + {http.StatusNotExtended, http.StatusNetworkAuthenticationRequired}, + }, +} + +// SpanStatusFromHTTPStatusCode generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +func SpanStatusFromHTTPStatusCode(code int) (codes.Code, string) { + spanCode, valid := validateHTTPStatusCode(code) + if !valid { + return spanCode, fmt.Sprintf("Invalid HTTP status code %d", code) + } + return spanCode, "" +} + +// SpanStatusFromHTTPStatusCodeAndSpanKind generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +// Exclude 4xx for SERVER to set the appropriate status. +func SpanStatusFromHTTPStatusCodeAndSpanKind(code int, spanKind trace.SpanKind) (codes.Code, string) { + spanCode, valid := validateHTTPStatusCode(code) + if !valid { + return spanCode, fmt.Sprintf("Invalid HTTP status code %d", code) + } + category := code / 100 + if spanKind == trace.SpanKindServer && category == 4 { + return codes.Unset, "" + } + return spanCode, "" +} + +// validateHTTPStatusCode validates the HTTP status code and returns +// corresponding span status code. If the `code` is not a valid HTTP status +// code, returns span status Error and false. +func validateHTTPStatusCode(code int) (codes.Code, bool) { + category := code / 100 + ranges, ok := validRangesPerCategory[category] + if !ok { + return codes.Error, false + } + ok = false + for _, crange := range ranges { + ok = crange.contains(code) + if ok { + break + } + } + if !ok { + return codes.Error, false + } + if category > 0 && category < 4 { + return codes.Unset, true + } + return codes.Error, true +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go new file mode 100644 index 000000000..181fcc9c5 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the conventions +// as of the v1.12.0 version of the OpenTelemetry specification. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go new file mode 100644 index 000000000..d68927094 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go new file mode 100644 index 000000000..4b4f3cbaf --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go @@ -0,0 +1,114 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import ( + "net/http" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/semconv/internal" + "go.opentelemetry.io/otel/trace" +) + +// HTTP scheme attributes. +var ( + HTTPSchemeHTTP = HTTPSchemeKey.String("http") + HTTPSchemeHTTPS = HTTPSchemeKey.String("https") +) + +var sc = &internal.SemanticConventions{ + EnduserIDKey: EnduserIDKey, + HTTPClientIPKey: HTTPClientIPKey, + HTTPFlavorKey: HTTPFlavorKey, + HTTPHostKey: HTTPHostKey, + HTTPMethodKey: HTTPMethodKey, + HTTPRequestContentLengthKey: HTTPRequestContentLengthKey, + HTTPRouteKey: HTTPRouteKey, + HTTPSchemeHTTP: HTTPSchemeHTTP, + HTTPSchemeHTTPS: HTTPSchemeHTTPS, + HTTPServerNameKey: HTTPServerNameKey, + HTTPStatusCodeKey: HTTPStatusCodeKey, + HTTPTargetKey: HTTPTargetKey, + HTTPURLKey: HTTPURLKey, + HTTPUserAgentKey: HTTPUserAgentKey, + NetHostIPKey: NetHostIPKey, + NetHostNameKey: NetHostNameKey, + NetHostPortKey: NetHostPortKey, + NetPeerIPKey: NetPeerIPKey, + NetPeerNameKey: NetPeerNameKey, + NetPeerPortKey: NetPeerPortKey, + NetTransportIP: NetTransportIP, + NetTransportOther: NetTransportOther, + NetTransportTCP: NetTransportTCP, + NetTransportUDP: NetTransportUDP, + NetTransportUnix: NetTransportUnix, +} + +// NetAttributesFromHTTPRequest generates attributes of the net +// namespace as specified by the OpenTelemetry specification for a +// span. The network parameter is a string that net.Dial function +// from standard library can understand. +func NetAttributesFromHTTPRequest(network string, request *http.Request) []attribute.KeyValue { + return sc.NetAttributesFromHTTPRequest(network, request) +} + +// EndUserAttributesFromHTTPRequest generates attributes of the +// enduser namespace as specified by the OpenTelemetry specification +// for a span. +func EndUserAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + return sc.EndUserAttributesFromHTTPRequest(request) +} + +// HTTPClientAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the client side. +func HTTPClientAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + return sc.HTTPClientAttributesFromHTTPRequest(request) +} + +// HTTPServerMetricAttributesFromHTTPRequest generates low-cardinality attributes +// to be used with server-side HTTP metrics. +func HTTPServerMetricAttributesFromHTTPRequest(serverName string, request *http.Request) []attribute.KeyValue { + return sc.HTTPServerMetricAttributesFromHTTPRequest(serverName, request) +} + +// HTTPServerAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the server side. Currently, only basic authentication is +// supported. +func HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue { + return sc.HTTPServerAttributesFromHTTPRequest(serverName, route, request) +} + +// HTTPAttributesFromHTTPStatusCode generates attributes of the http +// namespace as specified by the OpenTelemetry specification for a +// span. +func HTTPAttributesFromHTTPStatusCode(code int) []attribute.KeyValue { + return sc.HTTPAttributesFromHTTPStatusCode(code) +} + +// SpanStatusFromHTTPStatusCode generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +func SpanStatusFromHTTPStatusCode(code int) (codes.Code, string) { + return internal.SpanStatusFromHTTPStatusCode(code) +} + +// SpanStatusFromHTTPStatusCodeAndSpanKind generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +// Exclude 4xx for SERVER to set the appropriate status. +func SpanStatusFromHTTPStatusCodeAndSpanKind(code int, spanKind trace.SpanKind) (codes.Code, string) { + return internal.SpanStatusFromHTTPStatusCodeAndSpanKind(code, spanKind) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go new file mode 100644 index 000000000..b2155676f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go @@ -0,0 +1,1042 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import "go.opentelemetry.io/otel/attribute" + +// The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser (regardless of whether running on a mobile or desktop device). +const ( + // Array of brand name and version separated by a space + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (navigator.userAgentData.brands). + BrowserBrandsKey = attribute.Key("browser.brands") + // The platform on which the browser is running + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (navigator.userAgentData.platform). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD + // be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in the + // [os.type and os.name attributes](./os.md). However, for consistency, the values + // in the `browser.platform` attribute should capture the exact value that the + // user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") + // Full user-agent string provided by the browser + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + // (KHTML, ' + // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36' + // Note: The user-agent value SHOULD be provided only from browsers that do not + // have a mechanism to retrieve brands and platform individually from the User- + // Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` + // API can be used. + BrowserUserAgentKey = attribute.Key("browser.user_agent") +) + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // Name of the cloud provider. + // + // Type: Enum + // Required: No + // Stability: stable + CloudProviderKey = attribute.Key("cloud.provider") + // The cloud account ID the resource is assigned to. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + // The geographical region the resource is running. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for example + // [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc- + // detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global- + // infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en- + // us/global-infrastructure/geographies/), [Google Cloud + // regions](https://cloud.google.com/about/locations), or [Tencent Cloud + // regions](https://intl.cloud.tencent.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + // Cloud regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the resource + // is running. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + // The cloud platform in use. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws. + // amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + // The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/develo + // perguide/clusters.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + // The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/l + // aunch_types.html) for an ECS task. + // + // Type: Enum + // Required: No + // Stability: stable + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + // The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/lates + // t/developerguide/task_definitions.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + // The task definition family this task definition is a member of. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + // The revision for this task definition. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // The ARN of an EKS cluster. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// Resources specific to Amazon Web Services. +const ( + // The name(s) of the AWS log group(s) an application is writing to. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like multi-container + // applications, where a single application has sidecar containers, and each write + // to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + // The Amazon Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam- + // access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + // The name(s) of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") + // The ARN(s) of the AWS log stream(s). + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- + // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam- + // access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain + // several log streams, so these ARNs necessarily identify both a log group and a + // log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") +) + +// A container instance. +const ( + // Container name used by container runtime. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + // Container ID. Usually a UUID, as for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container- + // identification). The UUID might be abbreviated. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + // The container runtime managing this container. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") + // Name of the image the container was built on. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + // Container image tag. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.1' + ContainerImageTagKey = attribute.Key("container.image.tag") +) + +// The software deployment. +const ( + // Name of the [deployment + // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'staging', 'production' + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// The device on which the process represented by this resource is running. +const ( + // A unique identifier representing the device + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values outlined + // below. This value is not an advertising identifier and MUST NOT be used as + // such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor id + // entifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-iden + // tifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the + // Firebase Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on best + // practices and exact implementation details. Caution should be taken when + // storing personal data or anything which can identify a user. GDPR and data + // protection laws may apply, ensure you do your own due diligence. + DeviceIDKey = attribute.Key("device.id") + // The model identifier for the device + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version of the + // model identifier rather than the market or consumer-friendly name of the + // device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + // The marketing name for the device model + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of the + // device model rather than a machine readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") + // The name of the device manufacturer + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") +) + +// A serverless instance. +const ( + // The name of the single function that this runtime instance executes. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span- + // general.md#source-code-attributes) + // span attributes). + + // For some cloud providers, the above definition is ambiguous. The following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud providers/products: + + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `faas.id` attribute). + FaaSNameKey = attribute.Key("faas.name") + // The unique ID of the single function that this runtime instance executes. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function' + // Note: On some cloud providers, it may not be possible to determine the full ID + // at startup, + // so consider setting `faas.id` as a span attribute instead. + + // The exact value to use for `faas.id` depends on the cloud provider: + + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and- + // namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration- + // aliases.html) + // with the resolved function version, as the same runtime instance may be + // invokable with + // multiple different aliases. + // * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full- + // resource-names) + // * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en- + // us/rest/api/resources/resources/get-by-id) of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.We + // b/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function app can + // host multiple functions that would usually share + // a TracerProvider. + FaaSIDKey = attribute.Key("faas.id") + // The immutable version of the function being executed. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration- + // versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run:** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env- + // var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") + // The execution environment ID as a string, that will be potentially reused for + // other invocations to the same function/function version. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + // The amount of memory available to the serverless function in MiB. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 128 + // Note: It's recommended to set this attribute since e.g. too little memory can + // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, + // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this + // information. + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") +) + +// A host is defined as a general computing instance. +const ( + // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud + // provider. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-test' + HostIDKey = attribute.Key("host.id") + // Name of the host. On Unix systems, it may contain what the hostname command + // returns, or the fully qualified hostname, or another name specified by the + // user. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + // Type of host. For Cloud, this must be the machine type. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") + // The CPU architecture the host system is running on. + // + // Type: Enum + // Required: No + // Stability: stable + HostArchKey = attribute.Key("host.arch") + // Name of the VM image or OS install the host was instantiated from. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + // VM image ID. For Cloud, this value is from the provider. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + // The version string of the VM image as defined in [Version + // Attributes](README.md#version-attributes). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// A Kubernetes Cluster. +const ( + // The name of the cluster. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") +) + +// A Kubernetes Node object. +const ( + // The name of the Node. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + // The UID of the Node. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") +) + +// A Kubernetes Namespace. +const ( + // The name of the namespace that the pod is running in. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") +) + +// A Kubernetes Pod object. +const ( + // The UID of the Pod. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + // The name of the Pod. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") +) + +// A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // The name of the Container from Pod specification, must be unique within a Pod. + // Container runtime usually uses different globally unique name + // (`container.name`). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + // Number of times the container was restarted. This attribute can be used to + // identify a particular container (running or stopped) within a container spec. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 0, 2 + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") +) + +// A Kubernetes ReplicaSet object. +const ( + // The UID of the ReplicaSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + // The name of the ReplicaSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") +) + +// A Kubernetes Deployment object. +const ( + // The UID of the Deployment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + // The name of the Deployment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") +) + +// A Kubernetes StatefulSet object. +const ( + // The UID of the StatefulSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") + // The name of the StatefulSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") +) + +// A Kubernetes DaemonSet object. +const ( + // The UID of the DaemonSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + // The name of the DaemonSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") +) + +// A Kubernetes Job object. +const ( + // The UID of the Job. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + // The name of the Job. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") +) + +// A Kubernetes CronJob object. +const ( + // The UID of the CronJob. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + // The name of the CronJob. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") +) + +// The operating system (OS) on which the process represented by this resource is running. +const ( + // The operating system type. + // + // Type: Enum + // Required: Always + // Stability: stable + OSTypeKey = attribute.Key("os.type") + // Human readable (not intended to be parsed) OS version information, like e.g. + // reported by `ver` or `lsb_release -a` commands. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' + OSDescriptionKey = attribute.Key("os.description") + // Human readable operating system name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + // The version string of the operating system as defined in [Version + // Attributes](../../resource/semantic_conventions/README.md#version-attributes). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// An operating system process. +const ( + // Process identifier (PID). + // + // Type: int + // Required: No + // Stability: stable + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + // The name of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of + // `GetProcessImageFileNameW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + // The full path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + // The command used to launch the process (i.e. the command name). On Linux based + // systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, + // can be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + // The full command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. Do not + // set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + // All the command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited strings + // extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be + // the full argv vector passed to `main`. + // + // Type: string[] + // Required: See below + // Stability: stable + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + // The username of the user that owns the process. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") +) + +// The single (language) runtime instance which is monitored. +const ( + // The name of the runtime of this process. For compiled native binaries, this + // SHOULD be the name of the compiler. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + // The version of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") + // An additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") +) + +// A service instance. +const ( + // Logical name of the service. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled services. If + // the value was not specified, SDKs MUST fallback to `unknown_service:` + // concatenated with [`process.executable.name`](process.md#process), e.g. + // `unknown_service:bash`. If `process.executable.name` is not available, the + // value MUST be set to `unknown_service`. + ServiceNameKey = attribute.Key("service.name") + // A namespace for `service.name`. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group of + // services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` is + // expected to be unique for all services that have no explicit namespace defined + // (so the empty/unspecified namespace is simply one more valid namespace). Zero- + // length namespace string is assumed equal to unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") + // The string ID of the service instance. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be globally + // unique). The ID helps to distinguish instances of the same service that exist + // at the same time (e.g. instances of a horizontally scaled service). It is + // preferable for the ID to be persistent and stay the same for the lifetime of + // the service instance, however it is acceptable that the ID is ephemeral and + // changes during important lifetime events for the service (e.g. service + // restarts). If the service has no inherent unique ID that can be used as the + // value of this attribute it is recommended to generate a random Version 1 or + // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + ServiceInstanceIDKey = attribute.Key("service.instance.id") + // The version string of the service API or implementation. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2.0.0' + ServiceVersionKey = attribute.Key("service.version") +) + +// The telemetry SDK used to capture data recorded by the instrumentation libraries. +const ( + // The name of the telemetry SDK as defined above. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + // The language of the telemetry SDK. + // + // Type: Enum + // Required: No + // Stability: stable + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + // The version string of the telemetry SDK. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") + // The version string of the auto instrumentation agent, if used. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1.2.3' + TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") +) + +// Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. +const ( + // The name of the web engine. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + // The version of the web engine. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") + // Additional description of the web engine (e.g. detailed version and edition + // information). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go new file mode 100644 index 000000000..2f2a019e4 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.12.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go new file mode 100644 index 000000000..047d8e95c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go @@ -0,0 +1,1704 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import "go.opentelemetry.io/otel/attribute" + +// Span attributes used by AWS Lambda (in addition to general `faas` attributes). +const ( + // The full invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the `/runtime/invocation/next` + // applicable). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `faas.id` if an alias is involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// This document defines attributes for CloudEvents. CloudEvents is a specification on how to define event data in a standard way. These attributes can be attached to spans when performing operations with CloudEvents, regardless of the protocol being used. +const ( + // The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec + // .md#id) uniquely identifies the event. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + // The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.m + // d#source-1) identifies the context in which an event happened. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- + // service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + // The [version of the CloudEvents specification](https://github.com/cloudevents/s + // pec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + // The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/sp + // ec.md#type) contains a value describing the type of event related to the + // originating occurrence. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") + // The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec. + // md#subject) of the event in the context of the event producer (identified by + // source). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") +) + +// This document defines semantic conventions for the OpenTracing Shim +const ( + // Parent-child Reference type + // + // Type: Enum + // Required: No + // Stability: stable + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span does not depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// This document defines the attributes used to perform database client calls. +const ( + // An identifier for the database management system (DBMS) product being used. See + // below for a list of well-known identifiers. + // + // Type: Enum + // Required: Always + // Stability: stable + DBSystemKey = attribute.Key("db.system") + // The connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + DBConnectionStringKey = attribute.Key("db.connection_string") + // Username for accessing the database. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'readonly_user', 'reporting_user' + DBUserKey = attribute.Key("db.user") + // The fully-qualified class name of the [Java Database Connectivity + // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver + // used to connect. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") + // This attribute is used to report the name of the database being accessed. For + // commands that switch the database, this should be set to the target database + // (even if the command fails). + // + // Type: string + // Required: Required, if applicable. + // Stability: stable + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called "schema + // name". In case there are multiple layers that could be considered for database + // name (e.g. Oracle instance name and schema name), the database name to be used + // is the more specific layer (e.g. Oracle schema name). + DBNameKey = attribute.Key("db.name") + // The database statement being executed. + // + // Type: string + // Required: Required if applicable and not explicitly disabled via + // instrumentation configuration. + // Stability: stable + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + // Note: The value may be sanitized to exclude sensitive information. + DBStatementKey = attribute.Key("db.statement") + // The name of the operation being executed, e.g. the [MongoDB command + // name](https://docs.mongodb.com/manual/reference/command/#database-operations) + // such as `findAndModify`, or the SQL keyword. + // + // Type: string + // Required: Required, if `db.statement` is not applicable. + // Stability: stable + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to attempt any + // client-side parsing of `db.statement` just to get this property, but it should + // be set if the operation name is provided by the library being instrumented. If + // the SQL statement has an ambiguous operation, or performs more than one + // operation, this value may be omitted. + DBOperationKey = attribute.Key("db.operation") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") +) + +// Connection-level attributes for Microsoft SQL Server +const ( + // The Microsoft SQL Server [instance name](https://docs.microsoft.com/en- + // us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) + // connecting to. This name is used to determine the port of a named instance. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'MSSQLSERVER' + // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer + // required (but still recommended if non-standard). + DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") +) + +// Call-level attributes for Cassandra +const ( + // The fetch size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + // The consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra- + // oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // Required: No + // Stability: stable + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + // The name of the primary table that the operation is acting upon, including the + // keyspace name (if applicable). + // + // Type: string + // Required: Recommended if available. + // Stability: stable + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra rather + // than sql. It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting upon an + // anonymous table, or more than one table, this value MUST NOT be set. + DBCassandraTableKey = attribute.Key("db.cassandra.table") + // Whether or not the query is idempotent. + // + // Type: boolean + // Required: No + // Stability: stable + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + // The number of times a query was speculatively executed. Not set or `0` if the + // query was not executed speculatively. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") + // The ID of the coordinating node for a query. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + // The data center of the coordinating node for a query. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +// Call-level attributes for Redis +const ( + // The index of the database being accessed as used in the [`SELECT` + // command](https://redis.io/commands/select), provided as an integer. To be used + // instead of the generic `db.name` attribute. + // + // Type: int + // Required: Required, if other than the default database (`0`). + // Stability: stable + // Examples: 0, 1, 15 + DBRedisDBIndexKey = attribute.Key("db.redis.database_index") +) + +// Call-level attributes for MongoDB +const ( + // The collection being accessed within the database stated in `db.name`. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'customers', 'products' + DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") +) + +// Call-level attributes for SQL databases +const ( + // The name of the primary table that the operation is acting upon, including the + // database name (if applicable). + // + // Type: string + // Required: Recommended if available. + // Stability: stable + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting upon an + // anonymous table, or more than one table, this value MUST NOT be set. + DBSQLTableKey = attribute.Key("db.sql.table") +) + +// This document defines the attributes used to report a single exception associated with a span. +const ( + // The type of the exception (its fully-qualified class name, if applicable). The + // dynamic type of the exception should be preferred over the static type in + // languages that support it. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") + // The exception message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") + // SHOULD be set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // Required: No + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of a span, + // if that span is ended while the exception is still logically "in flight". + // This may be actually "in flight" in some languages (e.g. if the exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most languages. + + // It is usually not possible to determine at the point where an exception is + // thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending the span, + // as done in the [example above](#recording-an-exception). + + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") +) + +// This semantic convention describes an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with spans. +const ( + // Type of the trigger which caused this function execution. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: For the server/consumer span on the incoming side, + // `faas.trigger` MUST be set. + + // Clients invoking FaaS instances usually cannot set `faas.trigger`, + // since they would typically need to look in the payload to determine + // the event type. If clients set it, it should be the same as the + // trigger that corresponding incoming would have (i.e., this has + // nothing to do with the underlying transport used to make the API + // call to invoke the lambda, which is often HTTP). + FaaSTriggerKey = attribute.Key("faas.trigger") + // The execution ID of the current function execution. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSExecutionKey = attribute.Key("faas.execution") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// Semantic Convention for FaaS triggered as a response to some data source operation such as a database or filesystem read/write. +const ( + // The name of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos + // DB to the database name. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + // Describes the type of the operation that was performed on the data. + // + // Type: Enum + // Required: Always + // Stability: stable + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + // A string containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed + // in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") + // The document name/table subjected to the operation. For example, in Cloud + // Storage or S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // A string containing the function invocation time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed + // in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") + // A string containing the schedule period as [Cron Expression](https://docs.oracl + // e.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") +) + +// Contains additional attributes for incoming FaaS spans. +const ( + // A boolean that is true if the serverless function is executed for the first + // time (aka cold-start). + // + // Type: boolean + // Required: No + // Stability: stable + FaaSColdstartKey = attribute.Key("faas.coldstart") +) + +// Contains additional attributes for outgoing FaaS spans. +const ( + // The name of the invoked function. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked + // function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + // The cloud provider of the invoked function. + // + // Type: Enum + // Required: Always + // Stability: stable + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked + // function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + // The cloud region of the invoked function. + // + // Type: string + // Required: For some cloud providers, like AWS or GCP, the region in which a + // function is hosted is essential to uniquely identify the function and also part + // of its endpoint. Since it's part of the endpoint being called, the region is + // always known to clients. In these cases, `faas.invoked_region` MUST be set + // accordingly. If the region is unknown to the client or not required for + // identifying the invoked function, setting `faas.invoked_region` is optional. + // Stability: stable + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked + // function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +// These attributes may be used for any network related operation. +const ( + // Transport protocol used. See note below. + // + // Type: Enum + // Required: No + // Stability: stable + NetTransportKey = attribute.Key("net.transport") + // Remote address of the peer (dotted decimal for IPv4 or + // [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) + // + // Type: string + // Required: No + // Stability: stable + // Examples: '127.0.0.1' + NetPeerIPKey = attribute.Key("net.peer.ip") + // Remote port number. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 80, 8080, 443 + NetPeerPortKey = attribute.Key("net.peer.port") + // Remote hostname or similar, see note below. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'example.com' + // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an extra + // DNS lookup. + NetPeerNameKey = attribute.Key("net.peer.name") + // Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '192.168.0.1' + NetHostIPKey = attribute.Key("net.host.ip") + // Like `net.peer.port` but for the host port. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 35555 + NetHostPortKey = attribute.Key("net.host.port") + // Local hostname or similar, see note below. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'localhost' + NetHostNameKey = attribute.Key("net.host.name") + // The internet connection type currently being used by the host. + // + // Type: Enum + // Required: No + // Stability: stable + // Examples: 'wifi' + NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") + // This describes more details regarding the connection.type. It may be the type + // of cell technology connection, but it could be used for describing details + // about a wifi connection. + // + // Type: Enum + // Required: No + // Stability: stable + // Examples: 'LTE' + NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") + // The name of the mobile carrier. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'sprint' + NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") + // The mobile carrier country code. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '310' + NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") + // The mobile carrier network code. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '001' + NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") + // The ISO 3166-1 alpha-2 2-character country code associated with the mobile + // carrier network. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'DE' + NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") +) + +var ( + // ip_tcp + NetTransportTCP = NetTransportKey.String("ip_tcp") + // ip_udp + NetTransportUDP = NetTransportKey.String("ip_udp") + // Another IP-based protocol + NetTransportIP = NetTransportKey.String("ip") + // Unix Domain socket. See below + NetTransportUnix = NetTransportKey.String("unix") + // Named or anonymous pipe. See note below + NetTransportPipe = NetTransportKey.String("pipe") + // In-process communication + NetTransportInProc = NetTransportKey.String("inproc") + // Something else (non IP-based) + NetTransportOther = NetTransportKey.String("other") +) + +var ( + // wifi + NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") + // wired + NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") + // cell + NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") + // unavailable + NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") + // unknown + NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") +) + +var ( + // GPRS + NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") + // EDGE + NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") + // UMTS + NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") + // CDMA + NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") + // HSPA + NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") + // IDEN + NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") + // LTE + NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") + // EHRPD + NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") + // GSM + NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") +) + +// Operations that access some remote service. +const ( + // The [`service.name`](../../resource/semantic_conventions/README.md#service) of + // the remote service. SHOULD be equal to the actual `service.name` resource + // attribute of the remote service if any. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// These attributes may be used for any operation with an authenticated and/or authorized enduser. +const ( + // Username or client_id extracted from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the + // inbound request from outside the system. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + // Actual/assumed role the client is making the request under extracted from token + // or application security context. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + // Scopes or granted authorities the client currently possesses extracted from + // token or application security context. The value would come from the scope + // associated with an [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value + // in a [SAML 2.0 Assertion](http://docs.oasis- + // open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// These attributes may be used for any operation to store information about a thread that started a span. +const ( + // Current "managed" thread ID (as opposed to OS thread ID). + // + // Type: int + // Required: No + // Stability: stable + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + // Current thread name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// These attributes allow to report this unit of code and therefore to provide more context about the span. +const ( + // The method or function name, or equivalent (usually rightmost part of the code + // unit's name). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + // The "namespace" within which `code.function` is defined. Usually the qualified + // class or module name, such that `code.namespace` + some separator + + // `code.function` form a unique identifier for the code unit. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + // The source code file name that identifies the code unit as uniquely as possible + // (preferably an absolute file path). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + // The line number in `code.filepath` best representing the operation. It SHOULD + // point within the code unit named in `code.function`. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") +) + +// This document defines semantic conventions for HTTP client and server Spans. +const ( + // HTTP request method. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + HTTPMethodKey = attribute.Key("http.method") + // Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. + // Usually the fragment is not transmitted over HTTP, but if it is known, it + // should be included nevertheless. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + // Note: `http.url` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case the attribute's + // value should be `https://www.example.com/`. + HTTPURLKey = attribute.Key("http.url") + // The full request target as passed in a HTTP request line or equivalent. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/path/12314/?q=ddds#123' + HTTPTargetKey = attribute.Key("http.target") + // The value of the [HTTP host + // header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header + // should also be reported, see note. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'www.example.org' + // Note: When the header is present but empty the attribute SHOULD be set to the + // empty string. Note that this is a valid situation that is expected in certain + // cases, according the aforementioned [section of RFC + // 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not + // set the attribute MUST NOT be set. + HTTPHostKey = attribute.Key("http.host") + // The URI scheme identifying the used protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'http', 'https' + HTTPSchemeKey = attribute.Key("http.scheme") + // [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // Required: If and only if one was received/sent. + // Stability: stable + // Examples: 200 + HTTPStatusCodeKey = attribute.Key("http.status_code") + // Kind of HTTP protocol used. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` + // except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + HTTPFlavorKey = attribute.Key("http.flavor") + // Value of the [HTTP User- + // Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the + // client. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' + HTTPUserAgentKey = attribute.Key("http.user_agent") + // The size of the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For + // requests using transport encoding, this should be the compressed size. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 3495 + HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") + // The size of the uncompressed request payload body after transport decoding. Not + // set if transport encoding not used. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5493 + HTTPRequestContentLengthUncompressedKey = attribute.Key("http.request_content_length_uncompressed") + // The size of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For + // requests using transport encoding, this should be the compressed size. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 3495 + HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") + // The size of the uncompressed response payload body after transport decoding. + // Not set if transport encoding not used. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5493 + HTTPResponseContentLengthUncompressedKey = attribute.Key("http.response_content_length_uncompressed") + // The ordinal number of request re-sending attempt. + // + // Type: int + // Required: If and only if a request was retried. + // Stability: stable + // Examples: 3 + HTTPRetryCountKey = attribute.Key("http.retry_count") +) + +var ( + // HTTP/1.0 + HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") + // HTTP/1.1 + HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") + // HTTP/2 + HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") + // HTTP/3 + HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") + // SPDY protocol + HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") + // QUIC protocol + HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") +) + +// Semantic Convention for HTTP Server +const ( + // The primary server name of the matched virtual host. This should be obtained + // via configuration. If no such configuration can be obtained, this attribute + // MUST NOT be set ( `net.host.name` should be used instead). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'example.com' + // Note: `http.url` is usually not readily available on the server side but would + // have to be assembled in a cumbersome and sometimes lossy process from other + // information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus + // preferred to supply the raw data that is available. + HTTPServerNameKey = attribute.Key("http.server_name") + // The matched route (path template). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/users/:userID?' + HTTPRouteKey = attribute.Key("http.route") + // The IP address of the original client behind all proxies, if known (e.g. from + // [X-Forwarded-For](https://developer.mozilla.org/en- + // US/docs/Web/HTTP/Headers/X-Forwarded-For)). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '83.164.160.102' + // Note: This is not necessarily the same as `net.peer.ip`, which would + // identify the network-level peer, which may be a proxy. + + // This attribute should be set when a source of information different + // from the one used for `net.peer.ip`, is available even if that other + // source just confirms the same value as `net.peer.ip`. + // Rationale: For `net.peer.ip`, one typically does not know if it + // comes from a proxy, reverse proxy, or the actual client. Setting + // `http.client_ip` when it's the same as `net.peer.ip` means that + // one is at least somewhat confident that the address is not that of + // the closest proxy. + HTTPClientIPKey = attribute.Key("http.client_ip") +) + +// Attributes that exist for multiple DynamoDB request types. +const ( + // The keys in the `RequestItems` object field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") + // The JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { + // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, + // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": + // "string", "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + // The JSON-serialized value of the `ItemCollectionMetrics` response field. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, + // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : + // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": + // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + // The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. + // + // Type: double + // Required: No + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + // The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // Required: No + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + // The value of the `ConsistentRead` request parameter. + // + // Type: boolean + // Required: No + // Stability: stable + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + // The value of the `ProjectionExpression` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, + // ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + // The value of the `Limit` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + // The value of the `AttributesToGet` request parameter. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + // The value of the `IndexName` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + // The value of the `Select` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") +) + +// DynamoDB.CreateTable +const ( + // The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request + // field + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": + // number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + // The JSON-serialized value of each item of the `LocalSecondaryIndexes` request + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": + // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") +) + +// DynamoDB.ListTables +const ( + // The value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + // The the number of items in the `TableNames` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") +) + +// DynamoDB.Query +const ( + // The value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // Required: No + // Stability: stable + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") +) + +// DynamoDB.Scan +const ( + // The value of the `Segment` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + // The value of the `TotalSegments` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") + // The value of the `Count` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + // The value of the `ScannedCount` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") +) + +// DynamoDB.UpdateTable +const ( + // The JSON-serialized value of each item in the `AttributeDefinitions` request + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + // The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` + // request field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") +) + +// This document defines the attributes used in messaging systems. +const ( + // A string identifying the messaging system. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + MessagingSystemKey = attribute.Key("messaging.system") + // The message destination name. This might be equal to the span name but is + // required nevertheless. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'MyQueue', 'MyTopic' + MessagingDestinationKey = attribute.Key("messaging.destination") + // The kind of message destination + // + // Type: Enum + // Required: Required only if the message destination is either a `queue` or + // `topic`. + // Stability: stable + MessagingDestinationKindKey = attribute.Key("messaging.destination_kind") + // A boolean that is true if the message destination is temporary. + // + // Type: boolean + // Required: If missing, it is assumed to be false. + // Stability: stable + MessagingTempDestinationKey = attribute.Key("messaging.temp_destination") + // The name of the transport protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'AMQP', 'MQTT' + MessagingProtocolKey = attribute.Key("messaging.protocol") + // The version of the transport protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.9.1' + MessagingProtocolVersionKey = attribute.Key("messaging.protocol_version") + // Connection string. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'tibjmsnaming://localhost:7222', + // 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue' + MessagingURLKey = attribute.Key("messaging.url") + // A value used by the messaging system as an identifier for the message, + // represented as a string. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message_id") + // The [conversation ID](#conversations) identifying the conversation to which the + // message belongs, represented as a string. Sometimes called "Correlation ID". + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'MyConversationID' + MessagingConversationIDKey = attribute.Key("messaging.conversation_id") + // The (uncompressed) size of the message payload in bytes. Also use this + // attribute if it is unknown whether the compressed or uncompressed payload size + // is reported. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2738 + MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message_payload_size_bytes") + // The compressed size of the message payload in bytes. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2048 + MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message_payload_compressed_size_bytes") +) + +var ( + // A message sent to a queue + MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue") + // A message sent to a topic + MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic") +) + +// Semantic convention for a consumer of messages received from a messaging system +const ( + // A string identifying the kind of message consumption as defined in the + // [Operation names](#operation-names) section above. If the operation is "send", + // this attribute MUST NOT be set, since the operation can be inferred from the + // span kind in that case. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingOperationKey = attribute.Key("messaging.operation") + // The identifier for the consumer receiving a message. For Kafka, set it to + // `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are + // present, or only `messaging.kafka.consumer_group`. For brokers, such as + // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the + // message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'mygroup - client-6' + MessagingConsumerIDKey = attribute.Key("messaging.consumer_id") +) + +var ( + // receive + MessagingOperationReceive = MessagingOperationKey.String("receive") + // process + MessagingOperationProcess = MessagingOperationKey.String("process") +) + +// Attributes for RabbitMQ +const ( + // RabbitMQ message routing key. + // + // Type: string + // Required: Unless it is empty. + // Stability: stable + // Examples: 'myKey' + MessagingRabbitmqRoutingKeyKey = attribute.Key("messaging.rabbitmq.routing_key") +) + +// Attributes for Apache Kafka +const ( + // Message keys in Kafka are used for grouping alike messages to ensure they're + // processed on the same partition. They differ from `messaging.message_id` in + // that they're not unique. If the key is `null`, the attribute MUST NOT be set. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to be + // supplied for the attribute. If the key has no unambiguous, canonical string + // form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message_key") + // Name of the Kafka Consumer Group that is handling the message. Only applies to + // consumers, not producers. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer_group") + // Client ID for the Consumer or Producer that is handling the message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'client-5' + MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") + // Partition the message is sent to. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2 + MessagingKafkaPartitionKey = attribute.Key("messaging.kafka.partition") + // A boolean that is true if the message is a tombstone. + // + // Type: boolean + // Required: If missing, it is assumed to be false. + // Stability: stable + MessagingKafkaTombstoneKey = attribute.Key("messaging.kafka.tombstone") +) + +// Attributes for Apache RocketMQ +const ( + // Namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + // Name of the RocketMQ producer/consumer group that is handling the message. The + // client type is identified by the SpanKind. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + // The unique identifier for each client. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myhost@8742@s8083jm' + MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") + // Type of message. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message_type") + // The secondary classifier of message besides topic. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message_tag") + // Key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message_keys") + // Model of message consumption. This only applies to consumer spans. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +// This document defines semantic conventions for remote procedure calls. +const ( + // A string identifying the remoting system. See below for a list of well-known + // identifiers. + // + // Type: Enum + // Required: Always + // Stability: stable + RPCSystemKey = attribute.Key("rpc.system") + // The full (logical) name of the service being called, including its package + // name, if applicable. + // + // Type: string + // Required: No, but recommended + // Stability: stable + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing class. + // The `code.namespace` attribute may be used to store the latter (despite the + // attribute name, it may include a class name; e.g., class with method actually + // executing the call on the server side, RPC client stub class on the client + // side). + RPCServiceKey = attribute.Key("rpc.service") + // The name of the (logical) method being called, must be equal to the $method + // part in the span name. + // + // Type: string + // Required: No, but recommended + // Stability: stable + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the latter + // (e.g., method actually executing the call on the server side, RPC client stub + // method on the client side). + RPCMethodKey = attribute.Key("rpc.method") +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") +) + +// Tech-specific attributes for gRPC. +const ( + // The [numeric status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC + // request. + // + // Type: Enum + // Required: Always + // Stability: stable + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC + // 1.0 does not specify this, the value can be omitted. + // + // Type: string + // Required: If missing, it is assumed to be "1.0". + // Stability: stable + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + // `id` property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be cast to + // string for simplicity. Use empty string in case of `null` value. Omit entirely + // if this is a notification. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + // `error.code` property of response if it is an error response. + // + // Type: int + // Required: If missing, response is assumed to be successful. + // Stability: stable + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + // `error.message` property of response if it is an error response. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") +) + +// RPC received/sent message. +const ( + // Whether this is a received or sent message. + // + // Type: Enum + // Required: No + // Stability: stable + MessageTypeKey = attribute.Key("message.type") + // MUST be calculated as two different counters starting from `1` one for sent + // messages and one for received message. + // + // Type: int + // Required: No + // Stability: stable + // Note: This way we guarantee that the values will be consistent between + // different implementations. + MessageIDKey = attribute.Key("message.id") + // Compressed size of the message in bytes. + // + // Type: int + // Required: No + // Stability: stable + MessageCompressedSizeKey = attribute.Key("message.compressed_size") + // Uncompressed size of the message in bytes. + // + // Type: int + // Required: No + // Stability: stable + MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") +) + +var ( + // sent + MessageTypeSent = MessageTypeKey.String("SENT") + // received + MessageTypeReceived = MessageTypeKey.String("RECEIVED") +) diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go new file mode 100644 index 000000000..caf7249de --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +import ( + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/trace" +) + +// Tracer creates a named tracer that implements Tracer interface. +// If the name is an empty string then provider uses default name. +// +// This is short for GetTracerProvider().Tracer(name, opts...) +func Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return GetTracerProvider().Tracer(name, opts...) +} + +// GetTracerProvider returns the registered global trace provider. +// If none is registered then an instance of NoopTracerProvider is returned. +// +// Use the trace provider to create a named tracer. E.g. +// +// tracer := otel.GetTracerProvider().Tracer("example.com/foo") +// +// or +// +// tracer := otel.Tracer("example.com/foo") +func GetTracerProvider() trace.TracerProvider { + return global.TracerProvider() +} + +// SetTracerProvider registers `tp` as the global trace provider. +func SetTracerProvider(tp trace.TracerProvider) { + global.SetTracerProvider(tp) +} diff --git a/vendor/go.opentelemetry.io/otel/trace/LICENSE b/vendor/go.opentelemetry.io/otel/trace/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go new file mode 100644 index 000000000..f058cc781 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/config.go @@ -0,0 +1,316 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "time" + + "go.opentelemetry.io/otel/attribute" +) + +// TracerConfig is a group of options for a Tracer. +type TracerConfig struct { + instrumentationVersion string + // Schema URL of the telemetry emitted by the Tracer. + schemaURL string +} + +// InstrumentationVersion returns the version of the library providing instrumentation. +func (t *TracerConfig) InstrumentationVersion() string { + return t.instrumentationVersion +} + +// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. +func (t *TracerConfig) SchemaURL() string { + return t.schemaURL +} + +// NewTracerConfig applies all the options to a returned TracerConfig. +func NewTracerConfig(options ...TracerOption) TracerConfig { + var config TracerConfig + for _, option := range options { + config = option.apply(config) + } + return config +} + +// TracerOption applies an option to a TracerConfig. +type TracerOption interface { + apply(TracerConfig) TracerConfig +} + +type tracerOptionFunc func(TracerConfig) TracerConfig + +func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { + return fn(cfg) +} + +// SpanConfig is a group of options for a Span. +type SpanConfig struct { + attributes []attribute.KeyValue + timestamp time.Time + links []Link + newRoot bool + spanKind SpanKind + stackTrace bool +} + +// Attributes describe the associated qualities of a Span. +func (cfg *SpanConfig) Attributes() []attribute.KeyValue { + return cfg.attributes +} + +// Timestamp is a time in a Span life-cycle. +func (cfg *SpanConfig) Timestamp() time.Time { + return cfg.timestamp +} + +// StackTrace checks whether stack trace capturing is enabled. +func (cfg *SpanConfig) StackTrace() bool { + return cfg.stackTrace +} + +// Links are the associations a Span has with other Spans. +func (cfg *SpanConfig) Links() []Link { + return cfg.links +} + +// NewRoot identifies a Span as the root Span for a new trace. This is +// commonly used when an existing trace crosses trust boundaries and the +// remote parent span context should be ignored for security. +func (cfg *SpanConfig) NewRoot() bool { + return cfg.newRoot +} + +// SpanKind is the role a Span has in a trace. +func (cfg *SpanConfig) SpanKind() SpanKind { + return cfg.spanKind +} + +// NewSpanStartConfig applies all the options to a returned SpanConfig. +// No validation is performed on the returned SpanConfig (e.g. no uniqueness +// checking or bounding of data), it is left to the SDK to perform this +// action. +func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { + var c SpanConfig + for _, option := range options { + c = option.applySpanStart(c) + } + return c +} + +// NewSpanEndConfig applies all the options to a returned SpanConfig. +// No validation is performed on the returned SpanConfig (e.g. no uniqueness +// checking or bounding of data), it is left to the SDK to perform this +// action. +func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { + var c SpanConfig + for _, option := range options { + c = option.applySpanEnd(c) + } + return c +} + +// SpanStartOption applies an option to a SpanConfig. These options are applicable +// only when the span is created. +type SpanStartOption interface { + applySpanStart(SpanConfig) SpanConfig +} + +type spanOptionFunc func(SpanConfig) SpanConfig + +func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { + return fn(cfg) +} + +// SpanEndOption applies an option to a SpanConfig. These options are +// applicable only when the span is ended. +type SpanEndOption interface { + applySpanEnd(SpanConfig) SpanConfig +} + +// EventConfig is a group of options for an Event. +type EventConfig struct { + attributes []attribute.KeyValue + timestamp time.Time + stackTrace bool +} + +// Attributes describe the associated qualities of an Event. +func (cfg *EventConfig) Attributes() []attribute.KeyValue { + return cfg.attributes +} + +// Timestamp is a time in an Event life-cycle. +func (cfg *EventConfig) Timestamp() time.Time { + return cfg.timestamp +} + +// StackTrace checks whether stack trace capturing is enabled. +func (cfg *EventConfig) StackTrace() bool { + return cfg.stackTrace +} + +// NewEventConfig applies all the EventOptions to a returned EventConfig. If no +// timestamp option is passed, the returned EventConfig will have a Timestamp +// set to the call time, otherwise no validation is performed on the returned +// EventConfig. +func NewEventConfig(options ...EventOption) EventConfig { + var c EventConfig + for _, option := range options { + c = option.applyEvent(c) + } + if c.timestamp.IsZero() { + c.timestamp = time.Now() + } + return c +} + +// EventOption applies span event options to an EventConfig. +type EventOption interface { + applyEvent(EventConfig) EventConfig +} + +// SpanOption are options that can be used at both the beginning and end of a span. +type SpanOption interface { + SpanStartOption + SpanEndOption +} + +// SpanStartEventOption are options that can be used at the start of a span, or with an event. +type SpanStartEventOption interface { + SpanStartOption + EventOption +} + +// SpanEndEventOption are options that can be used at the end of a span, or with an event. +type SpanEndEventOption interface { + SpanEndOption + EventOption +} + +type attributeOption []attribute.KeyValue + +func (o attributeOption) applySpan(c SpanConfig) SpanConfig { + c.attributes = append(c.attributes, []attribute.KeyValue(o)...) + return c +} +func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o attributeOption) applyEvent(c EventConfig) EventConfig { + c.attributes = append(c.attributes, []attribute.KeyValue(o)...) + return c +} + +var _ SpanStartEventOption = attributeOption{} + +// WithAttributes adds the attributes related to a span life-cycle event. +// These attributes are used to describe the work a Span represents when this +// option is provided to a Span's start or end events. Otherwise, these +// attributes provide additional information about the event being recorded +// (e.g. error, state change, processing progress, system event). +// +// If multiple of these options are passed the attributes of each successive +// option will extend the attributes instead of overwriting. There is no +// guarantee of uniqueness in the resulting attributes. +func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { + return attributeOption(attributes) +} + +// SpanEventOption are options that can be used with an event or a span. +type SpanEventOption interface { + SpanOption + EventOption +} + +type timestampOption time.Time + +func (o timestampOption) applySpan(c SpanConfig) SpanConfig { + c.timestamp = time.Time(o) + return c +} +func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } +func (o timestampOption) applyEvent(c EventConfig) EventConfig { + c.timestamp = time.Time(o) + return c +} + +var _ SpanEventOption = timestampOption{} + +// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. +// started, stopped, errored). +func WithTimestamp(t time.Time) SpanEventOption { + return timestampOption(t) +} + +type stackTraceOption bool + +func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { + c.stackTrace = bool(o) + return c +} +func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { + c.stackTrace = bool(o) + return c +} +func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } + +// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). +func WithStackTrace(b bool) SpanEndEventOption { + return stackTraceOption(b) +} + +// WithLinks adds links to a Span. The links are added to the existing Span +// links, i.e. this does not overwrite. Links with invalid span context are ignored. +func WithLinks(links ...Link) SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.links = append(cfg.links, links...) + return cfg + }) +} + +// WithNewRoot specifies that the Span should be treated as a root Span. Any +// existing parent span context will be ignored when defining the Span's trace +// identifiers. +func WithNewRoot() SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.newRoot = true + return cfg + }) +} + +// WithSpanKind sets the SpanKind of a Span. +func WithSpanKind(kind SpanKind) SpanStartOption { + return spanOptionFunc(func(cfg SpanConfig) SpanConfig { + cfg.spanKind = kind + return cfg + }) +} + +// WithInstrumentationVersion sets the instrumentation version. +func WithInstrumentationVersion(version string) TracerOption { + return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { + cfg.instrumentationVersion = version + return cfg + }) +} + +// WithSchemaURL sets the schema URL for the Tracer. +func WithSchemaURL(schemaURL string) TracerOption { + return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { + cfg.schemaURL = schemaURL + return cfg + }) +} diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go new file mode 100644 index 000000000..76f9a083c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/context.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +import "context" + +type traceContextKeyType int + +const currentSpanKey traceContextKeyType = iota + +// ContextWithSpan returns a copy of parent with span set as the current Span. +func ContextWithSpan(parent context.Context, span Span) context.Context { + return context.WithValue(parent, currentSpanKey, span) +} + +// ContextWithSpanContext returns a copy of parent with sc as the current +// Span. The Span implementation that wraps sc is non-recording and performs +// no operations other than to return sc as the SpanContext from the +// SpanContext method. +func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { + return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) +} + +// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicly +// as a remote SpanContext and as the current Span. The Span implementation +// that wraps rsc is non-recording and performs no operations other than to +// return rsc as the SpanContext from the SpanContext method. +func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { + return ContextWithSpanContext(parent, rsc.WithRemote(true)) +} + +// SpanFromContext returns the current Span from ctx. +// +// If no Span is currently set in ctx an implementation of a Span that +// performs no operations is returned. +func SpanFromContext(ctx context.Context) Span { + if ctx == nil { + return noopSpan{} + } + if span, ok := ctx.Value(currentSpanKey).(Span); ok { + return span + } + return noopSpan{} +} + +// SpanContextFromContext returns the current Span's SpanContext. +func SpanContextFromContext(ctx context.Context) SpanContext { + return SpanFromContext(ctx).SpanContext() +} diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go new file mode 100644 index 000000000..ab0346f96 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/doc.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package trace provides an implementation of the tracing part of the +OpenTelemetry API. + +To participate in distributed traces a Span needs to be created for the +operation being performed as part of a traced workflow. In its simplest form: + + var tracer trace.Tracer + + func init() { + tracer = otel.Tracer("instrumentation/package/name") + } + + func operation(ctx context.Context) { + var span trace.Span + ctx, span = tracer.Start(ctx, "operation") + defer span.End() + // ... + } + +A Tracer is unique to the instrumentation and is used to create Spans. +Instrumentation should be designed to accept a TracerProvider from which it +can create its own unique Tracer. Alternatively, the registered global +TracerProvider from the go.opentelemetry.io/otel package can be used as +a default. + + const ( + name = "instrumentation/package/name" + version = "0.1.0" + ) + + type Instrumentation struct { + tracer trace.Tracer + } + + func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { + if tp == nil { + tp = otel.TracerProvider() + } + return &Instrumentation{ + tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), + } + } + + func operation(ctx context.Context, inst *Instrumentation) { + var span trace.Span + ctx, span = inst.tracer.Start(ctx, "operation") + defer span.End() + // ... + } +*/ +package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go new file mode 100644 index 000000000..88fcb8161 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +// nonRecordingSpan is a minimal implementation of a Span that wraps a +// SpanContext. It performs no operations other than to return the wrapped +// SpanContext. +type nonRecordingSpan struct { + noopSpan + + sc SpanContext +} + +// SpanContext returns the wrapped SpanContext. +func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go new file mode 100644 index 000000000..73950f207 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/noop.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "context" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" +) + +// NewNoopTracerProvider returns an implementation of TracerProvider that +// performs no operations. The Tracer and Spans created from the returned +// TracerProvider also perform no operations. +func NewNoopTracerProvider() TracerProvider { + return noopTracerProvider{} +} + +type noopTracerProvider struct{} + +var _ TracerProvider = noopTracerProvider{} + +// Tracer returns noop implementation of Tracer. +func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { + return noopTracer{} +} + +// noopTracer is an implementation of Tracer that preforms no operations. +type noopTracer struct{} + +var _ Tracer = noopTracer{} + +// Start carries forward a non-recording Span, if one is present in the context, otherwise it +// creates a no-op Span. +func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption) (context.Context, Span) { + span := SpanFromContext(ctx) + if _, ok := span.(nonRecordingSpan); !ok { + // span is likely already a noopSpan, but let's be sure + span = noopSpan{} + } + return ContextWithSpan(ctx, span), span +} + +// noopSpan is an implementation of Span that preforms no operations. +type noopSpan struct{} + +var _ Span = noopSpan{} + +// SpanContext returns an empty span context. +func (noopSpan) SpanContext() SpanContext { return SpanContext{} } + +// IsRecording always returns false. +func (noopSpan) IsRecording() bool { return false } + +// SetStatus does nothing. +func (noopSpan) SetStatus(codes.Code, string) {} + +// SetError does nothing. +func (noopSpan) SetError(bool) {} + +// SetAttributes does nothing. +func (noopSpan) SetAttributes(...attribute.KeyValue) {} + +// End does nothing. +func (noopSpan) End(...SpanEndOption) {} + +// RecordError does nothing. +func (noopSpan) RecordError(error, ...EventOption) {} + +// AddEvent does nothing. +func (noopSpan) AddEvent(string, ...EventOption) {} + +// SetName does nothing. +func (noopSpan) SetName(string) {} + +// TracerProvider returns a no-op TracerProvider. +func (noopSpan) TracerProvider() TracerProvider { return noopTracerProvider{} } diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go new file mode 100644 index 000000000..4aa94f79f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/trace.go @@ -0,0 +1,551 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "bytes" + "context" + "encoding/hex" + "encoding/json" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" +) + +const ( + // FlagsSampled is a bitmask with the sampled bit set. A SpanContext + // with the sampling bit set means the span is sampled. + FlagsSampled = TraceFlags(0x01) + + errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" + + errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" + errNilTraceID errorConst = "trace-id can't be all zero" + + errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" + errNilSpanID errorConst = "span-id can't be all zero" +) + +type errorConst string + +func (e errorConst) Error() string { + return string(e) +} + +// TraceID is a unique identity of a trace. +// nolint:revive // revive complains about stutter of `trace.TraceID`. +type TraceID [16]byte + +var nilTraceID TraceID +var _ json.Marshaler = nilTraceID + +// IsValid checks whether the trace TraceID is valid. A valid trace ID does +// not consist of zeros only. +func (t TraceID) IsValid() bool { + return !bytes.Equal(t[:], nilTraceID[:]) +} + +// MarshalJSON implements a custom marshal function to encode TraceID +// as a hex string. +func (t TraceID) MarshalJSON() ([]byte, error) { + return json.Marshal(t.String()) +} + +// String returns the hex string representation form of a TraceID. +func (t TraceID) String() string { + return hex.EncodeToString(t[:]) +} + +// SpanID is a unique identity of a span in a trace. +type SpanID [8]byte + +var nilSpanID SpanID +var _ json.Marshaler = nilSpanID + +// IsValid checks whether the SpanID is valid. A valid SpanID does not consist +// of zeros only. +func (s SpanID) IsValid() bool { + return !bytes.Equal(s[:], nilSpanID[:]) +} + +// MarshalJSON implements a custom marshal function to encode SpanID +// as a hex string. +func (s SpanID) MarshalJSON() ([]byte, error) { + return json.Marshal(s.String()) +} + +// String returns the hex string representation form of a SpanID. +func (s SpanID) String() string { + return hex.EncodeToString(s[:]) +} + +// TraceIDFromHex returns a TraceID from a hex string if it is compliant with +// the W3C trace-context specification. See more at +// https://www.w3.org/TR/trace-context/#trace-id +// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`. +func TraceIDFromHex(h string) (TraceID, error) { + t := TraceID{} + if len(h) != 32 { + return t, errInvalidTraceIDLength + } + + if err := decodeHex(h, t[:]); err != nil { + return t, err + } + + if !t.IsValid() { + return t, errNilTraceID + } + return t, nil +} + +// SpanIDFromHex returns a SpanID from a hex string if it is compliant +// with the w3c trace-context specification. +// See more at https://www.w3.org/TR/trace-context/#parent-id +func SpanIDFromHex(h string) (SpanID, error) { + s := SpanID{} + if len(h) != 16 { + return s, errInvalidSpanIDLength + } + + if err := decodeHex(h, s[:]); err != nil { + return s, err + } + + if !s.IsValid() { + return s, errNilSpanID + } + return s, nil +} + +func decodeHex(h string, b []byte) error { + for _, r := range h { + switch { + case 'a' <= r && r <= 'f': + continue + case '0' <= r && r <= '9': + continue + default: + return errInvalidHexID + } + } + + decoded, err := hex.DecodeString(h) + if err != nil { + return err + } + + copy(b, decoded) + return nil +} + +// TraceFlags contains flags that can be set on a SpanContext. +type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`. + +// IsSampled returns if the sampling bit is set in the TraceFlags. +func (tf TraceFlags) IsSampled() bool { + return tf&FlagsSampled == FlagsSampled +} + +// WithSampled sets the sampling bit in a new copy of the TraceFlags. +func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag. + if sampled { + return tf | FlagsSampled + } + + return tf &^ FlagsSampled +} + +// MarshalJSON implements a custom marshal function to encode TraceFlags +// as a hex string. +func (tf TraceFlags) MarshalJSON() ([]byte, error) { + return json.Marshal(tf.String()) +} + +// String returns the hex string representation form of TraceFlags. +func (tf TraceFlags) String() string { + return hex.EncodeToString([]byte{byte(tf)}[:]) +} + +// SpanContextConfig contains mutable fields usable for constructing +// an immutable SpanContext. +type SpanContextConfig struct { + TraceID TraceID + SpanID SpanID + TraceFlags TraceFlags + TraceState TraceState + Remote bool +} + +// NewSpanContext constructs a SpanContext using values from the provided +// SpanContextConfig. +func NewSpanContext(config SpanContextConfig) SpanContext { + return SpanContext{ + traceID: config.TraceID, + spanID: config.SpanID, + traceFlags: config.TraceFlags, + traceState: config.TraceState, + remote: config.Remote, + } +} + +// SpanContext contains identifying trace information about a Span. +type SpanContext struct { + traceID TraceID + spanID SpanID + traceFlags TraceFlags + traceState TraceState + remote bool +} + +var _ json.Marshaler = SpanContext{} + +// IsValid returns if the SpanContext is valid. A valid span context has a +// valid TraceID and SpanID. +func (sc SpanContext) IsValid() bool { + return sc.HasTraceID() && sc.HasSpanID() +} + +// IsRemote indicates whether the SpanContext represents a remotely-created Span. +func (sc SpanContext) IsRemote() bool { + return sc.remote +} + +// WithRemote returns a copy of sc with the Remote property set to remote. +func (sc SpanContext) WithRemote(remote bool) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: remote, + } +} + +// TraceID returns the TraceID from the SpanContext. +func (sc SpanContext) TraceID() TraceID { + return sc.traceID +} + +// HasTraceID checks if the SpanContext has a valid TraceID. +func (sc SpanContext) HasTraceID() bool { + return sc.traceID.IsValid() +} + +// WithTraceID returns a new SpanContext with the TraceID replaced. +func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { + return SpanContext{ + traceID: traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// SpanID returns the SpanID from the SpanContext. +func (sc SpanContext) SpanID() SpanID { + return sc.spanID +} + +// HasSpanID checks if the SpanContext has a valid SpanID. +func (sc SpanContext) HasSpanID() bool { + return sc.spanID.IsValid() +} + +// WithSpanID returns a new SpanContext with the SpanID replaced. +func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: spanID, + traceFlags: sc.traceFlags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// TraceFlags returns the flags from the SpanContext. +func (sc SpanContext) TraceFlags() TraceFlags { + return sc.traceFlags +} + +// IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags. +func (sc SpanContext) IsSampled() bool { + return sc.traceFlags.IsSampled() +} + +// WithTraceFlags returns a new SpanContext with the TraceFlags replaced. +func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: flags, + traceState: sc.traceState, + remote: sc.remote, + } +} + +// TraceState returns the TraceState from the SpanContext. +func (sc SpanContext) TraceState() TraceState { + return sc.traceState +} + +// WithTraceState returns a new SpanContext with the TraceState replaced. +func (sc SpanContext) WithTraceState(state TraceState) SpanContext { + return SpanContext{ + traceID: sc.traceID, + spanID: sc.spanID, + traceFlags: sc.traceFlags, + traceState: state, + remote: sc.remote, + } +} + +// Equal is a predicate that determines whether two SpanContext values are equal. +func (sc SpanContext) Equal(other SpanContext) bool { + return sc.traceID == other.traceID && + sc.spanID == other.spanID && + sc.traceFlags == other.traceFlags && + sc.traceState.String() == other.traceState.String() && + sc.remote == other.remote +} + +// MarshalJSON implements a custom marshal function to encode a SpanContext. +func (sc SpanContext) MarshalJSON() ([]byte, error) { + return json.Marshal(SpanContextConfig{ + TraceID: sc.traceID, + SpanID: sc.spanID, + TraceFlags: sc.traceFlags, + TraceState: sc.traceState, + Remote: sc.remote, + }) +} + +// Span is the individual component of a trace. It represents a single named +// and timed operation of a workflow that is traced. A Tracer is used to +// create a Span and it is then up to the operation the Span represents to +// properly end the Span when the operation itself ends. +// +// Warning: methods may be added to this interface in minor releases. +type Span interface { + // End completes the Span. The Span is considered complete and ready to be + // delivered through the rest of the telemetry pipeline after this method + // is called. Therefore, updates to the Span are not allowed after this + // method has been called. + End(options ...SpanEndOption) + + // AddEvent adds an event with the provided name and options. + AddEvent(name string, options ...EventOption) + + // IsRecording returns the recording state of the Span. It will return + // true if the Span is active and events can be recorded. + IsRecording() bool + + // RecordError will record err as an exception span event for this span. An + // additional call to SetStatus is required if the Status of the Span should + // be set to Error, as this method does not change the Span status. If this + // span is not being recorded or err is nil then this method does nothing. + RecordError(err error, options ...EventOption) + + // SpanContext returns the SpanContext of the Span. The returned SpanContext + // is usable even after the End method has been called for the Span. + SpanContext() SpanContext + + // SetStatus sets the status of the Span in the form of a code and a + // description, provided the status hasn't already been set to a higher + // value before (OK > Error > Unset). The description is only included in a + // status when the code is for an error. + SetStatus(code codes.Code, description string) + + // SetName sets the Span name. + SetName(name string) + + // SetAttributes sets kv as attributes of the Span. If a key from kv + // already exists for an attribute of the Span it will be overwritten with + // the value contained in kv. + SetAttributes(kv ...attribute.KeyValue) + + // TracerProvider returns a TracerProvider that can be used to generate + // additional Spans on the same telemetry pipeline as the current Span. + TracerProvider() TracerProvider +} + +// Link is the relationship between two Spans. The relationship can be within +// the same Trace or across different Traces. +// +// For example, a Link is used in the following situations: +// +// 1. Batch Processing: A batch of operations may contain operations +// associated with one or more traces/spans. Since there can only be one +// parent SpanContext, a Link is used to keep reference to the +// SpanContext of all operations in the batch. +// 2. Public Endpoint: A SpanContext for an in incoming client request on a +// public endpoint should be considered untrusted. In such a case, a new +// trace with its own identity and sampling decision needs to be created, +// but this new trace needs to be related to the original trace in some +// form. A Link is used to keep reference to the original SpanContext and +// track the relationship. +type Link struct { + // SpanContext of the linked Span. + SpanContext SpanContext + + // Attributes describe the aspects of the link. + Attributes []attribute.KeyValue +} + +// LinkFromContext returns a link encapsulating the SpanContext in the provided ctx. +func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link { + return Link{ + SpanContext: SpanContextFromContext(ctx), + Attributes: attrs, + } +} + +// SpanKind is the role a Span plays in a Trace. +type SpanKind int + +// As a convenience, these match the proto definition, see +// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 +// +// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` +// to coerce a span kind to a valid value. +const ( + // SpanKindUnspecified is an unspecified SpanKind and is not a valid + // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal + // if it is received. + SpanKindUnspecified SpanKind = 0 + // SpanKindInternal is a SpanKind for a Span that represents an internal + // operation within an application. + SpanKindInternal SpanKind = 1 + // SpanKindServer is a SpanKind for a Span that represents the operation + // of handling a request from a client. + SpanKindServer SpanKind = 2 + // SpanKindClient is a SpanKind for a Span that represents the operation + // of client making a request to a server. + SpanKindClient SpanKind = 3 + // SpanKindProducer is a SpanKind for a Span that represents the operation + // of a producer sending a message to a message broker. Unlike + // SpanKindClient and SpanKindServer, there is often no direct + // relationship between this kind of Span and a SpanKindConsumer kind. A + // SpanKindProducer Span will end once the message is accepted by the + // message broker which might not overlap with the processing of that + // message. + SpanKindProducer SpanKind = 4 + // SpanKindConsumer is a SpanKind for a Span that represents the operation + // of a consumer receiving a message from a message broker. Like + // SpanKindProducer Spans, there is often no direct relationship between + // this Span and the Span that produced the message. + SpanKindConsumer SpanKind = 5 +) + +// ValidateSpanKind returns a valid span kind value. This will coerce +// invalid values into the default value, SpanKindInternal. +func ValidateSpanKind(spanKind SpanKind) SpanKind { + switch spanKind { + case SpanKindInternal, + SpanKindServer, + SpanKindClient, + SpanKindProducer, + SpanKindConsumer: + // valid + return spanKind + default: + return SpanKindInternal + } +} + +// String returns the specified name of the SpanKind in lower-case. +func (sk SpanKind) String() string { + switch sk { + case SpanKindInternal: + return "internal" + case SpanKindServer: + return "server" + case SpanKindClient: + return "client" + case SpanKindProducer: + return "producer" + case SpanKindConsumer: + return "consumer" + default: + return "unspecified" + } +} + +// Tracer is the creator of Spans. +// +// Warning: methods may be added to this interface in minor releases. +type Tracer interface { + // Start creates a span and a context.Context containing the newly-created span. + // + // If the context.Context provided in `ctx` contains a Span then the newly-created + // Span will be a child of that span, otherwise it will be a root span. This behavior + // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the + // newly-created Span to be a root span even if `ctx` contains a Span. + // + // When creating a Span it is recommended to provide all known span attributes using + // the `WithAttributes()` SpanOption as samplers will only have access to the + // attributes provided when a Span is created. + // + // Any Span that is created MUST also be ended. This is the responsibility of the user. + // Implementations of this API may leak memory or other resources if Spans are not ended. + Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span) +} + +// TracerProvider provides Tracers that are used by instrumentation code to +// trace computational workflows. +// +// A TracerProvider is the collection destination of all Spans from Tracers it +// provides, it represents a unique telemetry collection pipeline. How that +// pipeline is defined, meaning how those Spans are collected, processed, and +// where they are exported, depends on its implementation. Instrumentation +// authors do not need to define this implementation, rather just use the +// provided Tracers to instrument code. +// +// Commonly, instrumentation code will accept a TracerProvider implementation +// at runtime from its users or it can simply use the globally registered one +// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider). +// +// Warning: methods may be added to this interface in minor releases. +type TracerProvider interface { + // Tracer returns a unique Tracer scoped to be used by instrumentation code + // to trace computational workflows. The scope and identity of that + // instrumentation code is uniquely defined by the name and options passed. + // + // The passed name needs to uniquely identify instrumentation code. + // Therefore, it is recommended that name is the Go package name of the + // library providing instrumentation (note: not the code being + // instrumented). Instrumentation libraries can have multiple versions, + // therefore, the WithInstrumentationVersion option should be used to + // distinguish these different codebases. Additionally, instrumentation + // libraries may sometimes use traces to communicate different domains of + // workflow data (i.e. using spans to communicate workflow events only). If + // this is the case, the WithScopeAttributes option should be used to + // uniquely identify Tracers that handle the different domains of workflow + // data. + // + // If the same name and options are passed multiple times, the same Tracer + // will be returned (it is up to the implementation if this will be the + // same underlying instance of that Tracer or not). It is not necessary to + // call this multiple times with the same name and options to get an + // up-to-date Tracer. All implementations will ensure any TracerProvider + // configuration changes are propagated to all provided Tracers. + // + // If name is empty, then an implementation defined default name will be + // used instead. + // + // This method is safe to call concurrently. + Tracer(name string, options ...TracerOption) Tracer +} diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go new file mode 100644 index 000000000..ca68a82e5 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/tracestate.go @@ -0,0 +1,212 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package trace // import "go.opentelemetry.io/otel/trace" + +import ( + "encoding/json" + "fmt" + "regexp" + "strings" +) + +const ( + maxListMembers = 32 + + listDelimiter = "," + + // based on the W3C Trace Context specification, see + // https://www.w3.org/TR/trace-context-1/#tracestate-header + noTenantKeyFormat = `[a-z][_0-9a-z\-\*\/]{0,255}` + withTenantKeyFormat = `[a-z0-9][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}` + valueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]` + + errInvalidKey errorConst = "invalid tracestate key" + errInvalidValue errorConst = "invalid tracestate value" + errInvalidMember errorConst = "invalid tracestate list-member" + errMemberNumber errorConst = "too many list-members in tracestate" + errDuplicate errorConst = "duplicate list-member in tracestate" +) + +var ( + keyRe = regexp.MustCompile(`^((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))$`) + valueRe = regexp.MustCompile(`^(` + valueFormat + `)$`) + memberRe = regexp.MustCompile(`^\s*((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`) +) + +type member struct { + Key string + Value string +} + +func newMember(key, value string) (member, error) { + if !keyRe.MatchString(key) { + return member{}, fmt.Errorf("%w: %s", errInvalidKey, key) + } + if !valueRe.MatchString(value) { + return member{}, fmt.Errorf("%w: %s", errInvalidValue, value) + } + return member{Key: key, Value: value}, nil +} + +func parseMember(m string) (member, error) { + matches := memberRe.FindStringSubmatch(m) + if len(matches) != 5 { + return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) + } + + return member{ + Key: matches[1], + Value: matches[4], + }, nil +} + +// String encodes member into a string compliant with the W3C Trace Context +// specification. +func (m member) String() string { + return fmt.Sprintf("%s=%s", m.Key, m.Value) +} + +// TraceState provides additional vendor-specific trace identification +// information across different distributed tracing systems. It represents an +// immutable list consisting of key/value pairs, each pair is referred to as a +// list-member. +// +// TraceState conforms to the W3C Trace Context specification +// (https://www.w3.org/TR/trace-context-1). All operations that create or copy +// a TraceState do so by validating all input and will only produce TraceState +// that conform to the specification. Specifically, this means that all +// list-member's key/value pairs are valid, no duplicate list-members exist, +// and the maximum number of list-members (32) is not exceeded. +type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState` + // list is the members in order. + list []member +} + +var _ json.Marshaler = TraceState{} + +// ParseTraceState attempts to decode a TraceState from the passed +// string. It returns an error if the input is invalid according to the W3C +// Trace Context specification. +func ParseTraceState(tracestate string) (TraceState, error) { + if tracestate == "" { + return TraceState{}, nil + } + + wrapErr := func(err error) error { + return fmt.Errorf("failed to parse tracestate: %w", err) + } + + var members []member + found := make(map[string]struct{}) + for _, memberStr := range strings.Split(tracestate, listDelimiter) { + if len(memberStr) == 0 { + continue + } + + m, err := parseMember(memberStr) + if err != nil { + return TraceState{}, wrapErr(err) + } + + if _, ok := found[m.Key]; ok { + return TraceState{}, wrapErr(errDuplicate) + } + found[m.Key] = struct{}{} + + members = append(members, m) + if n := len(members); n > maxListMembers { + return TraceState{}, wrapErr(errMemberNumber) + } + } + + return TraceState{list: members}, nil +} + +// MarshalJSON marshals the TraceState into JSON. +func (ts TraceState) MarshalJSON() ([]byte, error) { + return json.Marshal(ts.String()) +} + +// String encodes the TraceState into a string compliant with the W3C +// Trace Context specification. The returned string will be invalid if the +// TraceState contains any invalid members. +func (ts TraceState) String() string { + members := make([]string, len(ts.list)) + for i, m := range ts.list { + members[i] = m.String() + } + return strings.Join(members, listDelimiter) +} + +// Get returns the value paired with key from the corresponding TraceState +// list-member if it exists, otherwise an empty string is returned. +func (ts TraceState) Get(key string) string { + for _, member := range ts.list { + if member.Key == key { + return member.Value + } + } + + return "" +} + +// Insert adds a new list-member defined by the key/value pair to the +// TraceState. If a list-member already exists for the given key, that +// list-member's value is updated. The new or updated list-member is always +// moved to the beginning of the TraceState as specified by the W3C Trace +// Context specification. +// +// If key or value are invalid according to the W3C Trace Context +// specification an error is returned with the original TraceState. +// +// If adding a new list-member means the TraceState would have more members +// then is allowed, the new list-member will be inserted and the right-most +// list-member will be dropped in the returned TraceState. +func (ts TraceState) Insert(key, value string) (TraceState, error) { + m, err := newMember(key, value) + if err != nil { + return ts, err + } + + cTS := ts.Delete(key) + if cTS.Len()+1 <= maxListMembers { + cTS.list = append(cTS.list, member{}) + } + // When the number of members exceeds capacity, drop the "right-most". + copy(cTS.list[1:], cTS.list) + cTS.list[0] = m + + return cTS, nil +} + +// Delete returns a copy of the TraceState with the list-member identified by +// key removed. +func (ts TraceState) Delete(key string) TraceState { + members := make([]member, ts.Len()) + copy(members, ts.list) + for i, member := range ts.list { + if member.Key == key { + members = append(members[:i], members[i+1:]...) + // TraceState should contain no duplicate members. + break + } + } + return TraceState{list: members} +} + +// Len returns the number of list-members in the TraceState. +func (ts TraceState) Len() int { + return len(ts.list) +} diff --git a/vendor/go.opentelemetry.io/otel/verify_examples.sh b/vendor/go.opentelemetry.io/otel/verify_examples.sh new file mode 100644 index 000000000..dbb61a422 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/verify_examples.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -euo pipefail + +cd $(dirname $0) +TOOLS_DIR=$(pwd)/.tools + +if [ -z "${GOPATH}" ] ; then + printf "GOPATH is not defined.\n" + exit -1 +fi + +if [ ! -d "${GOPATH}" ] ; then + printf "GOPATH ${GOPATH} is invalid \n" + exit -1 +fi + +# Pre-requisites +if ! git diff --quiet; then \ + git status + printf "\n\nError: working tree is not clean\n" + exit -1 +fi + +if [ "$(git tag --contains $(git log -1 --pretty=format:"%H"))" = "" ] ; then + printf "$(git log -1)" + printf "\n\nError: HEAD is not pointing to a tagged version" +fi + +make ${TOOLS_DIR}/gojq + +DIR_TMP="${GOPATH}/src/oteltmp/" +rm -rf $DIR_TMP +mkdir -p $DIR_TMP + +printf "Copy examples to ${DIR_TMP}\n" +cp -a ./example ${DIR_TMP} + +# Update go.mod files +printf "Update go.mod: rename module and remove replace\n" + +PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | egrep 'example' | sed 's/^\.\///' | sort) + +for dir in $PACKAGE_DIRS; do + printf " Update go.mod for $dir\n" + (cd "${DIR_TMP}/${dir}" && \ + # replaces is ("mod1" "mod2" …) + replaces=($(go mod edit -json | ${TOOLS_DIR}/gojq '.Replace[].Old.Path')) && \ + # strip double quotes + replaces=("${replaces[@]%\"}") && \ + replaces=("${replaces[@]#\"}") && \ + # make an array (-dropreplace=mod1 -dropreplace=mod2 …) + dropreplaces=("${replaces[@]/#/-dropreplace=}") && \ + go mod edit -module "oteltmp/${dir}" "${dropreplaces[@]}" && \ + go mod tidy) +done +printf "Update done:\n\n" + +# Build directories that contain main package. These directories are different than +# directories that contain go.mod files. +printf "Build examples:\n" +EXAMPLES=$(./get_main_pkgs.sh ./example) +for ex in $EXAMPLES; do + printf " Build $ex in ${DIR_TMP}/${ex}\n" + (cd "${DIR_TMP}/${ex}" && \ + go build .) +done + +# Cleanup +printf "Remove copied files.\n" +rm -rf $DIR_TMP diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go new file mode 100644 index 000000000..00b79bcc2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otel // import "go.opentelemetry.io/otel" + +// Version is the current release version of OpenTelemetry in use. +func Version() string { + return "1.11.2" +} diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml new file mode 100644 index 000000000..611879def --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -0,0 +1,56 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module-sets: + stable-v1: + version: v1.11.2 + modules: + - go.opentelemetry.io/otel + - go.opentelemetry.io/otel/bridge/opentracing + - go.opentelemetry.io/otel/example/fib + - go.opentelemetry.io/otel/example/jaeger + - go.opentelemetry.io/otel/example/namedtracer + - go.opentelemetry.io/otel/example/otel-collector + - go.opentelemetry.io/otel/example/passthrough + - go.opentelemetry.io/otel/example/zipkin + - go.opentelemetry.io/otel/exporters/jaeger + - go.opentelemetry.io/otel/exporters/zipkin + - go.opentelemetry.io/otel/exporters/otlp/otlptrace + - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc + - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp + - go.opentelemetry.io/otel/exporters/otlp/internal/retry + - go.opentelemetry.io/otel/exporters/stdout/stdouttrace + - go.opentelemetry.io/otel/trace + - go.opentelemetry.io/otel/sdk + experimental-metrics: + version: v0.34.0 + modules: + - go.opentelemetry.io/otel/example/opencensus + - go.opentelemetry.io/otel/example/prometheus + - go.opentelemetry.io/otel/exporters/otlp/otlpmetric + - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc + - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp + - go.opentelemetry.io/otel/exporters/prometheus + - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric + - go.opentelemetry.io/otel/metric + - go.opentelemetry.io/otel/sdk/metric + - go.opentelemetry.io/otel/bridge/opencensus + - go.opentelemetry.io/otel/bridge/opencensus/test + - go.opentelemetry.io/otel/example/view + experimental-schema: + version: v0.0.3 + modules: + - go.opentelemetry.io/otel/schema +excluded-modules: + - go.opentelemetry.io/otel/internal/tools diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index aeb73f81a..5577c0f93 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -50,7 +50,7 @@ func (ih InvalidHashPrefixError) Error() string { type InvalidCostError int func (ic InvalidCostError) Error() string { - return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), int(MinCost), int(MaxCost)) + return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost) } const ( @@ -82,11 +82,20 @@ type hashed struct { minor byte } +// ErrPasswordTooLong is returned when the password passed to +// GenerateFromPassword is too long (i.e. > 72 bytes). +var ErrPasswordTooLong = errors.New("bcrypt: password length exceeds 72 bytes") + // GenerateFromPassword returns the bcrypt hash of the password at the given // cost. If the cost given is less than MinCost, the cost will be set to // DefaultCost, instead. Use CompareHashAndPassword, as defined in this package, // to compare the returned hashed password with its cleartext version. +// GenerateFromPassword does not accept passwords longer than 72 bytes, which +// is the longest password bcrypt will operate on. func GenerateFromPassword(password []byte, cost int) ([]byte, error) { + if len(password) > 72 { + return nil, ErrPasswordTooLong + } p, err := newFromPassword(password, cost) if err != nil { return nil, err diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go index be342ad47..8907183ec 100644 --- a/vendor/golang.org/x/crypto/openpgp/armor/armor.go +++ b/vendor/golang.org/x/crypto/openpgp/armor/armor.go @@ -156,7 +156,7 @@ func (r *openpgpReader) Read(p []byte) (n int, err error) { n, err = r.b64Reader.Read(p) r.currentCRC = crc24(r.currentCRC, p[:n]) - if err == io.EOF && r.lReader.crcSet && r.lReader.crc != uint32(r.currentCRC&crc24Mask) { + if err == io.EOF && r.lReader.crcSet && r.lReader.crc != r.currentCRC&crc24Mask { return 0, ArmorCorrupt } diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index 7a5ff2d2e..c7964275d 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "math" + "strings" "sync" _ "crypto/sha1" @@ -118,6 +119,20 @@ func algorithmsForKeyFormat(keyFormat string) []string { } } +// supportedPubKeyAuthAlgos specifies the supported client public key +// authentication algorithms. Note that this doesn't include certificate types +// since those use the underlying algorithm. This list is sent to the client if +// it supports the server-sig-algs extension. Order is irrelevant. +var supportedPubKeyAuthAlgos = []string{ + KeyAlgoED25519, + KeyAlgoSKED25519, KeyAlgoSKECDSA256, + KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, + KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoRSA, + KeyAlgoDSA, +} + +var supportedPubKeyAuthAlgosList = strings.Join(supportedPubKeyAuthAlgos, ",") + // unexpectedMessageError results when the SSH message that we received didn't // match what we wanted. func unexpectedMessageError(expected, got uint8) error { diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 653dc4d2c..07a1843e0 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -58,11 +58,13 @@ type handshakeTransport struct { incoming chan []byte readError error - mu sync.Mutex - writeError error - sentInitPacket []byte - sentInitMsg *kexInitMsg - pendingPackets [][]byte // Used when a key exchange is in progress. + mu sync.Mutex + writeError error + sentInitPacket []byte + sentInitMsg *kexInitMsg + pendingPackets [][]byte // Used when a key exchange is in progress. + writePacketsLeft uint32 + writeBytesLeft int64 // If the read loop wants to schedule a kex, it pings this // channel, and the write loop will send out a kex @@ -71,7 +73,8 @@ type handshakeTransport struct { // If the other side requests or confirms a kex, its kexInit // packet is sent here for the write loop to find it. - startKex chan *pendingKex + startKex chan *pendingKex + kexLoopDone chan struct{} // closed (with writeError non-nil) when kexLoop exits // data for host key checking hostKeyCallback HostKeyCallback @@ -86,12 +89,10 @@ type handshakeTransport struct { // Algorithms agreed in the last key exchange. algorithms *algorithms + // Counters exclusively owned by readLoop. readPacketsLeft uint32 readBytesLeft int64 - writePacketsLeft uint32 - writeBytesLeft int64 - // The session ID or nil if first kex did not complete yet. sessionID []byte } @@ -108,7 +109,8 @@ func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, clientVersion: clientVersion, incoming: make(chan []byte, chanSize), requestKex: make(chan struct{}, 1), - startKex: make(chan *pendingKex, 1), + startKex: make(chan *pendingKex), + kexLoopDone: make(chan struct{}), config: config, } @@ -340,16 +342,17 @@ write: t.mu.Unlock() } + // Unblock reader. + t.conn.Close() + // drain startKex channel. We don't service t.requestKex // because nobody does blocking sends there. - go func() { - for init := range t.startKex { - init.done <- t.writeError - } - }() + for request := range t.startKex { + request.done <- t.getWriteError() + } - // Unblock reader. - t.conn.Close() + // Mark that the loop is done so that Close can return. + close(t.kexLoopDone) } // The protocol uses uint32 for packet counters, so we can't let them @@ -545,7 +548,16 @@ func (t *handshakeTransport) writePacket(p []byte) error { } func (t *handshakeTransport) Close() error { - return t.conn.Close() + // Close the connection. This should cause the readLoop goroutine to wake up + // and close t.startKex, which will shut down kexLoop if running. + err := t.conn.Close() + + // Wait for the kexLoop goroutine to complete. + // At that point we know that the readLoop goroutine is complete too, + // because kexLoop itself waits for readLoop to close the startKex channel. + <-t.kexLoopDone + + return err } func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { @@ -615,7 +627,8 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return err } - if t.sessionID == nil { + firstKeyExchange := t.sessionID == nil + if firstKeyExchange { t.sessionID = result.H } result.SessionID = t.sessionID @@ -626,6 +639,24 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { return err } + + // On the server side, after the first SSH_MSG_NEWKEYS, send a SSH_MSG_EXT_INFO + // message with the server-sig-algs extension if the client supports it. See + // RFC 8308, Sections 2.4 and 3.1. + if !isClient && firstKeyExchange && contains(clientInit.KexAlgos, "ext-info-c") { + extInfo := &extInfoMsg{ + NumExtensions: 1, + Payload: make([]byte, 0, 4+15+4+len(supportedPubKeyAuthAlgosList)), + } + extInfo.Payload = appendInt(extInfo.Payload, len("server-sig-algs")) + extInfo.Payload = append(extInfo.Payload, "server-sig-algs"...) + extInfo.Payload = appendInt(extInfo.Payload, len(supportedPubKeyAuthAlgosList)) + extInfo.Payload = append(extInfo.Payload, supportedPubKeyAuthAlgosList...) + if err := t.conn.writePacket(Marshal(extInfo)); err != nil { + return err + } + } + if packet, err := t.conn.readPacket(); err != nil { return err } else if packet[0] != msgNewKeys { diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 2260b20af..9e3870292 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -291,15 +291,6 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) return perms, err } -func isAcceptableAlgo(algo string) bool { - switch algo { - case KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoSKECDSA256v01, CertAlgoED25519v01, CertAlgoSKED25519v01: - return true - } - return false -} - func checkSourceAddress(addr net.Addr, sourceAddrs string) error { if addr == nil { return errors.New("ssh: no address known for client, but source-address match required") @@ -514,7 +505,7 @@ userAuthLoop: return nil, parseError(msgUserAuthRequest) } algo := string(algoBytes) - if !isAcceptableAlgo(algo) { + if !contains(supportedPubKeyAuthAlgos, underlyingAlgo(algo)) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) break } @@ -572,7 +563,7 @@ userAuthLoop: // algorithm name that corresponds to algo with // sig.Format. This is usually the same, but // for certs, the names differ. - if !isAcceptableAlgo(sig.Format) { + if !contains(supportedPubKeyAuthAlgos, sig.Format) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } diff --git a/vendor/golang.org/x/net/http2/flow.go b/vendor/golang.org/x/net/http2/flow.go index b51f0e0cf..750ac52f2 100644 --- a/vendor/golang.org/x/net/http2/flow.go +++ b/vendor/golang.org/x/net/http2/flow.go @@ -6,23 +6,91 @@ package http2 -// flow is the flow control window's size. -type flow struct { +// inflowMinRefresh is the minimum number of bytes we'll send for a +// flow control window update. +const inflowMinRefresh = 4 << 10 + +// inflow accounts for an inbound flow control window. +// It tracks both the latest window sent to the peer (used for enforcement) +// and the accumulated unsent window. +type inflow struct { + avail int32 + unsent int32 +} + +// set sets the initial window. +func (f *inflow) init(n int32) { + f.avail = n +} + +// add adds n bytes to the window, with a maximum window size of max, +// indicating that the peer can now send us more data. +// For example, the user read from a {Request,Response} body and consumed +// some of the buffered data, so the peer can now send more. +// It returns the number of bytes to send in a WINDOW_UPDATE frame to the peer. +// Window updates are accumulated and sent when the unsent capacity +// is at least inflowMinRefresh or will at least double the peer's available window. +func (f *inflow) add(n int) (connAdd int32) { + if n < 0 { + panic("negative update") + } + unsent := int64(f.unsent) + int64(n) + // "A sender MUST NOT allow a flow-control window to exceed 2^31-1 octets." + // RFC 7540 Section 6.9.1. + const maxWindow = 1<<31 - 1 + if unsent+int64(f.avail) > maxWindow { + panic("flow control update exceeds maximum window size") + } + f.unsent = int32(unsent) + if f.unsent < inflowMinRefresh && f.unsent < f.avail { + // If there aren't at least inflowMinRefresh bytes of window to send, + // and this update won't at least double the window, buffer the update for later. + return 0 + } + f.avail += f.unsent + f.unsent = 0 + return int32(unsent) +} + +// take attempts to take n bytes from the peer's flow control window. +// It reports whether the window has available capacity. +func (f *inflow) take(n uint32) bool { + if n > uint32(f.avail) { + return false + } + f.avail -= int32(n) + return true +} + +// takeInflows attempts to take n bytes from two inflows, +// typically connection-level and stream-level flows. +// It reports whether both windows have available capacity. +func takeInflows(f1, f2 *inflow, n uint32) bool { + if n > uint32(f1.avail) || n > uint32(f2.avail) { + return false + } + f1.avail -= int32(n) + f2.avail -= int32(n) + return true +} + +// outflow is the outbound flow control window's size. +type outflow struct { _ incomparable // n is the number of DATA bytes we're allowed to send. - // A flow is kept both on a conn and a per-stream. + // An outflow is kept both on a conn and a per-stream. n int32 - // conn points to the shared connection-level flow that is - // shared by all streams on that conn. It is nil for the flow + // conn points to the shared connection-level outflow that is + // shared by all streams on that conn. It is nil for the outflow // that's on the conn directly. - conn *flow + conn *outflow } -func (f *flow) setConnFlow(cf *flow) { f.conn = cf } +func (f *outflow) setConnFlow(cf *outflow) { f.conn = cf } -func (f *flow) available() int32 { +func (f *outflow) available() int32 { n := f.n if f.conn != nil && f.conn.n < n { n = f.conn.n @@ -30,7 +98,7 @@ func (f *flow) available() int32 { return n } -func (f *flow) take(n int32) { +func (f *outflow) take(n int32) { if n > f.available() { panic("internal error: took too much") } @@ -42,7 +110,7 @@ func (f *flow) take(n int32) { // add adds n bytes (positive or negative) to the flow control window. // It returns false if the sum would exceed 2^31-1. -func (f *flow) add(n int32) bool { +func (f *outflow) add(n int32) bool { sum := f.n + n if (sum > n) == (f.n > 0) { f.n = sum diff --git a/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/golang.org/x/net/http2/hpack/encode.go index 6886dc163..46219da2b 100644 --- a/vendor/golang.org/x/net/http2/hpack/encode.go +++ b/vendor/golang.org/x/net/http2/hpack/encode.go @@ -116,6 +116,11 @@ func (e *Encoder) SetMaxDynamicTableSize(v uint32) { e.dynTab.setMaxSize(v) } +// MaxDynamicTableSize returns the current dynamic header table size. +func (e *Encoder) MaxDynamicTableSize() (v uint32) { + return e.dynTab.maxSize +} + // SetMaxDynamicTableSizeLimit changes the maximum value that can be // specified in SetMaxDynamicTableSize to v. By default, it is set to // 4096, which is the same size of the default dynamic header table diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index d8a17aa9b..b624dc0a7 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -98,6 +98,19 @@ type Server struct { // the HTTP/2 spec's recommendations. MaxConcurrentStreams uint32 + // MaxDecoderHeaderTableSize optionally specifies the http2 + // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It + // informs the remote endpoint of the maximum size of the header compression + // table used to decode header blocks, in octets. If zero, the default value + // of 4096 is used. + MaxDecoderHeaderTableSize uint32 + + // MaxEncoderHeaderTableSize optionally specifies an upper limit for the + // header compression table used for encoding request headers. Received + // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero, + // the default value of 4096 is used. + MaxEncoderHeaderTableSize uint32 + // MaxReadFrameSize optionally specifies the largest frame // this server is willing to read. A valid value is between // 16k and 16M, inclusive. If zero or otherwise invalid, a @@ -170,6 +183,20 @@ func (s *Server) maxConcurrentStreams() uint32 { return defaultMaxStreams } +func (s *Server) maxDecoderHeaderTableSize() uint32 { + if v := s.MaxDecoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + +func (s *Server) maxEncoderHeaderTableSize() uint32 { + if v := s.MaxEncoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + // maxQueuedControlFrames is the maximum number of control frames like // SETTINGS, PING and RST_STREAM that will be queued for writing before // the connection is closed to prevent memory exhaustion attacks. @@ -394,7 +421,6 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { advMaxStreams: s.maxConcurrentStreams(), initialStreamSendWindowSize: initialWindowSize, maxFrameSize: initialMaxFrameSize, - headerTableSize: initialHeaderTableSize, serveG: newGoroutineLock(), pushEnabled: true, sawClientPreface: opts.SawClientPreface, @@ -422,14 +448,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { // configured value for inflow, that will be updated when we send a // WINDOW_UPDATE shortly after sending SETTINGS. sc.flow.add(initialWindowSize) - sc.inflow.add(initialWindowSize) + sc.inflow.init(initialWindowSize) sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) + sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize()) fr := NewFramer(sc.bw, c) if s.CountError != nil { fr.countError = s.CountError } - fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil) fr.MaxHeaderListSize = sc.maxHeaderListSize() fr.SetMaxReadFrameSize(s.maxReadFrameSize()) sc.framer = fr @@ -536,8 +563,8 @@ type serverConn struct { wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes bodyReadCh chan bodyReadMsg // from handlers -> serve serveMsgCh chan interface{} // misc messages & code to send to / run on the serve loop - flow flow // conn-wide (not stream-specific) outbound flow control - inflow flow // conn-wide inbound flow control + flow outflow // conn-wide (not stream-specific) outbound flow control + inflow inflow // conn-wide inbound flow control tlsState *tls.ConnectionState // shared by all handlers, like net/http remoteAddrStr string writeSched WriteScheduler @@ -559,9 +586,9 @@ type serverConn struct { streams map[uint32]*stream initialStreamSendWindowSize int32 maxFrameSize int32 - headerTableSize uint32 peerMaxHeaderListSize uint32 // zero means unknown (default) canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case + canonHeaderKeysSize int // canonHeader keys size in bytes writingFrame bool // started writing a frame (on serve goroutine or separate) writingFrameAsync bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh needsFrameFlush bool // last frame write wasn't a flush @@ -614,10 +641,10 @@ type stream struct { cancelCtx func() // owned by serverConn's serve loop: - bodyBytes int64 // body bytes seen so far - declBodyBytes int64 // or -1 if undeclared - flow flow // limits writing from Handler to client - inflow flow // what the client is allowed to POST/etc to us + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow outflow // limits writing from Handler to client + inflow inflow // what the client is allowed to POST/etc to us state streamState resetQueued bool // RST_STREAM queued for write; set by sc.resetStream gotTrailerHeader bool // HEADER frame for trailers was seen @@ -740,6 +767,13 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { } } +// maxCachedCanonicalHeadersKeysSize is an arbitrarily-chosen limit on the size +// of the entries in the canonHeader cache. +// This should be larger than the size of unique, uncommon header keys likely to +// be sent by the peer, while not so high as to permit unreasonable memory usage +// if the peer sends an unbounded number of unique header keys. +const maxCachedCanonicalHeadersKeysSize = 2048 + func (sc *serverConn) canonicalHeader(v string) string { sc.serveG.check() buildCommonHeaderMapsOnce() @@ -755,14 +789,10 @@ func (sc *serverConn) canonicalHeader(v string) string { sc.canonHeader = make(map[string]string) } cv = http.CanonicalHeaderKey(v) - // maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of - // entries in the canonHeader cache. This should be larger than the number - // of unique, uncommon header keys likely to be sent by the peer, while not - // so high as to permit unreasonable memory usage if the peer sends an unbounded - // number of unique header keys. - const maxCachedCanonicalHeaders = 32 - if len(sc.canonHeader) < maxCachedCanonicalHeaders { + size := 100 + len(v)*2 // 100 bytes of map overhead + key + value + if sc.canonHeaderKeysSize+size <= maxCachedCanonicalHeadersKeysSize { sc.canonHeader[v] = cv + sc.canonHeaderKeysSize += size } return cv } @@ -864,6 +894,7 @@ func (sc *serverConn) serve() { {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, {SettingMaxConcurrentStreams, sc.advMaxStreams}, {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, + {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()}, {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())}, }, }) @@ -1472,7 +1503,7 @@ func (sc *serverConn) processFrame(f Frame) error { if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || f.Header().StreamID > sc.maxClientStreamID) { if f, ok := f.(*DataFrame); ok { - if sc.inflow.available() < int32(f.Length) { + if !sc.inflow.take(f.Length) { return sc.countError("data_flow", streamError(f.Header().StreamID, ErrCodeFlowControl)) } sc.sendWindowUpdate(nil, int(f.Length)) // conn-level @@ -1661,7 +1692,6 @@ func (sc *serverConn) processSetting(s Setting) error { } switch s.ID { case SettingHeaderTableSize: - sc.headerTableSize = s.Val sc.hpackEncoder.SetMaxDynamicTableSize(s.Val) case SettingEnablePush: sc.pushEnabled = s.Val != 0 @@ -1745,14 +1775,9 @@ func (sc *serverConn) processData(f *DataFrame) error { // But still enforce their connection-level flow control, // and return any flow control bytes since we're not going // to consume them. - if sc.inflow.available() < int32(f.Length) { + if !sc.inflow.take(f.Length) { return sc.countError("data_flow", streamError(id, ErrCodeFlowControl)) } - // Deduct the flow control from inflow, since we're - // going to immediately add it back in - // sendWindowUpdate, which also schedules sending the - // frames. - sc.inflow.take(int32(f.Length)) sc.sendWindowUpdate(nil, int(f.Length)) // conn-level if st != nil && st.resetQueued { @@ -1767,10 +1792,9 @@ func (sc *serverConn) processData(f *DataFrame) error { // Sender sending more than they'd declared? if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes { - if sc.inflow.available() < int32(f.Length) { + if !sc.inflow.take(f.Length) { return sc.countError("data_flow", streamError(id, ErrCodeFlowControl)) } - sc.inflow.take(int32(f.Length)) sc.sendWindowUpdate(nil, int(f.Length)) // conn-level st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) @@ -1781,10 +1805,9 @@ func (sc *serverConn) processData(f *DataFrame) error { } if f.Length > 0 { // Check whether the client has flow control quota. - if st.inflow.available() < int32(f.Length) { + if !takeInflows(&sc.inflow, &st.inflow, f.Length) { return sc.countError("flow_on_data_length", streamError(id, ErrCodeFlowControl)) } - st.inflow.take(int32(f.Length)) if len(data) > 0 { wrote, err := st.body.Write(data) @@ -1800,10 +1823,12 @@ func (sc *serverConn) processData(f *DataFrame) error { // Return any padded flow control now, since we won't // refund it later on body reads. - if pad := int32(f.Length) - int32(len(data)); pad > 0 { - sc.sendWindowUpdate32(nil, pad) - sc.sendWindowUpdate32(st, pad) - } + // Call sendWindowUpdate even if there is no padding, + // to return buffered flow control credit if the sent + // window has shrunk. + pad := int32(f.Length) - int32(len(data)) + sc.sendWindowUpdate32(nil, pad) + sc.sendWindowUpdate32(st, pad) } if f.StreamEnded() { st.endStream() @@ -2075,8 +2100,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.cw.Init() st.flow.conn = &sc.flow // link to conn-level counter st.flow.add(sc.initialStreamSendWindowSize) - st.inflow.conn = &sc.inflow // link to conn-level counter - st.inflow.add(sc.srv.initialStreamRecvWindowSize()) + st.inflow.init(sc.srv.initialStreamRecvWindowSize()) if sc.hs.WriteTimeout != 0 { st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } @@ -2358,47 +2382,28 @@ func (sc *serverConn) noteBodyRead(st *stream, n int) { } // st may be nil for conn-level -func (sc *serverConn) sendWindowUpdate(st *stream, n int) { - sc.serveG.check() - // "The legal range for the increment to the flow control - // window is 1 to 2^31-1 (2,147,483,647) octets." - // A Go Read call on 64-bit machines could in theory read - // a larger Read than this. Very unlikely, but we handle it here - // rather than elsewhere for now. - const maxUint31 = 1<<31 - 1 - for n > maxUint31 { - sc.sendWindowUpdate32(st, maxUint31) - n -= maxUint31 - } - sc.sendWindowUpdate32(st, int32(n)) +func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) { + sc.sendWindowUpdate(st, int(n)) } // st may be nil for conn-level -func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) { +func (sc *serverConn) sendWindowUpdate(st *stream, n int) { sc.serveG.check() - if n == 0 { - return - } - if n < 0 { - panic("negative update") - } var streamID uint32 - if st != nil { + var send int32 + if st == nil { + send = sc.inflow.add(n) + } else { streamID = st.id + send = st.inflow.add(n) + } + if send == 0 { + return } sc.writeFrame(FrameWriteRequest{ - write: writeWindowUpdate{streamID: streamID, n: uint32(n)}, + write: writeWindowUpdate{streamID: streamID, n: uint32(send)}, stream: st, }) - var ok bool - if st == nil { - ok = sc.inflow.add(n) - } else { - ok = st.inflow.add(n) - } - if !ok { - panic("internal error; sent too many window updates without decrements?") - } } // requestBody is the Handler's Request.Body type. diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 46dda4dc3..b43ec10cf 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -47,10 +47,6 @@ const ( // we buffer per stream. transportDefaultStreamFlow = 4 << 20 - // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send - // a stream-level WINDOW_UPDATE for at a time. - transportDefaultStreamMinRefresh = 4 << 10 - defaultUserAgent = "Go-http-client/2.0" // initialMaxConcurrentStreams is a connections maxConcurrentStreams until @@ -118,6 +114,28 @@ type Transport struct { // to mean no limit. MaxHeaderListSize uint32 + // MaxReadFrameSize is the http2 SETTINGS_MAX_FRAME_SIZE to send in the + // initial settings frame. It is the size in bytes of the largest frame + // payload that the sender is willing to receive. If 0, no setting is + // sent, and the value is provided by the peer, which should be 16384 + // according to the spec: + // https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2. + // Values are bounded in the range 16k to 16M. + MaxReadFrameSize uint32 + + // MaxDecoderHeaderTableSize optionally specifies the http2 + // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It + // informs the remote endpoint of the maximum size of the header compression + // table used to decode header blocks, in octets. If zero, the default value + // of 4096 is used. + MaxDecoderHeaderTableSize uint32 + + // MaxEncoderHeaderTableSize optionally specifies an upper limit for the + // header compression table used for encoding request headers. Received + // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero, + // the default value of 4096 is used. + MaxEncoderHeaderTableSize uint32 + // StrictMaxConcurrentStreams controls whether the server's // SETTINGS_MAX_CONCURRENT_STREAMS should be respected // globally. If false, new TCP connections are created to the @@ -171,6 +189,19 @@ func (t *Transport) maxHeaderListSize() uint32 { return t.MaxHeaderListSize } +func (t *Transport) maxFrameReadSize() uint32 { + if t.MaxReadFrameSize == 0 { + return 0 // use the default provided by the peer + } + if t.MaxReadFrameSize < minMaxFrameSize { + return minMaxFrameSize + } + if t.MaxReadFrameSize > maxFrameSize { + return maxFrameSize + } + return t.MaxReadFrameSize +} + func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } @@ -275,8 +306,8 @@ type ClientConn struct { mu sync.Mutex // guards following cond *sync.Cond // hold mu; broadcast on flow/closed changes - flow flow // our conn-level flow control quota (cs.flow is per stream) - inflow flow // peer's conn-level flow control + flow outflow // our conn-level flow control quota (cs.outflow is per stream) + inflow inflow // peer's conn-level flow control doNotReuse bool // whether conn is marked to not be reused for any future requests closing bool closed bool @@ -293,10 +324,11 @@ type ClientConn struct { lastActive time.Time lastIdle time.Time // time last idle // Settings from peer: (also guarded by wmu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - peerMaxHeaderListSize uint64 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + peerMaxHeaderTableSize uint32 + initialWindowSize uint32 // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. @@ -340,10 +372,10 @@ type clientStream struct { respHeaderRecv chan struct{} // closed when headers are received res *http.Response // set if respHeaderRecv is closed - flow flow // guarded by cc.mu - inflow flow // guarded by cc.mu - bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read - readErr error // sticky read error; owned by transportResponseBody.Read + flow outflow // guarded by cc.mu + inflow inflow // guarded by cc.mu + bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read + readErr error // sticky read error; owned by transportResponseBody.Read reqBody io.ReadCloser reqBodyContentLength int64 // -1 means unknown @@ -681,6 +713,20 @@ func (t *Transport) expectContinueTimeout() time.Duration { return t.t1.ExpectContinueTimeout } +func (t *Transport) maxDecoderHeaderTableSize() uint32 { + if v := t.MaxDecoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + +func (t *Transport) maxEncoderHeaderTableSize() uint32 { + if v := t.MaxEncoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { return t.newClientConn(c, t.disableKeepAlives()) } @@ -721,15 +767,19 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro }) cc.br = bufio.NewReader(c) cc.fr = NewFramer(cc.bw, cc.br) + if t.maxFrameReadSize() != 0 { + cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize()) + } if t.CountError != nil { cc.fr.countError = t.CountError } - cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + maxHeaderTableSize := t.maxDecoderHeaderTableSize() + cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil) cc.fr.MaxHeaderListSize = t.maxHeaderListSize() - // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on - // henc in response to SETTINGS frames? cc.henc = hpack.NewEncoder(&cc.hbuf) + cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) + cc.peerMaxHeaderTableSize = initialHeaderTableSize if t.AllowHTTP { cc.nextStreamID = 3 @@ -744,14 +794,20 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro {ID: SettingEnablePush, Val: 0}, {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, } + if max := t.maxFrameReadSize(); max != 0 { + initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max}) + } if max := t.maxHeaderListSize(); max != 0 { initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) } + if maxHeaderTableSize != initialHeaderTableSize { + initialSettings = append(initialSettings, Setting{ID: SettingHeaderTableSize, Val: maxHeaderTableSize}) + } cc.bw.Write(clientPreface) cc.fr.WriteSettings(initialSettings...) cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) - cc.inflow.add(transportDefaultConnFlow + initialWindowSize) + cc.inflow.init(transportDefaultConnFlow + initialWindowSize) cc.bw.Flush() if cc.werr != nil { cc.Close() @@ -2013,8 +2069,7 @@ type resAndError struct { func (cc *ClientConn) addStreamLocked(cs *clientStream) { cs.flow.add(int32(cc.initialWindowSize)) cs.flow.setConnFlow(&cc.flow) - cs.inflow.add(transportDefaultStreamFlow) - cs.inflow.setConnFlow(&cc.inflow) + cs.inflow.init(transportDefaultStreamFlow) cs.ID = cc.nextStreamID cc.nextStreamID += 2 cc.streams[cs.ID] = cs @@ -2473,21 +2528,10 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) { } cc.mu.Lock() - var connAdd, streamAdd int32 - // Check the conn-level first, before the stream-level. - if v := cc.inflow.available(); v < transportDefaultConnFlow/2 { - connAdd = transportDefaultConnFlow - v - cc.inflow.add(connAdd) - } + connAdd := cc.inflow.add(n) + var streamAdd int32 if err == nil { // No need to refresh if the stream is over or failed. - // Consider any buffered body data (read from the conn but not - // consumed by the client) when computing flow control for this - // stream. - v := int(cs.inflow.available()) + cs.bufPipe.Len() - if v < transportDefaultStreamFlow-transportDefaultStreamMinRefresh { - streamAdd = int32(transportDefaultStreamFlow - v) - cs.inflow.add(streamAdd) - } + streamAdd = cs.inflow.add(n) } cc.mu.Unlock() @@ -2515,17 +2559,15 @@ func (b transportResponseBody) Close() error { if unread > 0 { cc.mu.Lock() // Return connection-level flow control. - if unread > 0 { - cc.inflow.add(int32(unread)) - } + connAdd := cc.inflow.add(unread) cc.mu.Unlock() // TODO(dneil): Acquiring this mutex can block indefinitely. // Move flow control return to a goroutine? cc.wmu.Lock() // Return connection-level flow control. - if unread > 0 { - cc.fr.WriteWindowUpdate(0, uint32(unread)) + if connAdd > 0 { + cc.fr.WriteWindowUpdate(0, uint32(connAdd)) } cc.bw.Flush() cc.wmu.Unlock() @@ -2568,13 +2610,18 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { // But at least return their flow control: if f.Length > 0 { cc.mu.Lock() - cc.inflow.add(int32(f.Length)) + ok := cc.inflow.take(f.Length) + connAdd := cc.inflow.add(int(f.Length)) cc.mu.Unlock() - - cc.wmu.Lock() - cc.fr.WriteWindowUpdate(0, uint32(f.Length)) - cc.bw.Flush() - cc.wmu.Unlock() + if !ok { + return ConnectionError(ErrCodeFlowControl) + } + if connAdd > 0 { + cc.wmu.Lock() + cc.fr.WriteWindowUpdate(0, uint32(connAdd)) + cc.bw.Flush() + cc.wmu.Unlock() + } } return nil } @@ -2605,9 +2652,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } // Check connection-level flow control. cc.mu.Lock() - if cs.inflow.available() >= int32(f.Length) { - cs.inflow.take(int32(f.Length)) - } else { + if !takeInflows(&cc.inflow, &cs.inflow, f.Length) { cc.mu.Unlock() return ConnectionError(ErrCodeFlowControl) } @@ -2629,19 +2674,20 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } } - if refund > 0 { - cc.inflow.add(int32(refund)) - if !didReset { - cs.inflow.add(int32(refund)) - } + sendConn := cc.inflow.add(refund) + var sendStream int32 + if !didReset { + sendStream = cs.inflow.add(refund) } cc.mu.Unlock() - if refund > 0 { + if sendConn > 0 || sendStream > 0 { cc.wmu.Lock() - cc.fr.WriteWindowUpdate(0, uint32(refund)) - if !didReset { - cc.fr.WriteWindowUpdate(cs.ID, uint32(refund)) + if sendConn > 0 { + cc.fr.WriteWindowUpdate(0, uint32(sendConn)) + } + if sendStream > 0 { + cc.fr.WriteWindowUpdate(cs.ID, uint32(sendStream)) } cc.bw.Flush() cc.wmu.Unlock() @@ -2773,8 +2819,10 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { cc.cond.Broadcast() cc.initialWindowSize = s.Val + case SettingHeaderTableSize: + cc.henc.SetMaxDynamicTableSize(s.Val) + cc.peerMaxHeaderTableSize = s.Val default: - // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably. cc.vlogf("Unhandled Setting: %v", s) } return nil diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go index 79a38a0b9..a968b80fa 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go @@ -4,6 +4,11 @@ package cpu +import ( + "strings" + "syscall" +) + // HWCAP/HWCAP2 bits. These are exposed by Linux. const ( hwcap_FP = 1 << 0 @@ -32,10 +37,45 @@ const ( hwcap_ASIMDFHM = 1 << 23 ) +// linuxKernelCanEmulateCPUID reports whether we're running +// on Linux 4.11+. Ideally we'd like to ask the question about +// whether the current kernel contains +// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77c97b4ee21290f5f083173d957843b615abbff2 +// but the version number will have to do. +func linuxKernelCanEmulateCPUID() bool { + var un syscall.Utsname + syscall.Uname(&un) + var sb strings.Builder + for _, b := range un.Release[:] { + if b == 0 { + break + } + sb.WriteByte(byte(b)) + } + major, minor, _, ok := parseRelease(sb.String()) + return ok && (major > 4 || major == 4 && minor >= 11) +} + func doinit() { if err := readHWCAP(); err != nil { - // failed to read /proc/self/auxv, try reading registers directly - readARM64Registers() + // We failed to read /proc/self/auxv. This can happen if the binary has + // been given extra capabilities(7) with /bin/setcap. + // + // When this happens, we have two options. If the Linux kernel is new + // enough (4.11+), we can read the arm64 registers directly which'll + // trap into the kernel and then return back to userspace. + // + // But on older kernels, such as Linux 4.4.180 as used on many Synology + // devices, calling readARM64Registers (specifically getisar0) will + // cause a SIGILL and we'll die. So for older kernels, parse /proc/cpuinfo + // instead. + // + // See golang/go#57336. + if linuxKernelCanEmulateCPUID() { + readARM64Registers() + } else { + readLinuxProcCPUInfo() + } return } diff --git a/vendor/golang.org/x/sys/cpu/parse.go b/vendor/golang.org/x/sys/cpu/parse.go new file mode 100644 index 000000000..762b63d68 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/parse.go @@ -0,0 +1,43 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import "strconv" + +// parseRelease parses a dot-separated version number. It follows the semver +// syntax, but allows the minor and patch versions to be elided. +// +// This is a copy of the Go runtime's parseRelease from +// https://golang.org/cl/209597. +func parseRelease(rel string) (major, minor, patch int, ok bool) { + // Strip anything after a dash or plus. + for i := 0; i < len(rel); i++ { + if rel[i] == '-' || rel[i] == '+' { + rel = rel[:i] + break + } + } + + next := func() (int, bool) { + for i := 0; i < len(rel); i++ { + if rel[i] == '.' { + ver, err := strconv.Atoi(rel[:i]) + rel = rel[i+1:] + return ver, err == nil + } + } + ver, err := strconv.Atoi(rel) + rel = "" + return ver, err == nil + } + if major, ok = next(); !ok || rel == "" { + return + } + if minor, ok = next(); !ok || rel == "" { + return + } + patch, ok = next() + return +} diff --git a/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go new file mode 100644 index 000000000..d87bd6b3e --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go @@ -0,0 +1,54 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && arm64 +// +build linux,arm64 + +package cpu + +import ( + "errors" + "io" + "os" + "strings" +) + +func readLinuxProcCPUInfo() error { + f, err := os.Open("/proc/cpuinfo") + if err != nil { + return err + } + defer f.Close() + + var buf [1 << 10]byte // enough for first CPU + n, err := io.ReadFull(f, buf[:]) + if err != nil && err != io.ErrUnexpectedEOF { + return err + } + in := string(buf[:n]) + const features = "\nFeatures : " + i := strings.Index(in, features) + if i == -1 { + return errors.New("no CPU features found") + } + in = in[i+len(features):] + if i := strings.Index(in, "\n"); i != -1 { + in = in[:i] + } + m := map[string]*bool{} + + initOptions() // need it early here; it's harmless to call twice + for _, o := range options { + m[o.Name] = o.Feature + } + // The EVTSTRM field has alias "evstrm" in Go, but Linux calls it "evtstrm". + m["evtstrm"] = &ARM64.HasEVTSTRM + + for _, f := range strings.Fields(in) { + if p, ok := m[f]; ok { + *p = true + } + } + return nil +} diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go index 0dee23222..b06f52d74 100644 --- a/vendor/golang.org/x/sys/unix/gccgo.go +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gccgo && !aix -// +build gccgo,!aix +//go:build gccgo && !aix && !hurd +// +build gccgo,!aix,!hurd package unix diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c index 2cb1fefac..c4fce0e70 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_c.c +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build gccgo -// +build !aix +// +build gccgo,!hurd +// +build !aix,!hurd #include #include diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go index 6c7ad052e..1c51b0ec2 100644 --- a/vendor/golang.org/x/sys/unix/ioctl.go +++ b/vendor/golang.org/x/sys/unix/ioctl.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris +// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index 727cba212..8e3947c36 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -174,10 +174,10 @@ openbsd_arm64) mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_mips64) + mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" - mksyscall="go run mksyscall.go -openbsd" + mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" - mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 61c0d0de1..a41111a79 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -255,6 +255,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index de7c23e06..d50b9dc25 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -319,6 +319,7 @@ func PtraceSingleStep(pid int) (err error) { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go new file mode 100644 index 000000000..4ffb64808 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -0,0 +1,22 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build hurd +// +build hurd + +package unix + +/* +#include +int ioctl(int, unsigned long int, uintptr_t); +*/ +import "C" + +func ioctl(fd int, req uint, arg uintptr) (err error) { + r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) + if r0 == -1 && er != nil { + err = er + } + return +} diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd_386.go b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go new file mode 100644 index 000000000..7cf54a3e4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go @@ -0,0 +1,29 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build 386 && hurd +// +build 386,hurd + +package unix + +const ( + TIOCGETA = 0x62251713 +) + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index c5a98440e..d839962e6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1973,36 +1973,46 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { //sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 //sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 -func bytes2iovec(bs [][]byte) []Iovec { - iovecs := make([]Iovec, len(bs)) - for i, b := range bs { - iovecs[i].SetLen(len(b)) +// minIovec is the size of the small initial allocation used by +// Readv, Writev, etc. +// +// This small allocation gets stack allocated, which lets the +// common use case of len(iovs) <= minIovs avoid more expensive +// heap allocations. +const minIovec = 8 + +// appendBytes converts bs to Iovecs and appends them to vecs. +func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { + for _, b := range bs { + var v Iovec + v.SetLen(len(b)) if len(b) > 0 { - iovecs[i].Base = &b[0] + v.Base = &b[0] } else { - iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) + v.Base = (*byte)(unsafe.Pointer(&_zero)) } + vecs = append(vecs, v) } - return iovecs + return vecs } -// offs2lohi splits offs into its lower and upper unsigned long. On 64-bit -// systems, hi will always be 0. On 32-bit systems, offs will be split in half. -// preadv/pwritev chose this calling convention so they don't need to add a -// padding-register for alignment on ARM. +// offs2lohi splits offs into its low and high order bits. func offs2lohi(offs int64) (lo, hi uintptr) { - return uintptr(offs), uintptr(uint64(offs) >> SizeofLong) + const longBits = SizeofLong * 8 + return uintptr(offs), uintptr(uint64(offs) >> longBits) } func Readv(fd int, iovs [][]byte) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) n, err = readv(fd, iovecs) readvRacedetect(iovecs, n, err) return n, err } func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv(fd, iovecs, lo, hi) readvRacedetect(iovecs, n, err) @@ -2010,7 +2020,8 @@ func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { } func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv2(fd, iovecs, lo, hi, flags) readvRacedetect(iovecs, n, err) @@ -2037,7 +2048,8 @@ func readvRacedetect(iovecs []Iovec, n int, err error) { } func Writev(fd int, iovs [][]byte) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } @@ -2047,7 +2059,8 @@ func Writev(fd int, iovs [][]byte) (n int, err error) { } func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } @@ -2058,7 +2071,8 @@ func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { } func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 666f0a1b3..35a3ad758 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -110,6 +110,20 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } +func SysctlUvmexp(name string) (*Uvmexp, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + n := uintptr(SizeofUvmexp) + var u Uvmexp + if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil { + return nil, err + } + return &u, nil +} + func Pipe(p []int) (err error) { return Pipe2(p, 0) } @@ -245,6 +259,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 78daceb33..9b67b908e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -220,6 +220,7 @@ func Uname(uname *Utsname) error { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go index e23c5394e..04aa43f41 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build openbsd && !mips64 -// +build openbsd,!mips64 +//go:build openbsd +// +build openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 2109e569c..07ac56109 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -590,6 +590,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Creat(path string, mode uint32) (fd int, err error) //sys Dup(fd int) (nfd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 00bafda86..a386f8897 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -331,6 +331,19 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { return } +// Recvmsg receives a message from a socket using the recvmsg system call. The +// received non-control data will be written to p, and any "out of band" +// control data will be written to oob. The flags are passed to recvmsg. +// +// The results are: +// - n is the number of non-control data bytes read into p +// - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage] +// - recvflags is flags returned by recvmsg +// - from is the address of the sender +// +// If the underlying socket type is not SOCK_DGRAM, a received message +// containing oob data and a single '\0' of non-control data is treated as if +// the message contained only control data, i.e. n will be zero on return. func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var iov [1]Iovec if len(p) > 0 { @@ -346,13 +359,9 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from return } -// RecvmsgBuffers receives a message from a socket using the recvmsg -// system call. The flags are passed to recvmsg. Any non-control data -// read is scattered into the buffers slices. The results are: -// - n is the number of non-control data read into bufs -// - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage] -// - recvflags is flags returned by recvmsg -// - from is the address of the sender +// RecvmsgBuffers receives a message from a socket using the recvmsg system +// call. This function is equivalent to Recvmsg, but non-control data read is +// scattered into the buffers slices. func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { @@ -371,11 +380,38 @@ func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn in return } +// Sendmsg sends a message on a socket to an address using the sendmsg system +// call. This function is equivalent to SendmsgN, but does not return the +// number of bytes actually sent. func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { _, err = SendmsgN(fd, p, oob, to, flags) return } +// SendmsgN sends a message on a socket to an address using the sendmsg system +// call. p contains the non-control data to send, and oob contains the "out of +// band" control data. The flags are passed to sendmsg. The number of +// non-control bytes actually written to the socket is returned. +// +// Some socket types do not support sending control data without accompanying +// non-control data. If p is empty, and oob contains control data, and the +// underlying socket type is not SOCK_DGRAM, p will be treated as containing a +// single '\0' and the return value will indicate zero bytes sent. +// +// The Go function Recvmsg, if called with an empty p and a non-empty oob, +// will read and ignore this additional '\0'. If the message is received by +// code that does not use Recvmsg, or that does not use Go at all, that code +// will need to be written to expect and ignore the additional '\0'. +// +// If you need to send non-empty oob with p actually empty, and if the +// underlying socket type supports it, you can do so via a raw system call as +// follows: +// +// msg := &unix.Msghdr{ +// Control: &oob[0], +// } +// msg.SetControllen(len(oob)) +// n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags) func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var iov [1]Iovec if len(p) > 0 { @@ -394,9 +430,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) } // SendmsgBuffers sends a message on a socket to an address using the sendmsg -// system call. The flags are passed to sendmsg. Any non-control data written -// is gathered from buffers. The function returns the number of bytes written -// to the socket. +// system call. This function is equivalent to SendmsgN, but the non-control +// data is gathered from buffers. func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index 6d56edc05..af20e474b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -46,6 +46,7 @@ const ( AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 + ALTWERASE = 0x200 ARPHRD_ETHER = 0x1 ARPHRD_FRELAY = 0xf ARPHRD_IEEE1394 = 0x18 @@ -108,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -136,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -147,6 +158,12 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x6 + CLOCK_MONOTONIC = 0x3 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x4 + CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 @@ -170,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc100445d + DIOCADDRULE = 0xccc84404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xccc8441a + DIOCCLRIFFLAG = 0xc024445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0d04412 + DIOCCLRSTATUS = 0xc0244416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1084460 + DIOCGETQUEUE = 0xc100445f + DIOCGETQUEUES = 0xc100445e + DIOCGETRULE = 0xccc84407 + DIOCGETRULES = 0xccc84406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0084454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0084419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0244457 + DIOCKILLSRCNODES = 0xc068445b + DIOCKILLSTATES = 0xc0d04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc084444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0844450 + DIOCRADDADDRS = 0xc44c4443 + DIOCRADDTABLES = 0xc44c443d + DIOCRCLRADDRS = 0xc44c4442 + DIOCRCLRASTATS = 0xc44c4448 + DIOCRCLRTABLES = 0xc44c443c + DIOCRCLRTSTATS = 0xc44c4441 + DIOCRDELADDRS = 0xc44c4444 + DIOCRDELTABLES = 0xc44c443e + DIOCRGETADDRS = 0xc44c4446 + DIOCRGETASTATS = 0xc44c4447 + DIOCRGETTABLES = 0xc44c443f + DIOCRGETTSTATS = 0xc44c4440 + DIOCRINADEFINE = 0xc44c444d + DIOCRSETADDRS = 0xc44c4445 + DIOCRSETTFLAGS = 0xc44c444a + DIOCRTSTADDRS = 0xc44c4449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0244459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0244414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc00c4451 + DIOCXCOMMIT = 0xc00c4452 + DIOCXROLLBACK = 0xc00c4453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -186,6 +261,7 @@ const ( DLT_LOOP = 0xc DLT_MPLS = 0xdb DLT_NULL = 0x0 + DLT_OPENFLOW = 0x10b DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPP = 0x9 @@ -196,6 +272,23 @@ const ( DLT_RAW = 0xe DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf + DLT_USBPCAP = 0xf9 + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -215,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -267,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -298,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -326,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -409,28 +508,40 @@ const ( ETHER_CRC_POLY_LE = 0xedb88320 ETHER_HDR_LEN = 0xe ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 + EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 + EVL_ENCAPLEN = 0x4 + EVL_PRIO_BITS = 0xd + EVL_PRIO_MAX = 0x7 + EVL_VLID_MASK = 0xfff + EVL_VLID_MAX = 0xffe + EVL_VLID_MIN = 0x1 + EVL_VLID_NULL = 0x0 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -443,6 +554,7 @@ const ( F_GETFL = 0x3 F_GETLK = 0x7 F_GETOWN = 0x5 + F_ISATTY = 0xb F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 @@ -460,7 +572,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -471,12 +582,12 @@ const ( IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x20 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 @@ -605,6 +716,7 @@ const ( IFT_LINEGROUP = 0xd2 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 + IFT_MBIM = 0xfa IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 @@ -695,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -729,8 +842,6 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -762,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -787,6 +900,7 @@ const ( IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff + IPV6_MINHOPCOUNT = 0x41 IPV6_MMTU = 0x500 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 @@ -826,12 +940,12 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d + IP_IPDEFTTL = 0x25 IP_IPSECFLOWINFO = 0x24 IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_CRED = 0x19 @@ -865,10 +979,15 @@ const ( IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RTABLE = 0x1021 + IP_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 + IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 @@ -900,10 +1019,11 @@ const ( MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 + MAP_INHERIT_ZERO = 0x3 + MAP_NOEXTEND = 0x0 + MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 + MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 @@ -922,6 +1042,7 @@ const ( MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 + MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 @@ -929,13 +1050,29 @@ const ( MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 + MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -946,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -953,12 +1091,16 @@ const ( NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 + NET_RT_IFNAMES = 0x6 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 + NOTE_CHANGE = 0x1 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EOF = 0x2 @@ -968,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -977,11 +1120,13 @@ const ( NOTE_TRUNCATE = 0x80 NOTE_WRITE = 0x2 OCRNL = 0x10 + OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 @@ -1015,7 +1160,6 @@ const ( PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 - PT_MASK = 0x3ff000 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 @@ -1027,19 +1171,25 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 + RTAX_BFD = 0xb RTAX_BRD = 0x7 + RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa - RTAX_MAX = 0xb + RTAX_MAX = 0xf RTAX_NETMASK = 0x2 + RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 + RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 + RTA_BFD = 0x800 RTA_BRD = 0x80 + RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 @@ -1047,49 +1197,57 @@ const ( RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 + RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 + RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 + RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 + RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x10f808 + RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 - RTF_MASK = 0x80 + RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 + RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 - RTF_SOURCE = 0x20000 RTF_STATIC = 0x800 - RTF_TUNNEL = 0x100000 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 + RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe - RTM_LOCK = 0x8 + RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc + RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1099,67 +1257,74 @@ const ( RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 + RT_TABLEID_BITS = 0x8 + RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d + SIOCBRDGADD = 0x805c693c + SIOCBRDGADDL = 0x805c6949 + SIOCBRDGADDS = 0x805c6941 + SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e + SIOCBRDGDEL = 0x805c693d + SIOCBRDGDELS = 0x805c6942 + SIOCBRDGFLUSH = 0x805c6948 + SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGIFFLGS = 0xc05c693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 + SIOCBRDGIFS = 0xc05c6942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSIFCOST = 0x805c6955 + SIOCBRDGSIFFLGS = 0x805c693f + SIOCBRDGSIFPRIO = 0x805c6954 + SIOCBRDGSIFPROT = 0x805c694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 + SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e + SIOCDPWE3NEIGHBOR = 0x802069de + SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a + SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b @@ -1168,40 +1333,53 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 + SIOCGIFLLPRIO = 0xc02069b6 + SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPAIR = 0xc02069b1 + SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFRXR = 0x802069aa + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 + SIOCGUMBINFO = 0xc02069be + SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 + SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 + SIOCIFAFATTACH = 0x801169ab + SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 + SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e @@ -1209,25 +1387,37 @@ const ( SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 + SIOCSIFLLPRIO = 0x802069b5 + SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPAIR = 0x802069b0 + SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 + SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 + SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 + SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 + SOCK_DNS = 0x1000 + SOCK_NONBLOCK = 0x4000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 @@ -1238,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1245,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1258,6 +1450,7 @@ const ( SO_TIMESTAMP = 0x800 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 + SO_ZEROIZE = 0x2000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 @@ -1287,9 +1480,24 @@ const ( S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 + TCOOFF = 0x1 + TCOON = 0x2 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1298,11 +1506,15 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 + TIOCCHKVERAUTH = 0x2000741e + TIOCCLRVERAUTH = 0x2000741d TIOCCONS = 0x80047462 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d @@ -1357,17 +1569,21 @@ const ( TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b + TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 + TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 + TIOCUCNTL_CBRK = 0x7a + TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 + UTIME_NOW = -0x2 + UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 @@ -1378,6 +1594,19 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_ANONMIN = 0x7 + VM_LOADAVG = 0x2 + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd + VM_MAXSLP = 0xa + VM_METER = 0x1 + VM_NKMEMPAGES = 0x6 + VM_PSSTRINGS = 0x3 + VM_SWAPENCRYPT = 0x5 + VM_USPACE = 0xb + VM_UVMEXP = 0x4 + VM_VNODEMIN = 0x9 + VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc @@ -1390,8 +1619,8 @@ const ( WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 - WSTOPPED = 0x7f WUNTRACED = 0x2 + XCASE = 0x1000000 ) // Errors @@ -1405,6 +1634,7 @@ const ( EALREADY = syscall.Errno(0x25) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x5c) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x58) @@ -1431,7 +1661,7 @@ const ( EIPSEC = syscall.Errno(0x52) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) - ELAST = syscall.Errno(0x5b) + ELAST = syscall.Errno(0x5f) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x56) EMFILE = syscall.Errno(0x18) @@ -1459,12 +1689,14 @@ const ( ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) + EOWNERDEAD = syscall.Errno(0x5e) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) @@ -1472,6 +1704,7 @@ const ( EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5f) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) @@ -1568,7 +1801,7 @@ var errorList = [...]struct { {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, - {35, "EWOULDBLOCK", "resource temporarily unavailable"}, + {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, @@ -1624,7 +1857,11 @@ var errorList = [...]struct { {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, - {91, "ELAST", "not supported"}, + {91, "ENOTSUP", "not supported"}, + {92, "EBADMSG", "bad message"}, + {93, "ENOTRECOVERABLE", "state not recoverable"}, + {94, "EOWNERDEAD", "previous owner died"}, + {95, "ELAST", "protocol error"}, } // Signal table @@ -1638,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1665,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index 25cb60948..6015fcb2b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -109,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -137,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -177,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc110445d + DIOCADDRULE = 0xcd604404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcd60441a + DIOCCLRIFFLAG = 0xc028445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0e04412 + DIOCCLRSTATUS = 0xc0284416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1204460 + DIOCGETQUEUE = 0xc110445f + DIOCGETQUEUES = 0xc110445e + DIOCGETRULE = 0xcd604407 + DIOCGETRULES = 0xcd604406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0104454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0104419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0284457 + DIOCKILLSRCNODES = 0xc080445b + DIOCKILLSTATES = 0xc0e04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc4504443 + DIOCRADDTABLES = 0xc450443d + DIOCRCLRADDRS = 0xc4504442 + DIOCRCLRASTATS = 0xc4504448 + DIOCRCLRTABLES = 0xc450443c + DIOCRCLRTSTATS = 0xc4504441 + DIOCRDELADDRS = 0xc4504444 + DIOCRDELTABLES = 0xc450443e + DIOCRGETADDRS = 0xc4504446 + DIOCRGETASTATS = 0xc4504447 + DIOCRGETTABLES = 0xc450443f + DIOCRGETTSTATS = 0xc4504440 + DIOCRINADEFINE = 0xc450444d + DIOCRSETADDRS = 0xc4504445 + DIOCRSETTFLAGS = 0xc450444a + DIOCRTSTADDRS = 0xc4504449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0284459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0284414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc0104451 + DIOCXCOMMIT = 0xc0104452 + DIOCXROLLBACK = 0xc0104453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -240,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -292,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -323,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -351,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -441,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -466,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -732,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -797,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -906,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -970,12 +1051,26 @@ const ( MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -988,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -996,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1013,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1130,9 +1228,11 @@ const ( RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 @@ -1140,7 +1240,6 @@ const ( RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 - RTM_LOCK = 0x8 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 @@ -1148,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1166,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1182,35 +1284,37 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 + SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a @@ -1229,6 +1333,7 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 @@ -1243,13 +1348,21 @@ const ( SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 @@ -1287,19 +1400,20 @@ const ( SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1314,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1321,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1370,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1379,8 +1506,11 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e @@ -1445,7 +1575,6 @@ const ( TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 @@ -1467,7 +1596,8 @@ const ( VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 - VM_MAXID = 0xc + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 @@ -1745,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1772,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index aef6c0856..8d44955e4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -46,6 +46,7 @@ const ( AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 + ALTWERASE = 0x200 ARPHRD_ETHER = 0x1 ARPHRD_FRELAY = 0xf ARPHRD_IEEE1394 = 0x18 @@ -82,7 +83,7 @@ const ( BIOCGFILDROP = 0x40044278 BIOCGHDRCMPLT = 0x40044274 BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x400c426e + BIOCGRTIMEOUT = 0x4010426e BIOCGSTATS = 0x4008426f BIOCIMMEDIATE = 0x80044270 BIOCLOCK = 0x20004276 @@ -96,7 +97,7 @@ const ( BIOCSFILDROP = 0x80044279 BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x800c426d + BIOCSRTIMEOUT = 0x8010426d BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 @@ -108,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -136,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -147,6 +158,12 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x6 + CLOCK_MONOTONIC = 0x3 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x4 + CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 @@ -170,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc100445d + DIOCADDRULE = 0xcce04404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcce0441a + DIOCCLRIFFLAG = 0xc024445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0d04412 + DIOCCLRSTATUS = 0xc0244416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1084460 + DIOCGETQUEUE = 0xc100445f + DIOCGETQUEUES = 0xc100445e + DIOCGETRULE = 0xcce04407 + DIOCGETRULES = 0xcce04406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0084454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0084419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0244457 + DIOCKILLSRCNODES = 0xc068445b + DIOCKILLSTATES = 0xc0d04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc44c4443 + DIOCRADDTABLES = 0xc44c443d + DIOCRCLRADDRS = 0xc44c4442 + DIOCRCLRASTATS = 0xc44c4448 + DIOCRCLRTABLES = 0xc44c443c + DIOCRCLRTSTATS = 0xc44c4441 + DIOCRDELADDRS = 0xc44c4444 + DIOCRDELTABLES = 0xc44c443e + DIOCRGETADDRS = 0xc44c4446 + DIOCRGETASTATS = 0xc44c4447 + DIOCRGETTABLES = 0xc44c443f + DIOCRGETTSTATS = 0xc44c4440 + DIOCRINADEFINE = 0xc44c444d + DIOCRSETADDRS = 0xc44c4445 + DIOCRSETTFLAGS = 0xc44c444a + DIOCRTSTADDRS = 0xc44c4449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0244459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0244414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc00c4451 + DIOCXCOMMIT = 0xc00c4452 + DIOCXROLLBACK = 0xc00c4453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -186,6 +261,7 @@ const ( DLT_LOOP = 0xc DLT_MPLS = 0xdb DLT_NULL = 0x0 + DLT_OPENFLOW = 0x10b DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPP = 0x9 @@ -196,6 +272,23 @@ const ( DLT_RAW = 0xe DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf + DLT_USBPCAP = 0xf9 + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -215,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -267,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -298,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -326,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -409,28 +508,40 @@ const ( ETHER_CRC_POLY_LE = 0xedb88320 ETHER_HDR_LEN = 0xe ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 + EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 + EVL_ENCAPLEN = 0x4 + EVL_PRIO_BITS = 0xd + EVL_PRIO_MAX = 0x7 + EVL_VLID_MASK = 0xfff + EVL_VLID_MAX = 0xffe + EVL_VLID_MIN = 0x1 + EVL_VLID_NULL = 0x0 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -443,6 +554,8 @@ const ( F_GETFL = 0x3 F_GETLK = 0x7 F_GETOWN = 0x5 + F_ISATTY = 0xb + F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 @@ -459,7 +572,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -470,12 +582,12 @@ const ( IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x20 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 @@ -604,6 +716,7 @@ const ( IFT_LINEGROUP = 0xd2 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 + IFT_MBIM = 0xfa IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 @@ -694,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -728,8 +842,6 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -761,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -786,6 +900,7 @@ const ( IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff + IPV6_MINHOPCOUNT = 0x41 IPV6_MMTU = 0x500 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 @@ -825,12 +940,12 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d + IP_IPDEFTTL = 0x25 IP_IPSECFLOWINFO = 0x24 IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_CRED = 0x19 @@ -864,10 +979,15 @@ const ( IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RTABLE = 0x1021 + IP_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 + IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 @@ -922,6 +1042,7 @@ const ( MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 + MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 @@ -929,12 +1050,27 @@ const ( MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 + MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -947,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -954,12 +1091,16 @@ const ( NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 + NET_RT_IFNAMES = 0x6 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 + NOTE_CHANGE = 0x1 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EOF = 0x2 @@ -969,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -978,11 +1120,13 @@ const ( NOTE_TRUNCATE = 0x80 NOTE_WRITE = 0x2 OCRNL = 0x10 + OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 @@ -1027,19 +1171,25 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 + RTAX_BFD = 0xb RTAX_BRD = 0x7 + RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa - RTAX_MAX = 0xb + RTAX_MAX = 0xf RTAX_NETMASK = 0x2 + RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 + RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 + RTA_BFD = 0x800 RTA_BRD = 0x80 + RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 @@ -1047,24 +1197,29 @@ const ( RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 + RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 + RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 + RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 + RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 + RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x70f808 + RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 - RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 + RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 @@ -1073,23 +1228,26 @@ const ( RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 + RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe - RTM_LOCK = 0x8 + RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc + RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1099,67 +1257,74 @@ const ( RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 + RT_TABLEID_BITS = 0x8 + RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d + SIOCBRDGADD = 0x8060693c + SIOCBRDGADDL = 0x80606949 + SIOCBRDGADDS = 0x80606941 + SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e + SIOCBRDGDEL = 0x8060693d + SIOCBRDGDELS = 0x80606942 + SIOCBRDGFLUSH = 0x80606948 + SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 + SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSIFCOST = 0x80606955 + SIOCBRDGSIFFLGS = 0x8060693f + SIOCBRDGSIFPRIO = 0x80606954 + SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 + SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e + SIOCDPWE3NEIGHBOR = 0x802069de + SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a + SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b @@ -1168,41 +1333,53 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 + SIOCGIFLLPRIO = 0xc02069b6 + SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPAIR = 0xc02069b1 + SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa - SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 + SIOCGUMBINFO = 0xc02069be + SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 + SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 + SIOCIFAFATTACH = 0x801169ab + SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 + SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e @@ -1210,26 +1387,36 @@ const ( SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 + SIOCSIFLLPRIO = 0x802069b5 + SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPAIR = 0x802069b0 + SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 + SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 + SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 + SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 @@ -1241,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1248,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1261,6 +1450,7 @@ const ( SO_TIMESTAMP = 0x800 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 + SO_ZEROIZE = 0x2000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 @@ -1290,9 +1480,24 @@ const ( S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 + TCOOFF = 0x1 + TCOON = 0x2 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1301,11 +1506,15 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 + TIOCCHKVERAUTH = 0x2000741e + TIOCCLRVERAUTH = 0x2000741d TIOCCONS = 0x80047462 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d @@ -1321,7 +1530,7 @@ const ( TIOCGFLAGS = 0x4004745d TIOCGPGRP = 0x40047477 TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x400c745b + TIOCGTSTAMP = 0x4010745b TIOCGWINSZ = 0x40087468 TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c @@ -1360,17 +1569,21 @@ const ( TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b + TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 + TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 + TIOCUCNTL_CBRK = 0x7a + TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 + UTIME_NOW = -0x2 + UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 @@ -1381,6 +1594,19 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_ANONMIN = 0x7 + VM_LOADAVG = 0x2 + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd + VM_MAXSLP = 0xa + VM_METER = 0x1 + VM_NKMEMPAGES = 0x6 + VM_PSSTRINGS = 0x3 + VM_SWAPENCRYPT = 0x5 + VM_USPACE = 0xb + VM_UVMEXP = 0x4 + VM_VNODEMIN = 0x9 + VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc @@ -1394,6 +1620,7 @@ const ( WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 + XCASE = 0x1000000 ) // Errors @@ -1407,6 +1634,7 @@ const ( EALREADY = syscall.Errno(0x25) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x5c) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x58) @@ -1433,7 +1661,7 @@ const ( EIPSEC = syscall.Errno(0x52) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) - ELAST = syscall.Errno(0x5b) + ELAST = syscall.Errno(0x5f) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x56) EMFILE = syscall.Errno(0x18) @@ -1461,12 +1689,14 @@ const ( ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) + EOWNERDEAD = syscall.Errno(0x5e) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) @@ -1474,6 +1704,7 @@ const ( EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5f) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) @@ -1570,7 +1801,7 @@ var errorList = [...]struct { {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, - {35, "EWOULDBLOCK", "resource temporarily unavailable"}, + {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, @@ -1626,7 +1857,11 @@ var errorList = [...]struct { {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, - {91, "ELAST", "not supported"}, + {91, "ENOTSUP", "not supported"}, + {92, "EBADMSG", "bad message"}, + {93, "ENOTRECOVERABLE", "state not recoverable"}, + {94, "EOWNERDEAD", "previous owner died"}, + {95, "ELAST", "protocol error"}, } // Signal table @@ -1640,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1667,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go index 90de7dfc3..ae16fe754 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go @@ -112,6 +112,12 @@ const ( BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -140,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -180,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc110445d + DIOCADDRULE = 0xcd604404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcd60441a + DIOCCLRIFFLAG = 0xc028445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0e04412 + DIOCCLRSTATUS = 0xc0284416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1204460 + DIOCGETQUEUE = 0xc110445f + DIOCGETQUEUES = 0xc110445e + DIOCGETRULE = 0xcd604407 + DIOCGETRULES = 0xcd604406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0104454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0104419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0284457 + DIOCKILLSRCNODES = 0xc080445b + DIOCKILLSTATES = 0xc0e04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc4504443 + DIOCRADDTABLES = 0xc450443d + DIOCRCLRADDRS = 0xc4504442 + DIOCRCLRASTATS = 0xc4504448 + DIOCRCLRTABLES = 0xc450443c + DIOCRCLRTSTATS = 0xc4504441 + DIOCRDELADDRS = 0xc4504444 + DIOCRDELTABLES = 0xc450443e + DIOCRGETADDRS = 0xc4504446 + DIOCRGETASTATS = 0xc4504447 + DIOCRGETTABLES = 0xc450443f + DIOCRGETTSTATS = 0xc4504440 + DIOCRINADEFINE = 0xc450444d + DIOCRSETADDRS = 0xc4504445 + DIOCRSETTFLAGS = 0xc450444a + DIOCRTSTADDRS = 0xc4504449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0284459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0284414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc0104451 + DIOCXCOMMIT = 0xc0104452 + DIOCXROLLBACK = 0xc0104453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -243,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -295,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -326,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -354,15 +423,16 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 @@ -445,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -470,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -736,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -801,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -910,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -981,6 +1058,19 @@ const ( MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -993,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -1001,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1018,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1154,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1172,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1188,30 +1284,30 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 @@ -1264,6 +1360,7 @@ const ( SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be @@ -1310,17 +1407,13 @@ const ( SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1335,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1342,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1391,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1400,6 +1506,7 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 @@ -1768,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1795,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go index f1154ff56..03d90fe35 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go @@ -112,6 +112,12 @@ const ( BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -140,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -301,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -353,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -413,15 +423,16 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 @@ -504,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -529,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -795,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -860,6 +873,7 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 @@ -970,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -1041,6 +1058,19 @@ const ( MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -1053,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -1061,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1078,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1214,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1232,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1248,30 +1284,30 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 @@ -1378,11 +1414,6 @@ const ( SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1455,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1833,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1860,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {81920, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 1b6eedfa6..54749f9c5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -552,6 +552,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 039c4aa06..77479d458 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 0535d3cfd..2e966d4d7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index 1018b5221..d65a7c0fa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index 3802f4b37..6f0b97c6d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go index 8a2db7da9..e1c23b527 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 4af561a48..79f738996 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 3b90e9448..fb161f3a2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 890f4ccd1..4c8ac993a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index c79f071fc..76dd8ec4f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 2925fe0a7..caeb807bd 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 75eb2f5f3..087444250 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 +DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 98446d2b9..a05e5f4ff 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 243a6663c..5782cd108 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 8da6791d1..b2da8e50c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index 9ad116d9f..cf310420c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 +DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 800aab6e3..048b2655e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 4efeff9ab..484bb42e0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index 016d959bc..6f33e37e7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go +// go run mksyscall.go -openbsd -libc -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && mips64 @@ -16,7 +16,7 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(ngid int, gid *_Gid_t) (n int, err error) { - r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) { return } +var libc_getgroups_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getgroups getgroups "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { - _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setgroups_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setgroups setgroups "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err return } +var libc_wait4_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_wait4 wait4 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { - r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { return } +var libc_accept_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_accept accept "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_bind_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_bind bind "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_connect_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connect connect "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) { return } +var libc_socket_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_socket socket "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { - _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getsockopt_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { - _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setsockopt_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getpeername_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpeername getpeername "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getsockname_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsockname getsockname "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { - _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_shutdown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_shutdown shutdown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { - _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_socketpair_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_socketpair socketpair "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { @@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl return } +var libc_recvfrom_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { @@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sendto_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sendto sendto "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { return } +var libc_recvmsg_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { return } +var libc_sendmsg_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { - r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne return } +var libc_kevent_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kevent kevent "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, timeval *[2]Timeval) (err error) { @@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_utimes_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_utimes utimes "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { - _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_futimes_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_futimes futimes "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { return } +var libc_poll_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_poll poll "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { @@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_madvise_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_madvise madvise "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { @@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mlock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mlock mlock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mlockall_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mlockall mlockall "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { @@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mprotect_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mprotect mprotect "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { @@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_msync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_msync msync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { @@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munlock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munlock munlock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munlockall_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munlockall munlockall "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_pipe2_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdents(fd int, buf []byte) (n int, err error) { @@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) { return } +var libc_getdents_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getdents getdents "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getcwd(buf []byte) (n int, err error) { @@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) { return } +var libc_getcwd_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getcwd getcwd "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_ioctl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { @@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sysctl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sysctl sysctl "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, return } +var libc_ppoll_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ppoll ppoll "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Access(path string, mode uint32) (err error) { @@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_access_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_access access "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { - _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_adjtime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_adjtime adjtime "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { @@ -463,13 +607,17 @@ func Chdir(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chdir chdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chflags(path string, flags int) (err error) { @@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chflags_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chflags chflags "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chmod(path string, mode uint32) (err error) { @@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chmod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chmod chmod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chown(path string, uid int, gid int) (err error) { @@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chown chown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { @@ -523,27 +683,49 @@ func Chroot(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_chroot_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chroot chroot "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_close_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_close close "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -551,33 +733,49 @@ func Dup(fd int) (nfd int, err error) { return } +var libc_dup_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup dup "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { - _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_dup2_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup2 dup2 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_dup3_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup3 dup3 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT, uintptr(code), 0, 0) + syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } +var libc_exit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_exit exit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { @@ -586,43 +784,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_faccessat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_faccessat faccessat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchdir fchdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchflags_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchflags fchflags "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchmod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchmod fchmod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { @@ -631,23 +845,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchmodat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { - _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchown fchown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { @@ -656,27 +878,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchownat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchownat fchownat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_flock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_flock flock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fpathconf(fd int, name int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -684,16 +914,24 @@ func Fpathconf(fd int, name int) (val int, err error) { return } +var libc_fpathconf_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { - _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstat fstat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { @@ -702,71 +940,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstatat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstatat fstatat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { - _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstatfs_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fsync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fsync fsync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { - _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_ftruncate_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } +var libc_getegid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getegid getegid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } +var libc_geteuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_geteuid geteuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } +var libc_getgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getgid getgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -774,34 +1040,50 @@ func Getpgid(pid int) (pgid int, err error) { return } +var libc_getpgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpgid getpgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { - r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } +var libc_getpgrp_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } +var libc_getpid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpid getpid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } +var libc_getppid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getppid getppid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -809,20 +1091,28 @@ func Getpriority(which int, who int) (prio int, err error) { return } +var libc_getpriority_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpriority getpriority "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getrlimit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { - r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -830,20 +1120,28 @@ func Getrtable() (rtable int, err error) { return } +var libc_getrtable_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrtable getrtable "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getrusage_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrusage getrusage "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -851,46 +1149,66 @@ func Getsid(pid int) (sid int, err error) { return } +var libc_getsid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsid getsid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_gettimeofday_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } +var libc_getuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getuid getuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { - r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } +var libc_issetugid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_issetugid issetugid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { - _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_kill_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kill kill "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { - r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -898,6 +1216,10 @@ func Kqueue() (fd int, err error) { return } +var libc_kqueue_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kqueue kqueue "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { @@ -906,13 +1228,17 @@ func Lchown(path string, uid int, gid int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_lchown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lchown lchown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Link(path string, link string) (err error) { @@ -926,13 +1252,17 @@ func Link(path string, link string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_link_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_link link "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { @@ -946,23 +1276,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er if err != nil { return } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_linkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_linkat linkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { - _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_listen_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_listen listen "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lstat(path string, stat *Stat_t) (err error) { @@ -971,13 +1309,17 @@ func Lstat(path string, stat *Stat_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_lstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lstat lstat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdir(path string, mode uint32) (err error) { @@ -986,13 +1328,17 @@ func Mkdir(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkdir mkdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdirat(dirfd int, path string, mode uint32) (err error) { @@ -1001,13 +1347,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkdirat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifo(path string, mode uint32) (err error) { @@ -1016,13 +1366,17 @@ func Mkfifo(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkfifo_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { @@ -1031,13 +1385,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkfifoat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknod(path string, mode uint32, dev int) (err error) { @@ -1046,13 +1404,17 @@ func Mknod(path string, mode uint32, dev int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mknod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mknod mknod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { @@ -1061,23 +1423,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mknodat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mknodat mknodat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_nanosleep_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Open(path string, mode int, perm uint32) (fd int, err error) { @@ -1086,7 +1456,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1094,6 +1464,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { return } +var libc_open_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_open open "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { @@ -1102,7 +1476,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1110,6 +1484,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { return } +var libc_openat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_openat openat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pathconf(path string, name int) (val int, err error) { @@ -1118,7 +1496,7 @@ func Pathconf(path string, name int) (val int, err error) { if err != nil { return } - r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1126,6 +1504,10 @@ func Pathconf(path string, name int) (val int, err error) { return } +var libc_pathconf_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pathconf pathconf "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pread(fd int, p []byte, offset int64) (n int, err error) { @@ -1135,7 +1517,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1143,6 +1525,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) { return } +var libc_pread_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pread pread "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pwrite(fd int, p []byte, offset int64) (n int, err error) { @@ -1152,7 +1538,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1160,6 +1546,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) { return } +var libc_pwrite_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwrite pwrite "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func read(fd int, p []byte) (n int, err error) { @@ -1169,7 +1559,7 @@ func read(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1177,6 +1567,10 @@ func read(fd int, p []byte) (n int, err error) { return } +var libc_read_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_read read "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlink(path string, buf []byte) (n int, err error) { @@ -1191,7 +1585,7 @@ func Readlink(path string, buf []byte) (n int, err error) { } else { _p1 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1199,6 +1593,10 @@ func Readlink(path string, buf []byte) (n int, err error) { return } +var libc_readlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readlink readlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { @@ -1213,7 +1611,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { } else { _p1 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1221,6 +1619,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { return } +var libc_readlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rename(from string, to string) (err error) { @@ -1234,13 +1636,17 @@ func Rename(from string, to string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_rename_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_rename rename "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, to string) (err error) { @@ -1254,13 +1660,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_renameat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameat renameat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Revoke(path string) (err error) { @@ -1269,13 +1679,17 @@ func Revoke(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_revoke_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_revoke revoke "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rmdir(path string) (err error) { @@ -1284,17 +1698,21 @@ func Rmdir(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_rmdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_rmdir rmdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { - r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) @@ -1302,10 +1720,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { return } +var libc_lseek_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lseek lseek "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1313,36 +1735,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err return } +var libc_select_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_select select "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setegid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setegid setegid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_seteuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_seteuid seteuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setgid setgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setlogin(name string) (err error) { @@ -1351,97 +1789,133 @@ func Setlogin(name string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setlogin_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setlogin setlogin "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setpgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setpgid setpgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setpriority_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setpriority setpriority "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setregid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setregid setregid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setreuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setreuid setreuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setresgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setresgid setresgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setresuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setresuid setresuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setrlimit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setrtable_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setrtable setrtable "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1449,26 +1923,38 @@ func Setsid() (pid int, err error) { return } +var libc_setsid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setsid setsid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_settimeofday_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setuid setuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Stat(path string, stat *Stat_t) (err error) { @@ -1477,13 +1963,17 @@ func Stat(path string, stat *Stat_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_stat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_stat stat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, stat *Statfs_t) (err error) { @@ -1492,13 +1982,17 @@ func Statfs(path string, stat *Statfs_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_statfs_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_statfs statfs "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlink(path string, link string) (err error) { @@ -1512,13 +2006,17 @@ func Symlink(path string, link string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_symlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_symlink symlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { @@ -1532,23 +2030,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_symlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { - _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sync sync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { @@ -1557,21 +2063,29 @@ func Truncate(path string, length int64) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_truncate_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_truncate truncate "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { - r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } +var libc_umask_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_umask umask "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlink(path string) (err error) { @@ -1580,13 +2094,17 @@ func Unlink(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unlink unlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlinkat(dirfd int, path string, flags int) (err error) { @@ -1595,13 +2113,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unmount(path string, flags int) (err error) { @@ -1610,13 +2132,17 @@ func Unmount(path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unmount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unmount unmount "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func write(fd int, p []byte) (n int, err error) { @@ -1626,7 +2152,7 @@ func write(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1634,10 +2160,14 @@ func write(fd int, p []byte) (n int, err error) { return } +var libc_write_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_write write "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { - r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) @@ -1645,20 +2175,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) ( return } +var libc_mmap_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mmap mmap "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munmap_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munmap munmap "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readlen(fd int, buf *byte, nbuf int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1669,7 +2207,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writelen(fd int, buf *byte, nbuf int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1685,9 +2223,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error if err != nil { return } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } + +var libc_utimensat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_utimensat utimensat "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s new file mode 100644 index 000000000..55af27263 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -0,0 +1,669 @@ +// go run mkasm.go openbsd mips64 +// Code generated by the command above; DO NOT EDIT. + +#include "textflag.h" + +TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getgroups(SB) +GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) + +TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setgroups(SB) +GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) + +TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_wait4(SB) +GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 +DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) + +TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_accept(SB) +GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 +DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) + +TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_bind(SB) +GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 +DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) + +TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connect(SB) +GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) + +TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_socket(SB) +GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 +DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) + +TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsockopt(SB) +GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) + +TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setsockopt(SB) +GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) + +TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpeername(SB) +GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) + +TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsockname(SB) +GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) + +TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_shutdown(SB) +GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) + +TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_socketpair(SB) +GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 +DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) + +TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_recvfrom(SB) +GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 +DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) + +TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendto(SB) +GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) + +TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_recvmsg(SB) +GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 +DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) + +TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendmsg(SB) +GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) + +TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kevent(SB) +GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) + +TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_utimes(SB) +GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 +DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) + +TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_futimes(SB) +GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 +DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) + +TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_poll(SB) +GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 +DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) + +TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_madvise(SB) +GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 +DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) + +TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mlock(SB) +GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) + +TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mlockall(SB) +GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) + +TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mprotect(SB) +GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) + +TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_msync(SB) +GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) + +TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munlock(SB) +GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) + +TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munlockall(SB) +GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) + +TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pipe2(SB) +GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) + +TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getdents(SB) +GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) + +TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getcwd(SB) +GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) + +TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ioctl(SB) +GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) + +TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) +GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) + +TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ppoll(SB) +GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) + +TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_access(SB) +GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 +DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) + +TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_adjtime(SB) +GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) + +TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chdir(SB) +GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) + +TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chflags(SB) +GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) + +TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chmod(SB) +GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) + +TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chown(SB) +GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) + +TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chroot(SB) +GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) + +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + +TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_close(SB) +GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 +DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) + +TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup(SB) +GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) + +TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup2(SB) +GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) + +TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup3(SB) +GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) + +TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_exit(SB) +GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) + +TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_faccessat(SB) +GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) + +TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchdir(SB) +GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) + +TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchflags(SB) +GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) + +TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchmod(SB) +GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) + +TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchmodat(SB) +GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) + +TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchown(SB) +GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) + +TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchownat(SB) +GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) + +TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_flock(SB) +GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) + +TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fpathconf(SB) +GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) + +TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstat(SB) +GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) + +TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstatat(SB) +GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) + +TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstatfs(SB) +GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) + +TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fsync(SB) +GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) + +TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ftruncate(SB) +GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) + +TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getegid(SB) +GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) + +TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_geteuid(SB) +GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) + +TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getgid(SB) +GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) + +TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpgid(SB) +GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) + +TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpgrp(SB) +GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) + +TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpid(SB) +GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) + +TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getppid(SB) +GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) + +TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpriority(SB) +GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) + +TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrlimit(SB) +GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) + +TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrtable(SB) +GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) + +TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrusage(SB) +GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) + +TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsid(SB) +GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) + +TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_gettimeofday(SB) +GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 +DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) + +TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getuid(SB) +GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) + +TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_issetugid(SB) +GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) + +TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kill(SB) +GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) + +TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kqueue(SB) +GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) + +TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lchown(SB) +GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) + +TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_link(SB) +GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 +DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) + +TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_linkat(SB) +GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) + +TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_listen(SB) +GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 +DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) + +TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lstat(SB) +GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) + +TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkdir(SB) +GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) + +TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkdirat(SB) +GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) + +TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkfifo(SB) +GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) + +TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkfifoat(SB) +GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) + +TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mknod(SB) +GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) + +TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mknodat(SB) +GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + +TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) +GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) + +TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_open(SB) +GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 +DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) + +TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_openat(SB) +GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) + +TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pathconf(SB) +GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) + +TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pread(SB) +GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) + +TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwrite(SB) +GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) + +TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_read(SB) +GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 +DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) + +TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readlink(SB) +GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) + +TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readlinkat(SB) +GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) + +TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_rename(SB) +GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 +DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) + +TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameat(SB) +GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) + +TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_revoke(SB) +GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 +DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) + +TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_rmdir(SB) +GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) + +TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lseek(SB) +GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) + +TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_select(SB) +GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 +DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) + +TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setegid(SB) +GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) + +TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_seteuid(SB) +GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) + +TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setgid(SB) +GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) + +TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setlogin(SB) +GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) + +TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setpgid(SB) +GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) + +TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setpriority(SB) +GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) + +TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setregid(SB) +GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) + +TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setreuid(SB) +GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) + +TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setresgid(SB) +GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) + +TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setresuid(SB) +GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) + +TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setrlimit(SB) +GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) + +TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setrtable(SB) +GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) + +TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setsid(SB) +GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) + +TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_settimeofday(SB) +GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 +DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) + +TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setuid(SB) +GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) + +TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_stat(SB) +GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) + +TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_statfs(SB) +GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 +DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) + +TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_symlink(SB) +GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) + +TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_symlinkat(SB) +GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) + +TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sync(SB) +GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) + +TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_truncate(SB) +GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 +DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) + +TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_umask(SB) +GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 +DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) + +TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unlink(SB) +GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) + +TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unlinkat(SB) +GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) + +TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unmount(SB) +GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) + +TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_write(SB) +GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 +DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) + +TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mmap(SB) +GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) + +TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munmap(SB) +GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) + +TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_utimensat(SB) +GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index c85de2d97..330cf7f7a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 7c9223b64..4028255b0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -249,6 +249,12 @@ TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_clock_gettime(SB) + RET +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_close(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 8e3e7873f..5f24de0d9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index 7dba78927..e1fbd4dfa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 91f5a2bde..78d4a4240 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -38,6 +38,7 @@ import ( //go:cgo_import_dynamic libc_chmod chmod "libc.so" //go:cgo_import_dynamic libc_chown chown "libc.so" //go:cgo_import_dynamic libc_chroot chroot "libc.so" +//go:cgo_import_dynamic libc_clockgettime clockgettime "libc.so" //go:cgo_import_dynamic libc_close close "libc.so" //go:cgo_import_dynamic libc_creat creat "libc.so" //go:cgo_import_dynamic libc_dup dup "libc.so" @@ -177,6 +178,7 @@ import ( //go:linkname procChmod libc_chmod //go:linkname procChown libc_chown //go:linkname procChroot libc_chroot +//go:linkname procClockGettime libc_clockgettime //go:linkname procClose libc_close //go:linkname procCreat libc_creat //go:linkname procDup libc_dup @@ -317,6 +319,7 @@ var ( procChmod, procChown, procChroot, + procClockGettime, procClose, procCreat, procDup, @@ -750,6 +753,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClockGettime)), 2, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go index 9e9d0b2a9..55e048471 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go @@ -17,6 +17,7 @@ var sysctlMib = []mibentry{ {"ddb.max_line", []_C_int{9, 3}}, {"ddb.max_width", []_C_int{9, 2}}, {"ddb.panic", []_C_int{9, 5}}, + {"ddb.profile", []_C_int{9, 9}}, {"ddb.radix", []_C_int{9, 1}}, {"ddb.tab_stop_width", []_C_int{9, 4}}, {"ddb.trigger", []_C_int{9, 8}}, @@ -33,29 +34,37 @@ var sysctlMib = []mibentry{ {"hw.ncpufound", []_C_int{6, 21}}, {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, + {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, - {"kern.arandom", []_C_int{1, 37}}, + {"kern.allowdt", []_C_int{1, 65}}, + {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, {"kern.fscale", []_C_int{1, 46}}, {"kern.fsync", []_C_int{1, 33}}, + {"kern.global_ptrace", []_C_int{1, 81}}, {"kern.hostid", []_C_int{1, 11}}, {"kern.hostname", []_C_int{1, 10}}, {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, @@ -78,17 +87,16 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, - {"kern.random", []_C_int{1, 31}}, {"kern.rawpartition", []_C_int{1, 24}}, {"kern.saved_ids", []_C_int{1, 20}}, {"kern.securelevel", []_C_int{1, 9}}, @@ -106,21 +114,20 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, - {"kern.tty.maxptys", []_C_int{1, 44, 6}}, - {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, - {"kern.userasymcrypto", []_C_int{1, 60}}, - {"kern.usercrypto", []_C_int{1, 52}}, - {"kern.usermount", []_C_int{1, 30}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, - {"kern.vnode", []_C_int{1, 13}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, + {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, @@ -148,7 +155,9 @@ var sysctlMib = []mibentry{ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, @@ -157,8 +166,10 @@ var sysctlMib = []mibentry{ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, @@ -175,9 +186,7 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, - {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, @@ -191,6 +200,7 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}}, {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, @@ -198,9 +208,12 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, + {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}}, {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, @@ -213,13 +226,8 @@ var sysctlMib = []mibentry{ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, - {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, - {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, - {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, - {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, - {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, @@ -232,20 +240,19 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, - {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, - {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, + {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, - {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}}, {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, - {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, {"net.key.sadb_dump", []_C_int{4, 30, 1}}, {"net.key.spd_dump", []_C_int{4, 30, 2}}, {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, @@ -254,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go index adecd0966..d2243cf83 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -36,23 +36,29 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, + {"kern.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.dnsjackport", []_C_int{1, 13}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, @@ -81,13 +87,13 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, @@ -108,15 +114,19 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, @@ -176,7 +186,6 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, @@ -252,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go index 8ea52a4a1..82dc51bd8 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -17,6 +17,7 @@ var sysctlMib = []mibentry{ {"ddb.max_line", []_C_int{9, 3}}, {"ddb.max_width", []_C_int{9, 2}}, {"ddb.panic", []_C_int{9, 5}}, + {"ddb.profile", []_C_int{9, 9}}, {"ddb.radix", []_C_int{9, 1}}, {"ddb.tab_stop_width", []_C_int{9, 4}}, {"ddb.trigger", []_C_int{9, 8}}, @@ -33,29 +34,37 @@ var sysctlMib = []mibentry{ {"hw.ncpufound", []_C_int{6, 21}}, {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, + {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, - {"kern.arandom", []_C_int{1, 37}}, + {"kern.allowdt", []_C_int{1, 65}}, + {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, {"kern.fscale", []_C_int{1, 46}}, {"kern.fsync", []_C_int{1, 33}}, + {"kern.global_ptrace", []_C_int{1, 81}}, {"kern.hostid", []_C_int{1, 11}}, {"kern.hostname", []_C_int{1, 10}}, {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, @@ -78,17 +87,16 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, - {"kern.random", []_C_int{1, 31}}, {"kern.rawpartition", []_C_int{1, 24}}, {"kern.saved_ids", []_C_int{1, 20}}, {"kern.securelevel", []_C_int{1, 9}}, @@ -106,21 +114,20 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, - {"kern.tty.maxptys", []_C_int{1, 44, 6}}, - {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, - {"kern.userasymcrypto", []_C_int{1, 60}}, - {"kern.usercrypto", []_C_int{1, 52}}, - {"kern.usermount", []_C_int{1, 30}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, - {"kern.vnode", []_C_int{1, 13}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, + {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, @@ -148,7 +155,9 @@ var sysctlMib = []mibentry{ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, @@ -157,8 +166,10 @@ var sysctlMib = []mibentry{ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, @@ -175,9 +186,7 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, - {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, @@ -191,6 +200,7 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}}, {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, @@ -198,9 +208,12 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, + {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}}, {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, @@ -213,13 +226,8 @@ var sysctlMib = []mibentry{ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, - {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, - {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, - {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, - {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, - {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, @@ -232,20 +240,19 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, - {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, - {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, + {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, - {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}}, {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, - {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, {"net.key.sadb_dump", []_C_int{4, 30, 1}}, {"net.key.spd_dump", []_C_int{4, 30, 2}}, {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, @@ -254,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go index 154b57ae3..cbdda1a4a 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go @@ -36,6 +36,7 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, @@ -44,6 +45,7 @@ var sysctlMib = []mibentry{ {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, + {"kern.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, @@ -51,6 +53,8 @@ var sysctlMib = []mibentry{ {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, @@ -83,13 +87,13 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, @@ -110,13 +114,16 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, @@ -179,7 +186,6 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, @@ -255,7 +261,6 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go index d96bb2ba4..f55eae1a8 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go @@ -36,6 +36,7 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, @@ -86,7 +87,6 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, @@ -123,6 +123,7 @@ var sysctlMib = []mibentry{ {"kern.ttycount", []_C_int{1, 57}}, {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go index a37f77375..01c43a01f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go @@ -6,6 +6,7 @@ package unix +// Deprecated: Use libc wrappers instead of direct syscalls. const ( SYS_EXIT = 1 // { void sys_exit(int rval); } SYS_FORK = 2 // { int sys_fork(void); } diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 2fd2060e6..9bc4c8f9d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -491,6 +491,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 6a5a1a8ae..bb05f655d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -499,6 +499,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index 84cc8d01e..db40e3a19 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -496,6 +496,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go index c844e7096..11121151c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go @@ -499,6 +499,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 2ed718ca0..26eba23b7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -58,22 +58,22 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - X__st_birthtim Timespec + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + _ Timespec } type Statfs_t struct { @@ -98,7 +98,7 @@ type Statfs_t struct { F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte - Pad_cgo_0 [2]byte + _ [2]byte Mount_info [160]byte } @@ -111,13 +111,13 @@ type Flock_t struct { } type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + _ [4]uint8 + Name [256]int8 } type Fsid struct { @@ -262,8 +262,8 @@ type FdSet struct { } const ( - SizeofIfMsghdr = 0xec - SizeofIfData = 0xd4 + SizeofIfMsghdr = 0xa0 + SizeofIfData = 0x88 SizeofIfaMsghdr = 0x18 SizeofIfAnnounceMsghdr = 0x1a SizeofRtMsghdr = 0x60 @@ -292,7 +292,7 @@ type IfData struct { Link_state uint8 Mtu uint32 Metric uint32 - Pad uint32 + Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 @@ -304,10 +304,10 @@ type IfData struct { Imcasts uint64 Omcasts uint64 Iqdrops uint64 + Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval - Mclpool [7]Mclpool } type IfaMsghdr struct { @@ -368,20 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct { - Grown int32 - Alive uint16 - Hwm uint16 - Cwm uint16 - Lwm uint16 -} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -407,11 +399,14 @@ type BpfInsn struct { } type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { @@ -488,7 +483,7 @@ type Uvmexp struct { Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 - Anonpages int32 + Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 @@ -507,8 +502,8 @@ type Uvmexp struct { Swpgonly int32 Nswget int32 Nanon int32 - Nanonneeded int32 - Nfreeanon int32 + Unused05 int32 + Unused06 int32 Faults int32 Traps int32 Intrs int32 @@ -516,8 +511,8 @@ type Uvmexp struct { Softs int32 Syscalls int32 Pageins int32 - Obsolete_swapins int32 - Obsolete_swapouts int32 + Unused07 int32 + Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 @@ -525,7 +520,7 @@ type Uvmexp struct { Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 - Zeroaborts int32 + Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 @@ -557,9 +552,9 @@ type Uvmexp struct { Pdpageouts int32 Pdpending int32 Pddeact int32 - Pdreanon int32 - Pdrevnode int32 - Pdrevtext int32 + Unused11 int32 + Unused12 int32 + Unused13 int32 Fpswtch int32 Kmapent int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index b4fb97ebe..5a5479886 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -73,7 +73,6 @@ type Stat_t struct { Blksize int32 Flags uint32 Gen uint32 - _ [4]byte _ Timespec } @@ -81,7 +80,6 @@ type Statfs_t struct { F_flags uint32 F_bsize uint32 F_iosize uint32 - _ [4]byte F_blocks uint64 F_bfree uint64 F_bavail int64 @@ -200,10 +198,8 @@ type IPv6Mreq struct { type Msghdr struct { Name *byte Namelen uint32 - _ [4]byte Iov *Iovec Iovlen uint32 - _ [4]byte Control *byte Controllen uint32 Flags int32 @@ -311,7 +307,6 @@ type IfData struct { Oqdrops uint64 Noproto uint64 Capabilities uint32 - _ [4]byte Lastchange Timeval } @@ -373,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -395,7 +388,6 @@ type BpfStat struct { type BpfProgram struct { Len uint32 - _ [4]byte Insns *BpfInsn } @@ -411,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { @@ -488,7 +483,7 @@ type Uvmexp struct { Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 - Anonpages int32 + Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 @@ -507,8 +502,8 @@ type Uvmexp struct { Swpgonly int32 Nswget int32 Nanon int32 - Nanonneeded int32 - Nfreeanon int32 + Unused05 int32 + Unused06 int32 Faults int32 Traps int32 Intrs int32 @@ -516,8 +511,8 @@ type Uvmexp struct { Softs int32 Syscalls int32 Pageins int32 - Obsolete_swapins int32 - Obsolete_swapouts int32 + Unused07 int32 + Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 @@ -525,7 +520,7 @@ type Uvmexp struct { Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 - Zeroaborts int32 + Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 @@ -557,9 +552,9 @@ type Uvmexp struct { Pdpageouts int32 Pdpending int32 Pddeact int32 - Pdreanon int32 - Pdrevnode int32 - Pdrevtext int32 + Unused11 int32 + Unused12 int32 + Unused13 int32 Fpswtch int32 Kmapent int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 2c4675040..be58c4e1f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -375,14 +375,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -412,7 +410,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go index ddee04514..52338266c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go @@ -368,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -405,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go index eb13d4e8b..605cfdb12 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go @@ -368,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -405,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/text/unicode/bidi/trieval.go b/vendor/golang.org/x/text/unicode/bidi/trieval.go index 4c459c4b7..6a796e221 100644 --- a/vendor/golang.org/x/text/unicode/bidi/trieval.go +++ b/vendor/golang.org/x/text/unicode/bidi/trieval.go @@ -37,18 +37,6 @@ const ( unknownClass = ^Class(0) ) -var controlToClass = map[rune]Class{ - 0x202D: LRO, // LeftToRightOverride, - 0x202E: RLO, // RightToLeftOverride, - 0x202A: LRE, // LeftToRightEmbedding, - 0x202B: RLE, // RightToLeftEmbedding, - 0x202C: PDF, // PopDirectionalFormat, - 0x2066: LRI, // LeftToRightIsolate, - 0x2067: RLI, // RightToLeftIsolate, - 0x2068: FSI, // FirstStrongIsolate, - 0x2069: PDI, // PopDirectionalIsolate, -} - // A trie entry has the following bits: // 7..5 XOR mask for brackets // 4 1: Bracket open, 0: Bracket close diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go index f34a38e4e..a6b508188 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.12.2 +// protoc v3.21.9 // source: google/rpc/status.proto package status @@ -48,11 +48,13 @@ type Status struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of + // [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized + // by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. diff --git a/vendor/google.golang.org/grpc/attributes/attributes.go b/vendor/google.golang.org/grpc/attributes/attributes.go index ae13ddac1..02f5dc531 100644 --- a/vendor/google.golang.org/grpc/attributes/attributes.go +++ b/vendor/google.golang.org/grpc/attributes/attributes.go @@ -19,7 +19,7 @@ // Package attributes defines a generic key/value store used in various gRPC // components. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index 542594f5c..29475e31c 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -48,7 +48,7 @@ type BackoffConfig struct { // here for more details: // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index f4f9408f3..392b21fb2 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -110,6 +110,11 @@ type SubConn interface { UpdateAddresses([]resolver.Address) // Connect starts the connecting for this SubConn. Connect() + // GetOrBuildProducer returns a reference to the existing Producer for this + // ProducerBuilder in this SubConn, or, if one does not currently exist, + // creates a new one and returns it. Returns a close function which must + // be called when the Producer is no longer needed. + GetOrBuildProducer(ProducerBuilder) (p Producer, close func()) } // NewSubConnOptions contains options to create new SubConn. @@ -371,3 +376,21 @@ type ClientConnState struct { // ErrBadResolverState may be returned by UpdateClientConnState to indicate a // problem with the provided name resolver data. var ErrBadResolverState = errors.New("bad resolver state") + +// A ProducerBuilder is a simple constructor for a Producer. It is used by the +// SubConn to create producers when needed. +type ProducerBuilder interface { + // Build creates a Producer. The first parameter is always a + // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the + // associated SubConn), but is declared as interface{} to avoid a + // dependency cycle. Should also return a close function that will be + // called when all references to the Producer have been given up. + Build(grpcClientConnInterface interface{}) (p Producer, close func()) +} + +// A Producer is a type shared among potentially many consumers. It is +// associated with a SubConn, and an implementation will typically contain +// other methods to provide additional functionality, e.g. configuration or +// subscription registration. +type Producer interface { +} diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index e8dfc828a..3929c26d3 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -157,8 +157,8 @@ func (b *baseBalancer) mergeErrors() error { // regeneratePicker takes a snapshot of the balancer, and generates a picker // from it. The picker is -// - errPicker if the balancer is in TransientFailure, -// - built by the pickerBuilder with all READY SubConns otherwise. +// - errPicker if the balancer is in TransientFailure, +// - built by the pickerBuilder with all READY SubConns otherwise. func (b *baseBalancer) regeneratePicker() { if b.state == connectivity.TransientFailure { b.picker = NewErrPicker(b.mergeErrors()) diff --git a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go index a87b6809a..c33413581 100644 --- a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go +++ b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go @@ -34,10 +34,10 @@ type ConnectivityStateEvaluator struct { // RecordTransition records state change happening in subConn and based on that // it evaluates what aggregated state should be. // -// - If at least one SubConn in Ready, the aggregated state is Ready; -// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; -// - Else if at least one SubConn is Idle, the aggregated state is Idle; -// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. +// - If at least one SubConn in Ready, the aggregated state is Ready; +// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; +// - Else if at least one SubConn is Idle, the aggregated state is Idle; +// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. // // Shutdown is not considered. func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State { @@ -55,7 +55,11 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne cse.numIdle += updateVal } } + return cse.CurrentState() +} +// CurrentState returns the current aggregate conn state by evaluating the counters +func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State { // Evaluate. if cse.numReady > 0 { return connectivity.Ready diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclbstate/state.go similarity index 87% rename from vendor/google.golang.org/grpc/balancer/grpclb/state/state.go rename to vendor/google.golang.org/grpc/balancer/grpclb/grpclbstate/state.go index 4ecfa1c21..cece046be 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclbstate/state.go @@ -16,9 +16,9 @@ * */ -// Package state declares grpclb types to be set by resolvers wishing to pass -// information to grpclb via resolver.State Attributes. -package state +// Package grpclbstate declares grpclb types to be set by resolvers wishing to +// pass information to grpclb via resolver.State Attributes. +package grpclbstate import ( "google.golang.org/grpc/resolver" @@ -27,7 +27,7 @@ import ( // keyType is the key to use for storing State in Attributes. type keyType string -const key = keyType("grpc.grpclb.state") +const key = keyType("grpc.grpclb.grpclbstate") // State contains gRPCLB-relevant data passed from the name resolver. type State struct { diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go index b1c23eaae..0359956d3 100644 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go @@ -19,17 +19,20 @@ package grpc import ( + "context" "fmt" "strings" "sync" "google.golang.org/grpc/balancer" + "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/internal/balancer/gracefulswitch" "google.golang.org/grpc/internal/buffer" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/status" ) // ccBalancerWrapper sits between the ClientConn and the Balancer. @@ -305,7 +308,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) return nil, err } - acbw := &acBalancerWrapper{ac: ac} + acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)} acbw.ac.mu.Lock() ac.acbw = acbw acbw.ac.mu.Unlock() @@ -359,8 +362,9 @@ func (ccb *ccBalancerWrapper) Target() string { // acBalancerWrapper is a wrapper on top of ac for balancers. // It implements balancer.SubConn interface. type acBalancerWrapper struct { - mu sync.Mutex - ac *addrConn + mu sync.Mutex + ac *addrConn + producers map[balancer.ProducerBuilder]*refCountedProducer } func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { @@ -414,3 +418,64 @@ func (acbw *acBalancerWrapper) getAddrConn() *addrConn { defer acbw.mu.Unlock() return acbw.ac } + +var errSubConnNotReady = status.Error(codes.Unavailable, "SubConn not currently connected") + +// NewStream begins a streaming RPC on the addrConn. If the addrConn is not +// ready, returns errSubConnNotReady. +func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + transport := acbw.ac.getReadyTransport() + if transport == nil { + return nil, errSubConnNotReady + } + return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) +} + +// Invoke performs a unary RPC. If the addrConn is not ready, returns +// errSubConnNotReady. +func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error { + cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) + if err != nil { + return err + } + if err := cs.SendMsg(args); err != nil { + return err + } + return cs.RecvMsg(reply) +} + +type refCountedProducer struct { + producer balancer.Producer + refs int // number of current refs to the producer + close func() // underlying producer's close function +} + +func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { + acbw.mu.Lock() + defer acbw.mu.Unlock() + + // Look up existing producer from this builder. + pData := acbw.producers[pb] + if pData == nil { + // Not found; create a new one and add it to the producers map. + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} + acbw.producers[pb] = pData + } + // Account for this new reference. + pData.refs++ + + // Return a cleanup function wrapped in a OnceFunc to remove this reference + // and delete the refCountedProducer from the map if the total reference + // count goes to zero. + unref := func() { + acbw.mu.Lock() + pData.refs-- + if pData.refs == 0 { + defer pData.close() // Run outside the acbw mutex + delete(acbw.producers, pb) + } + acbw.mu.Unlock() + } + return pData.producer, grpcsync.OnceFunc(unref) +} diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index ed75290cd..66d141fce 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -18,14 +18,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.14.0 // source: grpc/binlog/v1/binarylog.proto package grpc_binarylog_v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -41,10 +40,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Enumerates the type of event // Note the terminology is different from the RPC semantics // definition, but the same meaning is expressed here. @@ -261,6 +256,7 @@ type GrpcLogEntry struct { // according to the type of the log entry. // // Types that are assignable to Payload: + // // *GrpcLogEntry_ClientHeader // *GrpcLogEntry_ServerHeader // *GrpcLogEntry_Message @@ -694,12 +690,12 @@ func (x *Message) GetData() []byte { // Header keys added by gRPC are omitted. To be more specific, // implementations will not log the following entries, and this is // not to be treated as a truncation: -// - entries handled by grpc that are not user visible, such as those -// that begin with 'grpc-' (with exception of grpc-trace-bin) -// or keys like 'lb-token' -// - transport specific entries, including but not limited to: -// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc -// - entries added for call credentials +// - entries handled by grpc that are not user visible, such as those +// that begin with 'grpc-' (with exception of grpc-trace-bin) +// or keys like 'lb-token' +// - transport specific entries, including but not limited to: +// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc +// - entries added for call credentials // // Implementations must always log grpc-trace-bin if it is present. // Practically speaking it will only be visible on server side because diff --git a/vendor/google.golang.org/grpc/channelz/channelz.go b/vendor/google.golang.org/grpc/channelz/channelz.go index a220c47c5..32b7fa579 100644 --- a/vendor/google.golang.org/grpc/channelz/channelz.go +++ b/vendor/google.golang.org/grpc/channelz/channelz.go @@ -23,7 +23,7 @@ // https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by // the `internal/channelz` package. // -// Experimental +// # Experimental // // Notice: All APIs in this package are experimental and may be removed in a // later release. diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 779b03bca..045668904 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -503,7 +503,7 @@ type ClientConn struct { // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -522,7 +522,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec // GetState returns the connectivity.State of ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -534,7 +534,7 @@ func (cc *ClientConn) GetState() connectivity.State { // the channel is idle. Does not wait for the connection attempts to begin // before returning. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -761,7 +761,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric { // Target returns the target string of the ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -788,10 +788,16 @@ func (cc *ClientConn) incrCallsFailed() { func (ac *addrConn) connect() error { ac.mu.Lock() if ac.state == connectivity.Shutdown { + if logger.V(2) { + logger.Infof("connect called on shutdown addrConn; ignoring.") + } ac.mu.Unlock() return errConnClosing } if ac.state != connectivity.Idle { + if logger.V(2) { + logger.Infof("connect called on addrConn in non-idle state (%v); ignoring.", ac.state) + } ac.mu.Unlock() return nil } @@ -831,9 +837,9 @@ func equalAddresses(a, b []resolver.Address) bool { // // If ac is Ready, it checks whether current connected address of ac is in the // new addrs list. -// - If true, it updates ac.addrs and returns true. The ac will keep using -// the existing connection. -// - If false, it does nothing and returns false. +// - If true, it updates ac.addrs and returns true. The ac will keep using +// the existing connection. +// - If false, it does nothing and returns false. func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool { ac.mu.Lock() defer ac.mu.Unlock() @@ -998,7 +1004,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { // However, if a previously unavailable network becomes available, this may be // used to trigger an immediate reconnect. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1228,38 +1234,33 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T // address was not successfully connected, or updates ac appropriately with the // new transport. func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error { - // TODO: Delete prefaceReceived and move the logic to wait for it into the - // transport. - prefaceReceived := grpcsync.NewEvent() - connClosed := grpcsync.NewEvent() - addr.ServerName = ac.cc.getServerName(addr) hctx, hcancel := context.WithCancel(ac.ctx) - hcStarted := false // protected by ac.mu - onClose := func() { + onClose := grpcsync.OnceFunc(func() { ac.mu.Lock() defer ac.mu.Unlock() - defer connClosed.Fire() - defer hcancel() - if !hcStarted || hctx.Err() != nil { - // We didn't start the health check or set the state to READY, so - // no need to do anything else here. - // - // OR, we have already cancelled the health check context, meaning - // we have already called onClose once for this transport. In this - // case it would be dangerous to clear the transport and update the - // state, since there may be a new transport in this addrConn. + if ac.state == connectivity.Shutdown { + // Already shut down. tearDown() already cleared the transport and + // canceled hctx via ac.ctx, and we expected this connection to be + // closed, so do nothing here. + return + } + hcancel() + if ac.transport == nil { + // We're still connecting to this address, which could error. Do + // not update the connectivity state or resolve; these will happen + // at the end of the tryAllAddrs connection loop in the event of an + // error. return } ac.transport = nil - // Refresh the name resolver + // Refresh the name resolver on any connection loss. ac.cc.resolveNow(resolver.ResolveNowOptions{}) - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - } - + // Always go idle and wait for the LB policy to initiate a new + // connection attempt. + ac.updateConnectivityState(connectivity.Idle, nil) + }) onGoAway := func(r transport.GoAwayReason) { ac.mu.Lock() ac.adjustParams(r) @@ -1271,68 +1272,45 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose) if err != nil { + if logger.V(2) { + logger.Infof("Creating new client transport to %q: %v", addr, err) + } // newTr is either nil, or closed. hcancel() channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s. Err: %v", addr, err) return err } - select { - case <-connectCtx.Done(): - // We didn't get the preface in time. + ac.mu.Lock() + defer ac.mu.Unlock() + if ac.state == connectivity.Shutdown { + // This can happen if the subConn was removed while in `Connecting` + // state. tearDown() would have set the state to `Shutdown`, but + // would not have closed the transport since ac.transport would not + // have been set at that point. + // + // We run this in a goroutine because newTr.Close() calls onClose() + // inline, which requires locking ac.mu. + // // The error we pass to Close() is immaterial since there are no open // streams at this point, so no trailers with error details will be sent // out. We just need to pass a non-nil error. - newTr.Close(transport.ErrConnClosing) - if connectCtx.Err() == context.DeadlineExceeded { - err := errors.New("failed to receive server preface within timeout") - channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err) - return err - } + go newTr.Close(transport.ErrConnClosing) return nil - case <-prefaceReceived.Done(): - // We got the preface - huzzah! things are good. - ac.mu.Lock() - defer ac.mu.Unlock() - if connClosed.HasFired() { - // onClose called first; go idle but do nothing else. - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - return nil - } - if ac.state == connectivity.Shutdown { - // This can happen if the subConn was removed while in `Connecting` - // state. tearDown() would have set the state to `Shutdown`, but - // would not have closed the transport since ac.transport would not - // been set at that point. - // - // We run this in a goroutine because newTr.Close() calls onClose() - // inline, which requires locking ac.mu. - // - // The error we pass to Close() is immaterial since there are no open - // streams at this point, so no trailers with error details will be sent - // out. We just need to pass a non-nil error. - go newTr.Close(transport.ErrConnClosing) - return nil - } - ac.curAddr = addr - ac.transport = newTr - hcStarted = true - ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + } + if hctx.Err() != nil { + // onClose was already called for this connection, but the connection + // was successfully established first. Consider it a success and set + // the new state to Idle. + ac.updateConnectivityState(connectivity.Idle, nil) return nil - case <-connClosed.Done(): - // The transport has already closed. If we received the preface, too, - // this is not an error. - select { - case <-prefaceReceived.Done(): - return nil - default: - return errors.New("connection closed before server preface received") - } } + ac.curAddr = addr + ac.transport = newTr + ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + return nil } // startHealthCheck starts the health checking stream (RPC) to watch the health @@ -1583,7 +1561,7 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err) } else { channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb != nil { cc.parsedTarget = parsedTarget return rb, nil @@ -1604,9 +1582,9 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { return nil, err } channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb == nil { - return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme) + return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme) } cc.parsedTarget = parsedTarget return rb, nil diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 96ff1877e..5feac3aa0 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -36,16 +36,16 @@ import ( // PerRPCCredentials defines the common interface for the credentials which need to // attach security information to every RPC (e.g., oauth2). type PerRPCCredentials interface { - // GetRequestMetadata gets the current request metadata, refreshing - // tokens if required. This should be called by the transport layer on - // each request, and the data should be populated in headers or other - // context. If a status code is returned, it will be used as the status - // for the RPC. uri is the URI of the entry point for the request. - // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. Additionally, RequestInfo data will be - // available via ctx to this call. - // TODO(zhaoq): Define the set of the qualified keys instead of leaving - // it as an arbitrary string. + // GetRequestMetadata gets the current request metadata, refreshing tokens + // if required. This should be called by the transport layer on each + // request, and the data should be populated in headers or other + // context. If a status code is returned, it will be used as the status for + // the RPC (restricted to an allowable set of codes as defined by gRFC + // A54). uri is the URI of the entry point for the request. When supported + // by the underlying implementation, ctx can be used for timeout and + // cancellation. Additionally, RequestInfo data will be available via ctx + // to this call. TODO(zhaoq): Define the set of the qualified keys instead + // of leaving it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) // RequireTransportSecurity indicates whether the credentials requires // transport security. diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 784822d05..ce2bbc10a 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error // TLSChannelzSecurityValue defines the struct that TLS protocol should return // from GetSecurityValue(), containing security info like cipher and certificate used. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index 9372dc322..8f5b536f1 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -116,8 +116,9 @@ func newFuncDialOption(f func(*dialOptions)) *funcDialOption { // be twice the size to keep syscalls low. The default value for this buffer is // 32KB. // -// Zero will disable the write buffer such that each write will be on underlying -// connection. Note: A Send call may not directly translate to a write. +// Zero or negative values will disable the write buffer such that each write +// will be on underlying connection. Note: A Send call may not directly +// translate to a write. func WithWriteBufferSize(s int) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.WriteBufferSize = s @@ -127,8 +128,9 @@ func WithWriteBufferSize(s int) DialOption { // WithReadBufferSize lets you set the size of read buffer, this determines how // much data can be read at most for each read syscall. // -// The default value for this buffer is 32KB. Zero will disable read buffer for -// a connection so data framer can access the underlying conn directly. +// The default value for this buffer is 32KB. Zero or negative values will +// disable read buffer for a connection so data framer can access the +// underlying conn directly. func WithReadBufferSize(s int) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.ReadBufferSize = s diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 18e530fc9..711763d54 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -19,7 +19,7 @@ // Package encoding defines the interface for the compressor and codec, and // functions to register and retrieve compressors and codecs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. @@ -28,6 +28,8 @@ package encoding import ( "io" "strings" + + "google.golang.org/grpc/internal/grpcutil" ) // Identity specifies the optional encoding for uncompressed streams. @@ -73,6 +75,7 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index 7c1f66409..b5560b47e 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -242,7 +242,7 @@ func (g *loggerT) V(l int) bool { // DepthLoggerV2, the below functions will be called with the appropriate stack // depth set for trivial functions the logger may ignore. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go index a66024d23..8e29a62f1 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go @@ -17,14 +17,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.14.0 // source: grpc/health/v1/health.proto package grpc_health_v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,10 +37,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HealthCheckResponse_ServingStatus int32 const ( diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index c5579e650..f9e80e27a 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -30,15 +30,15 @@ import ( // to build a new logger and assign it to binarylog.Logger. // // Example filter config strings: -// - "" Nothing will be logged -// - "*" All headers and messages will be fully logged. -// - "*{h}" Only headers will be logged. -// - "*{m:256}" Only the first 256 bytes of each message will be logged. -// - "Foo/*" Logs every method in service Foo -// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar -// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method -// /Foo/Bar, logs all headers and messages in every other method in service -// Foo. +// - "" Nothing will be logged +// - "*" All headers and messages will be fully logged. +// - "*{h}" Only headers will be logged. +// - "*{m:256}" Only the first 256 bytes of each message will be logged. +// - "Foo/*" Logs every method in service Foo +// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar +// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method +// /Foo/Bar, logs all headers and messages in every other method in service +// Foo. // // If two configs exist for one certain method or service, the one specified // later overrides the previous config. diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 179f4a26d..85e3ff281 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -121,7 +121,7 @@ func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated // but not counted towards the size limit. continue } - currentEntryLen := uint64(len(entry.Value)) + currentEntryLen := uint64(len(entry.GetKey())) + uint64(len(entry.GetValue())) if currentEntryLen > bytesLimit { break } diff --git a/vendor/google.golang.org/grpc/internal/channelz/types.go b/vendor/google.golang.org/grpc/internal/channelz/types.go index ad0ce4dab..7b2f350e2 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types.go +++ b/vendor/google.golang.org/grpc/internal/channelz/types.go @@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the channel itself from the channelz database. // The delete process includes two steps: -// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its -// parent's child list. -// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id -// will return entry not found error. +// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its +// parent's child list. +// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id +// will return entry not found error. func (c *channel) deleteSelfIfReady() { if !c.deleteSelfFromTree() { return @@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the subchannel itself from the channelz database. // The delete process includes two steps: -// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from -// its parent's child list. -// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup -// by id will return entry not found error. +// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from +// its parent's child list. +// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup +// by id will return entry not found error. func (sc *subChannel) deleteSelfIfReady() { if !sc.deleteSelfFromTree() { return diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 6f0272543..7edd196bd 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -25,11 +25,15 @@ import ( ) const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + prefix = "GRPC_GO_" + txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS" ) var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + // AdvertiseCompressors is set if registered compressor should be advertised + // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). + AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false") ) diff --git a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go index 30a3b4258..b68e26a36 100644 --- a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go @@ -110,7 +110,7 @@ type LoggerV2 interface { // This is a copy of the DepthLoggerV2 defined in the external grpclog package. // It is defined here to avoid a circular dependency. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go new file mode 100644 index 000000000..6635f7bca --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go @@ -0,0 +1,32 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcsync + +import ( + "sync" +) + +// OnceFunc returns a function wrapping f which ensures f is only executed +// once even if the returned function is executed multiple times. +func OnceFunc(f func()) func() { + var once sync.Once + return func() { + once.Do(f) + } +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go new file mode 100644 index 000000000..9f4090967 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go @@ -0,0 +1,47 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcutil + +import ( + "strings" + + "google.golang.org/grpc/internal/envconfig" +) + +// RegisteredCompressorNames holds names of the registered compressors. +var RegisteredCompressorNames []string + +// IsCompressorNameRegistered returns true when name is available in registry. +func IsCompressorNameRegistered(name string) bool { + for _, compressor := range RegisteredCompressorNames { + if compressor == name { + return true + } + } + return false +} + +// RegisteredCompressors returns a string of registered compressor names +// separated by comma. +func RegisteredCompressors() string { + if !envconfig.AdvertiseCompressors { + return "" + } + return strings.Join(RegisteredCompressorNames, ",") +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/vendor/google.golang.org/grpc/internal/grpcutil/method.go index e9c4af648..ec62b4775 100644 --- a/vendor/google.golang.org/grpc/internal/grpcutil/method.go +++ b/vendor/google.golang.org/grpc/internal/grpcutil/method.go @@ -25,7 +25,6 @@ import ( // ParseMethod splits service and method from the input. It expects format // "/service/method". -// func ParseMethod(methodName string) (service, method string, _ error) { if !strings.HasPrefix(methodName, "/") { return "", "", errors.New("invalid method name: should start with /") diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 75301c514..d51302e65 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -32,7 +32,7 @@ import ( "sync" "time" - grpclbstate "google.golang.org/grpc/balancer/grpclb/state" + grpclbstate "google.golang.org/grpc/balancer/grpclb/grpclbstate" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" @@ -140,10 +140,10 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts disableServiceConfig: opts.DisableServiceConfig, } - if target.Authority == "" { + if target.URL.Host == "" { d.resolver = defaultResolver } else { - d.resolver, err = customAuthorityResolver(target.Authority) + d.resolver, err = customAuthorityResolver(target.URL.Host) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index 520d9229e..c6e08221f 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -20,13 +20,20 @@ // name without scheme back to gRPC as resolved address. package passthrough -import "google.golang.org/grpc/resolver" +import ( + "errors" + + "google.golang.org/grpc/resolver" +) const scheme = "passthrough" type passthroughBuilder struct{} func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { + if target.Endpoint == "" && opts.Dialer == nil { + return nil, errors.New("passthrough: received empty target in Build()") + } r := &passthroughResolver{ target: target, cc: cc, diff --git a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go index 7f1a702ca..160911687 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go +++ b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go @@ -34,8 +34,8 @@ type builder struct { } func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolver.BuildOptions) (resolver.Resolver, error) { - if target.Authority != "" { - return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.Authority) + if target.URL.Host != "" { + return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.URL.Host) } // gRPC was parsing the dial target manually before PR #4817, and we diff --git a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go index badbdbf59..51e733e49 100644 --- a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go @@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) { // ServiceConfig contains a list of loadBalancingConfigs, each with a name and // config. This method iterates through that list in order, and stops at the // first policy that is supported. -// - If the config for the first supported policy is invalid, the whole service -// config is invalid. -// - If the list doesn't contain any supported policy, the whole service config -// is invalid. +// - If the config for the first supported policy is invalid, the whole service +// config is invalid. +// - If the list doesn't contain any supported policy, the whole service config +// is invalid. func (bc *BalancerConfig) UnmarshalJSON(b []byte) error { var ir intermediateBalancerConfig err := json.Unmarshal(b, &ir) diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index e5c6513ed..b0ead4f54 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool { } return proto.Equal(e.s.s, tse.s.s) } + +// IsRestrictedControlPlaneCode returns whether the status includes a code +// restricted for control plane usage as defined by gRFC A54. +func IsRestrictedControlPlaneCode(s *Status) bool { + switch s.Code() { + case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss: + return true + } + return false +} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index 409769f48..aaa9c859a 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -191,7 +191,7 @@ type goAway struct { code http2.ErrCode debugData []byte headsUp bool - closeConn bool + closeConn error // if set, loopyWriter will exit, resulting in conn closure } func (*goAway) isTransportResponseFrame() bool { return false } @@ -209,6 +209,14 @@ type outFlowControlSizeRequest struct { func (*outFlowControlSizeRequest) isTransportResponseFrame() bool { return false } +// closeConnection is an instruction to tell the loopy writer to flush the +// framer and exit, which will cause the transport's connection to be closed +// (by the client or server). The transport itself will close after the reader +// encounters the EOF caused by the connection closure. +type closeConnection struct{} + +func (closeConnection) isTransportResponseFrame() bool { return false } + type outStreamState int const ( @@ -408,7 +416,7 @@ func (c *controlBuffer) get(block bool) (interface{}, error) { select { case <-c.ch: case <-c.done: - return nil, ErrConnClosing + return nil, errors.New("transport closed by client") } } } @@ -519,18 +527,6 @@ const minBatchSize = 1000 // As an optimization, to increase the batch size for each flush, loopy yields the processor, once // if the batch size is too low to give stream goroutines a chance to fill it up. func (l *loopyWriter) run() (err error) { - defer func() { - if err == ErrConnClosing { - // Don't log ErrConnClosing as error since it happens - // 1. When the connection is closed by some other known issue. - // 2. User closed the connection. - // 3. A graceful close of connection. - if logger.V(logLevel) { - logger.Infof("transport: loopyWriter.run returning. %v", err) - } - err = nil - } - }() for { it, err := l.cbuf.get(true) if err != nil { @@ -574,7 +570,6 @@ func (l *loopyWriter) run() (err error) { } l.framer.writer.Flush() break hasdata - } } } @@ -662,11 +657,10 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { func (l *loopyWriter) originateStream(str *outStream) error { hdr := str.itl.dequeue().(*headerFrame) if err := hdr.initStream(str.id); err != nil { - if err == ErrConnClosing { - return err + if err == errStreamDrain { // errStreamDrain need not close transport + return nil } - // Other errors(errStreamDrain) need not close transport. - return nil + return err } if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { return err @@ -764,7 +758,7 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { } } if l.side == clientSide && l.draining && len(l.estdStreams) == 0 { - return ErrConnClosing + return errors.New("finished processing active streams while in draining mode") } return nil } @@ -799,7 +793,7 @@ func (l *loopyWriter) incomingGoAwayHandler(*incomingGoAway) error { if l.side == clientSide { l.draining = true if len(l.estdStreams) == 0 { - return ErrConnClosing + return errors.New("received GOAWAY with no active streams") } } return nil @@ -817,6 +811,14 @@ func (l *loopyWriter) goAwayHandler(g *goAway) error { return nil } +func (l *loopyWriter) closeConnectionHandler() error { + l.framer.writer.Flush() + // Exit loopyWriter entirely by returning an error here. This will lead to + // the transport closing the connection, and, ultimately, transport + // closure. + return ErrConnClosing +} + func (l *loopyWriter) handle(i interface{}) error { switch i := i.(type) { case *incomingWindowUpdate: @@ -845,6 +847,8 @@ func (l *loopyWriter) handle(i interface{}) error { return l.goAwayHandler(i) case *outFlowControlSizeRequest: return l.outFlowControlSizeRequestHandler(i) + case closeConnection: + return l.closeConnectionHandler() default: return fmt.Errorf("transport: unknown control message type %T", i) } diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 090120925..ebe8bfe33 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -46,24 +46,32 @@ import ( "google.golang.org/grpc/status" ) -// NewServerHandlerTransport returns a ServerTransport handling gRPC -// from inside an http.Handler. It requires that the http Server -// supports HTTP/2. +// NewServerHandlerTransport returns a ServerTransport handling gRPC from +// inside an http.Handler, or writes an HTTP error to w and returns an error. +// It requires that the http Server supports HTTP/2. func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []stats.Handler) (ServerTransport, error) { if r.ProtoMajor != 2 { - return nil, errors.New("gRPC requires HTTP/2") + msg := "gRPC requires HTTP/2" + http.Error(w, msg, http.StatusBadRequest) + return nil, errors.New(msg) } if r.Method != "POST" { - return nil, errors.New("invalid gRPC request method") + msg := fmt.Sprintf("invalid gRPC request method %q", r.Method) + http.Error(w, msg, http.StatusBadRequest) + return nil, errors.New(msg) } contentType := r.Header.Get("Content-Type") // TODO: do we assume contentType is lowercase? we did before contentSubtype, validContentType := grpcutil.ContentSubtype(contentType) if !validContentType { - return nil, errors.New("invalid gRPC request content-type") + msg := fmt.Sprintf("invalid gRPC request content-type %q", contentType) + http.Error(w, msg, http.StatusBadRequest) + return nil, errors.New(msg) } if _, ok := w.(http.Flusher); !ok { - return nil, errors.New("gRPC requires a ResponseWriter supporting http.Flusher") + msg := "gRPC requires a ResponseWriter supporting http.Flusher" + http.Error(w, msg, http.StatusInternalServerError) + return nil, errors.New(msg) } st := &serverHandlerTransport{ @@ -79,7 +87,9 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s if v := r.Header.Get("grpc-timeout"); v != "" { to, err := decodeTimeout(v) if err != nil { - return nil, status.Errorf(codes.Internal, "malformed time-out: %v", err) + msg := fmt.Sprintf("malformed time-out: %v", err) + http.Error(w, msg, http.StatusBadRequest) + return nil, status.Error(codes.Internal, msg) } st.timeoutSet = true st.timeout = to @@ -97,7 +107,9 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s for _, v := range vv { v, err := decodeMetadataHeader(k, v) if err != nil { - return nil, status.Errorf(codes.Internal, "malformed binary metadata: %v", err) + msg := fmt.Sprintf("malformed binary metadata %q in header %q: %v", v, k, err) + http.Error(w, msg, http.StatusBadRequest) + return nil, status.Error(codes.Internal, msg) } metakv = append(metakv, k, v) } @@ -141,12 +153,15 @@ type serverHandlerTransport struct { stats []stats.Handler } -func (ht *serverHandlerTransport) Close() { - ht.closeOnce.Do(ht.closeCloseChanOnce) +func (ht *serverHandlerTransport) Close(err error) { + ht.closeOnce.Do(func() { + if logger.V(logLevel) { + logger.Infof("Closing serverHandlerTransport: %v", err) + } + close(ht.closedCh) + }) } -func (ht *serverHandlerTransport) closeCloseChanOnce() { close(ht.closedCh) } - func (ht *serverHandlerTransport) RemoteAddr() net.Addr { return strAddr(ht.req.RemoteAddr) } // strAddr is a net.Addr backed by either a TCP "ip:port" string, or @@ -236,7 +251,7 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro }) } } - ht.Close() + ht.Close(errors.New("finished writing status")) return err } @@ -346,7 +361,7 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace case <-ht.req.Context().Done(): } cancel() - ht.Close() + ht.Close(errors.New("request is done processing")) }() req := ht.req @@ -442,10 +457,10 @@ func (ht *serverHandlerTransport) Drain() { // mapRecvMsgError returns the non-nil err into the appropriate // error value as expected by callers of *grpc.parser.recvMsg. // In particular, in can only be: -// * io.EOF -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package func mapRecvMsgError(err error) error { if err == io.EOF || err == io.ErrUnexpectedEOF { return err diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 5c2f35b24..3e582a285 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -38,8 +38,10 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" @@ -57,11 +59,15 @@ var clientConnectionCounter uint64 // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { - lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. - ctx context.Context - cancel context.CancelFunc - ctxDone <-chan struct{} // Cache the ctx.Done() chan. - userAgent string + lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. + ctx context.Context + cancel context.CancelFunc + ctxDone <-chan struct{} // Cache the ctx.Done() chan. + userAgent string + // address contains the resolver returned address for this transport. + // If the `ServerName` field is set, it takes precedence over `CallHdr.Host` + // passed to `NewStream`, when determining the :authority header. + address resolver.Address md metadata.MD conn net.Conn // underlying communication channel loopy *loopyWriter @@ -99,16 +105,13 @@ type http2Client struct { maxSendHeaderListSize *uint32 bdpEst *bdpEstimator - // onPrefaceReceipt is a callback that client transport calls upon - // receiving server preface to signal that a succefull HTTP2 - // connection was established. - onPrefaceReceipt func() maxConcurrentStreams uint32 streamQuota int64 streamsQuotaAvailable chan struct{} waitingStreams uint32 nextID uint32 + registeredCompressors string // Do not access controlBuf with mu held. mu sync.Mutex // guard the following variables @@ -194,7 +197,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -216,12 +219,38 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) } + // Any further errors will close the underlying connection defer func(conn net.Conn) { if err != nil { conn.Close() } }(conn) + + // The following defer and goroutine monitor the connectCtx for cancelation + // and deadline. On context expiration, the connection is hard closed and + // this function will naturally fail as a result. Otherwise, the defer + // waits for the goroutine to exit to prevent the context from being + // monitored (and to prevent the connection from ever being closed) after + // returning from this function. + ctxMonitorDone := grpcsync.NewEvent() + newClientCtx, newClientDone := context.WithCancel(connectCtx) + defer func() { + newClientDone() // Awaken the goroutine below if connectCtx hasn't expired. + <-ctxMonitorDone.Done() // Wait for the goroutine below to exit. + }() + go func(conn net.Conn) { + defer ctxMonitorDone.Fire() // Signal this goroutine has exited. + <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes. + if err := connectCtx.Err(); err != nil { + // connectCtx expired before exiting the function. Hard close the connection. + if logger.V(logLevel) { + logger.Infof("newClientTransport: aborting due to connectCtx: %v", err) + } + conn.Close() + } + }(conn) + kp := opts.KeepaliveParams // Validate keepalive parameters. if kp.Time == 0 { @@ -253,15 +282,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } } if transportCreds != nil { - rawConn := conn - // Pull the deadline from the connectCtx, which will be used for - // timeouts in the authentication protocol handshake. Can ignore the - // boolean as the deadline will return the zero value, which will make - // the conn not timeout on I/O operations. - deadline, _ := connectCtx.Deadline() - rawConn.SetDeadline(deadline) - conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn) - rawConn.SetDeadline(time.Time{}) + conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn) if err != nil { return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err) } @@ -299,6 +320,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ctxDone: ctx.Done(), // Cache Done chan. cancel: cancel, userAgent: opts.UserAgent, + registeredCompressors: grpcutil.RegisteredCompressors(), + address: addr, conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -315,16 +338,15 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts kp: kp, statsHandlers: opts.StatsHandlers, initialWindowSize: initialWindowSize, - onPrefaceReceipt: onPrefaceReceipt, nextID: 1, maxConcurrentStreams: defaultMaxStreamsClient, streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), onGoAway: onGoAway, - onClose: onClose, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), + onClose: onClose, } // Add peer information to the http2client context. t.ctx = peer.NewContext(t.ctx, t.getPeer()) @@ -363,21 +385,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } - // Start the reader goroutine for incoming message. Each transport has - // a dedicated goroutine which reads HTTP2 frame from network. Then it - // dispatches the frame to the corresponding stream entity. - go t.reader() + + // Start the reader goroutine for incoming messages. Each transport has a + // dedicated goroutine which reads HTTP2 frames from the network. Then it + // dispatches the frame to the corresponding stream entity. When the + // server preface is received, readerErrCh is closed. If an error occurs + // first, an error is pushed to the channel. This must be checked before + // returning from this function. + readerErrCh := make(chan error, 1) + go t.reader(readerErrCh) + defer func() { + if err == nil { + err = <-readerErrCh + } + if err != nil { + t.Close(err) + } + }() // Send connection preface to server. n, err := t.conn.Write(clientPreface) if err != nil { err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err) - t.Close(err) return nil, err } if n != len(clientPreface) { err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface)) - t.Close(err) return nil, err } var ss []http2.Setting @@ -397,14 +430,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts err = t.framer.fr.WriteSettings(ss...) if err != nil { err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err) - t.Close(err) return nil, err } // Adjust the connection flow control window if needed. if delta := uint32(icwz - defaultWindowSize); delta > 0 { if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil { err = connectionErrorf(true, err, "transport: failed to write window update: %v", err) - t.Close(err) return nil, err } } @@ -417,10 +448,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts go func() { t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst) err := t.loopy.run() - if err != nil { - if logger.V(logLevel) { - logger.Errorf("transport: loopyWriter.run returning. Err: %v", err) - } + if logger.V(logLevel) { + logger.Infof("transport: loopyWriter exited. Closing connection. Err: %v", err) } // Do not close the transport. Let reader goroutine handle it since // there might be data in the buffers. @@ -507,9 +536,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)}) } + registeredCompressors := t.registeredCompressors if callHdr.SendCompress != "" { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) - headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress}) + // Include the outgoing compressor name when compressor is not registered + // via encoding.RegisterCompressor. This is possible when client uses + // WithCompressor dial option. + if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) { + if registeredCompressors != "" { + registeredCompressors += "," + } + registeredCompressors += callHdr.SendCompress + } + } + + if registeredCompressors != "" { + headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors}) } if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. @@ -589,7 +631,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s for _, c := range t.perRPCCreds { data, err := c.GetRequestMetadata(ctx, audience) if err != nil { - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } return nil, err } @@ -618,7 +664,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call } data, err := callCreds.GetRequestMetadata(ctx, audience) if err != nil { - return nil, status.Errorf(codes.Internal, "transport: %v", err) + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } + return nil, err + } + return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err) } callAuthData = make(map[string]string, len(data)) for k, v := range data { @@ -634,13 +687,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call // NewStream errors result in transparent retry, as they mean nothing went onto // the wire. However, there are two notable exceptions: // -// 1. If the stream headers violate the max header list size allowed by the -// server. It's possible this could succeed on another transport, even if -// it's unlikely, but do not transparently retry. -// 2. If the credentials errored when requesting their headers. In this case, -// it's possible a retry can fix the problem, but indefinitely transparently -// retrying is not appropriate as it is likely the credentials, if they can -// eventually succeed, would need I/O to do so. +// 1. If the stream headers violate the max header list size allowed by the +// server. It's possible this could succeed on another transport, even if +// it's unlikely, but do not transparently retry. +// 2. If the credentials errored when requesting their headers. In this case, +// it's possible a retry can fix the problem, but indefinitely transparently +// retrying is not appropriate as it is likely the credentials, if they can +// eventually succeed, would need I/O to do so. type NewStreamError struct { Err error @@ -655,6 +708,18 @@ func (e NewStreamError) Error() string { // streams. All non-nil errors returned will be *NewStreamError. func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error) { ctx = peer.NewContext(ctx, t.getPeer()) + + // ServerName field of the resolver returned address takes precedence over + // Host field of CallHdr to determine the :authority header. This is because, + // the ServerName field takes precedence for server authentication during + // TLS handshake, and the :authority header should match the value used + // for server authentication. + if t.address.ServerName != "" { + newCallHdr := *callHdr + newCallHdr.Host = t.address.ServerName + callHdr = &newCallHdr + } + headerFields, err := t.createHeaderFields(ctx, callHdr) if err != nil { return nil, &NewStreamError{Err: err, AllowTransparentRetry: false} @@ -880,19 +945,18 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // Close kicks off the shutdown process of the transport. This should be called // only once on a transport. Once it is called, the transport should not be // accessed any more. -// -// This method blocks until the addrConn that initiated this transport is -// re-connected. This happens because t.onClose() begins reconnect logic at the -// addrConn level and blocks until the addrConn is successfully connected. func (t *http2Client) Close(err error) { t.mu.Lock() - // Make sure we only Close once. + // Make sure we only close once. if t.state == closing { t.mu.Unlock() return } - // Call t.onClose before setting the state to closing to prevent the client - // from attempting to create new streams ASAP. + if logger.V(logLevel) { + logger.Infof("transport: closing: %v", err) + } + // Call t.onClose ASAP to prevent the client from attempting to create new + // streams. t.onClose() t.state = closing streams := t.activeStreams @@ -943,11 +1007,14 @@ func (t *http2Client) GracefulClose() { t.mu.Unlock() return } + if logger.V(logLevel) { + logger.Infof("transport: GracefulClose called") + } t.state = draining active := len(t.activeStreams) t.mu.Unlock() if active == 0 { - t.Close(ErrConnClosing) + t.Close(connectionErrorf(true, nil, "no active streams left to process while draining")) return } t.controlBuf.put(&incomingGoAway{}) @@ -1482,33 +1549,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true) } -// reader runs as a separate goroutine in charge of reading data from network -// connection. -// -// TODO(zhaoq): currently one reader per transport. Investigate whether this is -// optimal. -// TODO(zhaoq): Check the validity of the incoming frame sequence. -func (t *http2Client) reader() { - defer close(t.readerDone) - // Check the validity of server preface. +// readServerPreface reads and handles the initial settings frame from the +// server. +func (t *http2Client) readServerPreface() error { frame, err := t.framer.fr.ReadFrame() if err != nil { - err = connectionErrorf(true, err, "error reading server preface: %v", err) - t.Close(err) // this kicks off resetTransport, so must be last before return - return - } - t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) - if t.keepaliveEnabled { - atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + return connectionErrorf(true, err, "error reading server preface: %v", err) } sf, ok := frame.(*http2.SettingsFrame) if !ok { - // this kicks off resetTransport, so must be last before return - t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)) - return + return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame) } - t.onPrefaceReceipt() t.handleSettings(sf, true) + return nil +} + +// reader verifies the server preface and reads all subsequent data from +// network connection. If the server preface is not read successfully, an +// error is pushed to errCh; otherwise errCh is closed with no error. +func (t *http2Client) reader(errCh chan<- error) { + defer close(t.readerDone) + + if err := t.readServerPreface(); err != nil { + errCh <- err + return + } + close(errCh) + if t.keepaliveEnabled { + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + } // loop to keep reading incoming messages on this transport. for { diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 3dd15647b..37e089bc8 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -21,6 +21,7 @@ package transport import ( "bytes" "context" + "errors" "fmt" "io" "math" @@ -41,6 +42,7 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcrand" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -101,13 +103,13 @@ type http2Server struct { mu sync.Mutex // guard the following - // drainChan is initialized when Drain() is called the first time. - // After which the server writes out the first GoAway(with ID 2^31-1) frame. - // Then an independent goroutine will be launched to later send the second GoAway. - // During this time we don't want to write another first GoAway(with ID 2^31 -1) frame. - // Thus call to Drain() will be a no-op if drainChan is already initialized since draining is - // already underway. - drainChan chan struct{} + // drainEvent is initialized when Drain() is called the first time. After + // which the server writes out the first GoAway(with ID 2^31-1) frame. Then + // an independent goroutine will be launched to later send the second + // GoAway. During this time we don't want to write another first GoAway(with + // ID 2^31 -1) frame. Thus call to Drain() will be a no-op if drainEvent is + // already initialized since draining is already underway. + drainEvent *grpcsync.Event state transportState activeStreams map[uint32]*Stream // idle is the time instant when the connection went idle. @@ -293,7 +295,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, defer func() { if err != nil { - t.Close() + t.Close(err) } }() @@ -331,10 +333,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, go func() { t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst) t.loopy.ssGoAwayHandler = t.outgoingGoAwayHandler - if err := t.loopy.run(); err != nil { - if logger.V(logLevel) { - logger.Errorf("transport: loopyWriter.run returning. Err: %v", err) - } + err := t.loopy.run() + if logger.V(logLevel) { + logger.Infof("transport: loopyWriter exited. Closing connection. Err: %v", err) } t.conn.Close() t.controlBuf.finish() @@ -344,8 +345,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, return t, nil } -// operateHeader takes action on the decoded headers. -func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) (fatal bool) { +// operateHeaders takes action on the decoded headers. Returns an error if fatal +// error encountered and transport needs to close, otherwise returns nil. +func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) error { // Acquire max stream ID lock for entire duration t.maxStreamMu.Lock() defer t.maxStreamMu.Unlock() @@ -361,15 +363,12 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeFrameSize, onWrite: func() {}, }) - return false + return nil } if streamID%2 != 1 || streamID <= t.maxStreamID { // illegal gRPC stream id. - if logger.V(logLevel) { - logger.Errorf("transport: http2Server.HandleStreams received an illegal stream id: %v", streamID) - } - return true + return fmt.Errorf("received an illegal stream id: %v. headers frame: %+v", streamID, frame) } t.maxStreamID = streamID @@ -453,7 +452,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( status: status.New(codes.Internal, errMsg), rst: !frame.StreamEnded(), }) - return false + return nil } if !isGRPC || headerError { @@ -463,7 +462,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeProtocol, onWrite: func() {}, }) - return false + return nil } // "If :authority is missing, Host must be renamed to :authority." - A41 @@ -503,7 +502,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( if t.state != reachable { t.mu.Unlock() s.cancel() - return false + return nil } if uint32(len(t.activeStreams)) >= t.maxStreams { t.mu.Unlock() @@ -514,7 +513,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( onWrite: func() {}, }) s.cancel() - return false + return nil } if httpMethod != http.MethodPost { t.mu.Unlock() @@ -530,7 +529,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rst: !frame.StreamEnded(), }) s.cancel() - return false + return nil } if t.inTapHandle != nil { var err error @@ -550,7 +549,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( status: stat, rst: !frame.StreamEnded(), }) - return false + return nil } } t.activeStreams[streamID] = s @@ -597,7 +596,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( wq: s.wq, }) handle(s) - return false + return nil } // HandleStreams receives incoming streams using the given handler. This is @@ -630,19 +629,16 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context. continue } if err == io.EOF || err == io.ErrUnexpectedEOF { - t.Close() + t.Close(err) return } - if logger.V(logLevel) { - logger.Warningf("transport: http2Server.HandleStreams failed to read frame: %v", err) - } - t.Close() + t.Close(err) return } switch frame := frame.(type) { case *http2.MetaHeadersFrame: - if t.operateHeaders(frame, handle, traceCtx) { - t.Close() + if err := t.operateHeaders(frame, handle, traceCtx); err != nil { + t.Close(err) break } case *http2.DataFrame: @@ -843,8 +839,8 @@ const ( func (t *http2Server) handlePing(f *http2.PingFrame) { if f.IsAck() { - if f.Data == goAwayPing.data && t.drainChan != nil { - close(t.drainChan) + if f.Data == goAwayPing.data && t.drainEvent != nil { + t.drainEvent.Fire() return } // Maybe it's a BDP ping. @@ -886,10 +882,7 @@ func (t *http2Server) handlePing(f *http2.PingFrame) { if t.pingStrikes > maxPingStrikes { // Send goaway and close the connection. - if logger.V(logLevel) { - logger.Errorf("transport: Got too many pings from the client, closing the connection.") - } - t.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte("too_many_pings"), closeConn: true}) + t.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte("too_many_pings"), closeConn: errors.New("got too many pings from the client")}) } } @@ -1153,7 +1146,7 @@ func (t *http2Server) keepalive() { if logger.V(logLevel) { logger.Infof("transport: closing server transport due to maximum connection age.") } - t.Close() + t.controlBuf.put(closeConnection{}) case <-t.done: } return @@ -1169,10 +1162,7 @@ func (t *http2Server) keepalive() { continue } if outstandingPing && kpTimeoutLeft <= 0 { - if logger.V(logLevel) { - logger.Infof("transport: closing server transport due to idleness.") - } - t.Close() + t.Close(fmt.Errorf("keepalive ping not acked within timeout %s", t.kp.Time)) return } if !outstandingPing { @@ -1199,12 +1189,15 @@ func (t *http2Server) keepalive() { // Close starts shutting down the http2Server transport. // TODO(zhaoq): Now the destruction is not blocked on any pending streams. This // could cause some resource issue. Revisit this later. -func (t *http2Server) Close() { +func (t *http2Server) Close(err error) { t.mu.Lock() if t.state == closing { t.mu.Unlock() return } + if logger.V(logLevel) { + logger.Infof("transport: closing: %v", err) + } t.state = closing streams := t.activeStreams t.activeStreams = nil @@ -1295,10 +1288,10 @@ func (t *http2Server) RemoteAddr() net.Addr { func (t *http2Server) Drain() { t.mu.Lock() defer t.mu.Unlock() - if t.drainChan != nil { + if t.drainEvent != nil { return } - t.drainChan = make(chan struct{}) + t.drainEvent = grpcsync.NewEvent() t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte{}, headsUp: true}) } @@ -1319,19 +1312,20 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { // Stop accepting more streams now. t.state = draining sid := t.maxStreamID + retErr := g.closeConn if len(t.activeStreams) == 0 { - g.closeConn = true + retErr = errors.New("second GOAWAY written and no active streams left to process") } t.mu.Unlock() t.maxStreamMu.Unlock() if err := t.framer.fr.WriteGoAway(sid, g.code, g.debugData); err != nil { return false, err } - if g.closeConn { + if retErr != nil { // Abruptly close the connection following the GoAway (via // loopywriter). But flush out what's inside the buffer first. t.framer.writer.Flush() - return false, fmt.Errorf("transport: Connection closing") + return false, retErr } return true, nil } @@ -1353,7 +1347,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { timer := time.NewTimer(time.Minute) defer timer.Stop() select { - case <-t.drainChan: + case <-t.drainEvent.Done(): case <-timer.C: case <-t.done: return diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 6c3ba8515..6cff20c8e 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -43,6 +43,10 @@ import ( "google.golang.org/grpc/tap" ) +// ErrNoHeaders is used as a signal that a trailers only response was received, +// and is not a real error. +var ErrNoHeaders = errors.New("stream has no headers") + const logLevel = 2 type bufferPool struct { @@ -366,9 +370,15 @@ func (s *Stream) Header() (metadata.MD, error) { return s.header.Copy(), nil } s.waitOnHeader() + if !s.headerValid { return nil, s.status.Err() } + + if s.noHeaders { + return nil, ErrNoHeaders + } + return s.header.Copy(), nil } @@ -573,8 +583,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose) } // Options provides additional hints and information for message @@ -691,7 +701,7 @@ type ServerTransport interface { // Close tears down the transport. Once it is called, the transport // should not be accessed any more. All the pending streams and their // handlers will be terminated asynchronously. - Close() + Close(err error) // RemoteAddr returns the remote network address. RemoteAddr() net.Addr diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go index 98d62e067..fb4a88f59 100644 --- a/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -41,10 +41,11 @@ type MD map[string][]string // New creates an MD from a given key-value map. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -62,10 +63,11 @@ func New(m map[string]string) MD { // Pairs panics if len(kv) is odd. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -196,7 +198,7 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { // ValueFromIncomingContext returns the metadata value corresponding to the metadata // key from the incoming metadata if it exists. Key must be lower-case. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 843633c91..a5d5516ee 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" "google.golang.org/grpc/internal/channelz" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/status" ) @@ -129,8 +130,12 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. if err == balancer.ErrNoSubConnAvailable { continue } - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { // Status error: end the RPC unconditionally with this status. + // First restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) + } return nil, nil, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/pickfirst.go index fb7a99e0a..b3a55481b 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/pickfirst.go @@ -102,8 +102,8 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState b.subConn = subConn b.state = connectivity.Idle b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Idle, - Picker: &picker{result: balancer.PickResult{SubConn: b.subConn}}, + ConnectivityState: connectivity.Connecting, + Picker: &picker{err: balancer.ErrNoSubConnAvailable}, }) b.subConn.Connect() return nil diff --git a/vendor/google.golang.org/grpc/preloader.go b/vendor/google.golang.org/grpc/preloader.go index 0a1e975ad..cd4554785 100644 --- a/vendor/google.golang.org/grpc/preloader.go +++ b/vendor/google.golang.org/grpc/preloader.go @@ -25,7 +25,7 @@ import ( // PreparedMsg is responsible for creating a Marshalled and Compressed object. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go index 1f859f764..ee4b04caf 100644 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go +++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go @@ -1,4 +1,4 @@ -// Copyright 2016 gRPC authors. +// Copyright 2016 The gRPC Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - // Service exported by server reflection +// Warning: this entire file is deprecated. Use this instead: +// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.14.0 -// source: reflection/grpc_reflection_v1alpha/reflection.proto +// grpc/reflection/v1alpha/reflection.proto is a deprecated file. package grpc_reflection_v1alpha import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,10 +38,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The message sent by the client when calling ServerReflectionInfo method. type ServerReflectionRequest struct { state protoimpl.MessageState @@ -53,6 +50,7 @@ type ServerReflectionRequest struct { // defined field and then handles them using corresponding methods. // // Types that are assignable to MessageRequest: + // // *ServerReflectionRequest_FileByFilename // *ServerReflectionRequest_FileContainingSymbol // *ServerReflectionRequest_FileContainingExtension @@ -64,7 +62,7 @@ type ServerReflectionRequest struct { func (x *ServerReflectionRequest) Reset() { *x = ServerReflectionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -77,7 +75,7 @@ func (x *ServerReflectionRequest) String() string { func (*ServerReflectionRequest) ProtoMessage() {} func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90,7 +88,7 @@ func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead. func (*ServerReflectionRequest) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0} } func (x *ServerReflectionRequest) GetHost() string { @@ -208,7 +206,7 @@ type ExtensionRequest struct { func (x *ExtensionRequest) Reset() { *x = ExtensionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -221,7 +219,7 @@ func (x *ExtensionRequest) String() string { func (*ExtensionRequest) ProtoMessage() {} func (x *ExtensionRequest) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -234,7 +232,7 @@ func (x *ExtensionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead. func (*ExtensionRequest) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1} } func (x *ExtensionRequest) GetContainingType() string { @@ -259,10 +257,11 @@ type ServerReflectionResponse struct { ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"` OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"` - // The server sets one of the following fields according to the - // message_request in the request. + // The server set one of the following fields according to the message_request + // in the request. // // Types that are assignable to MessageResponse: + // // *ServerReflectionResponse_FileDescriptorResponse // *ServerReflectionResponse_AllExtensionNumbersResponse // *ServerReflectionResponse_ListServicesResponse @@ -273,7 +272,7 @@ type ServerReflectionResponse struct { func (x *ServerReflectionResponse) Reset() { *x = ServerReflectionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +285,7 @@ func (x *ServerReflectionResponse) String() string { func (*ServerReflectionResponse) ProtoMessage() {} func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +298,7 @@ func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead. func (*ServerReflectionResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2} } func (x *ServerReflectionResponse) GetValidHost() string { @@ -357,8 +356,8 @@ type isServerReflectionResponse_MessageResponse interface { type ServerReflectionResponse_FileDescriptorResponse struct { // This message is used to answer file_by_filename, file_containing_symbol, - // file_containing_extension requests with transitive dependencies. - // As the repeated label is not allowed in oneof fields, we use a + // file_containing_extension requests with transitive dependencies. As + // the repeated label is not allowed in oneof fields, we use a // FileDescriptorResponse message to encapsulate the repeated fields. // The reflection service is allowed to avoid sending FileDescriptorProtos // that were previously sent in response to earlier requests in the stream. @@ -366,12 +365,12 @@ type ServerReflectionResponse_FileDescriptorResponse struct { } type ServerReflectionResponse_AllExtensionNumbersResponse struct { - // This message is used to answer all_extension_numbers_of_type requests. + // This message is used to answer all_extension_numbers_of_type requst. AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"` } type ServerReflectionResponse_ListServicesResponse struct { - // This message is used to answer list_services requests. + // This message is used to answer list_services request. ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"` } @@ -407,7 +406,7 @@ type FileDescriptorResponse struct { func (x *FileDescriptorResponse) Reset() { *x = FileDescriptorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -420,7 +419,7 @@ func (x *FileDescriptorResponse) String() string { func (*FileDescriptorResponse) ProtoMessage() {} func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -433,7 +432,7 @@ func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead. func (*FileDescriptorResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3} } func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte { @@ -459,7 +458,7 @@ type ExtensionNumberResponse struct { func (x *ExtensionNumberResponse) Reset() { *x = ExtensionNumberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +471,7 @@ func (x *ExtensionNumberResponse) String() string { func (*ExtensionNumberResponse) ProtoMessage() {} func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,7 +484,7 @@ func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead. func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4} } func (x *ExtensionNumberResponse) GetBaseTypeName() string { @@ -516,7 +515,7 @@ type ListServiceResponse struct { func (x *ListServiceResponse) Reset() { *x = ListServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -529,7 +528,7 @@ func (x *ListServiceResponse) String() string { func (*ListServiceResponse) ProtoMessage() {} func (x *ListServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -542,7 +541,7 @@ func (x *ListServiceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead. func (*ListServiceResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5} } func (x *ListServiceResponse) GetService() []*ServiceResponse { @@ -567,7 +566,7 @@ type ServiceResponse struct { func (x *ServiceResponse) Reset() { *x = ServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -580,7 +579,7 @@ func (x *ServiceResponse) String() string { func (*ServiceResponse) ProtoMessage() {} func (x *ServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -593,7 +592,7 @@ func (x *ServiceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead. func (*ServiceResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6} } func (x *ServiceResponse) GetName() string { @@ -617,7 +616,7 @@ type ErrorResponse struct { func (x *ErrorResponse) Reset() { *x = ErrorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -630,7 +629,7 @@ func (x *ErrorResponse) String() string { func (*ErrorResponse) ProtoMessage() {} func (x *ErrorResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -643,7 +642,7 @@ func (x *ErrorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead. func (*ErrorResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7} } func (x *ErrorResponse) GetErrorCode() int32 { @@ -660,136 +659,139 @@ func (x *ErrorResponse) GetErrorMessage() string { return "" } -var File_reflection_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor - -var file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x22, 0xf8, - 0x02, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, - 0x42, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x66, 0x69, - 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x67, 0x0a, 0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1d, 0x61, - 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x10, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0xc7, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x5b, 0x0a, - 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x18, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, +var File_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor + +var file_grpc_reflection_v1alpha_reflection_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x22, 0xf8, 0x02, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x36, 0x0a, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, + 0x67, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x67, 0x0a, 0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x42, 0x0a, 0x1d, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, + 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xc7, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x16, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x5f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, - 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x6b, 0x0a, 0x18, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, + 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4c, 0x0a, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, + 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x0d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x32, 0x93, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x46, - 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, - 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x93, 0x01, 0x0a, - 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x7f, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x73, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, - 0x30, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, - 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData = file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc + file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once + file_grpc_reflection_v1alpha_reflection_proto_rawDescData = file_grpc_reflection_v1alpha_reflection_proto_rawDesc ) -func file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte { - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() { - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData) +func file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte { + file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() { + file_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_reflection_v1alpha_reflection_proto_rawDescData) }) - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData + return file_grpc_reflection_v1alpha_reflection_proto_rawDescData } -var file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = []interface{}{ +var file_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_grpc_reflection_v1alpha_reflection_proto_goTypes = []interface{}{ (*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1alpha.ServerReflectionRequest (*ExtensionRequest)(nil), // 1: grpc.reflection.v1alpha.ExtensionRequest (*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1alpha.ServerReflectionResponse @@ -799,7 +801,7 @@ var file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = []interfa (*ServiceResponse)(nil), // 6: grpc.reflection.v1alpha.ServiceResponse (*ErrorResponse)(nil), // 7: grpc.reflection.v1alpha.ErrorResponse } -var file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ +var file_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ 1, // 0: grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1alpha.ExtensionRequest 0, // 1: grpc.reflection.v1alpha.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1alpha.ServerReflectionRequest 3, // 2: grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1alpha.FileDescriptorResponse @@ -816,13 +818,13 @@ var file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ 0, // [0:7] is the sub-list for field type_name } -func init() { file_reflection_grpc_reflection_v1alpha_reflection_proto_init() } -func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { - if File_reflection_grpc_reflection_v1alpha_reflection_proto != nil { +func init() { file_grpc_reflection_v1alpha_reflection_proto_init() } +func file_grpc_reflection_v1alpha_reflection_proto_init() { + if File_grpc_reflection_v1alpha_reflection_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerReflectionRequest); i { case 0: return &v.state @@ -834,7 +836,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtensionRequest); i { case 0: return &v.state @@ -846,7 +848,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerReflectionResponse); i { case 0: return &v.state @@ -858,7 +860,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDescriptorResponse); i { case 0: return &v.state @@ -870,7 +872,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtensionNumberResponse); i { case 0: return &v.state @@ -882,7 +884,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListServiceResponse); i { case 0: return &v.state @@ -894,7 +896,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceResponse); i { case 0: return &v.state @@ -906,7 +908,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ErrorResponse); i { case 0: return &v.state @@ -919,14 +921,14 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { } } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ServerReflectionRequest_FileByFilename)(nil), (*ServerReflectionRequest_FileContainingSymbol)(nil), (*ServerReflectionRequest_FileContainingExtension)(nil), (*ServerReflectionRequest_AllExtensionNumbersOfType)(nil), (*ServerReflectionRequest_ListServices)(nil), } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ServerReflectionResponse_FileDescriptorResponse)(nil), (*ServerReflectionResponse_AllExtensionNumbersResponse)(nil), (*ServerReflectionResponse_ListServicesResponse)(nil), @@ -936,18 +938,18 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc, + RawDescriptor: file_grpc_reflection_v1alpha_reflection_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes, - DependencyIndexes: file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs, - MessageInfos: file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes, + GoTypes: file_grpc_reflection_v1alpha_reflection_proto_goTypes, + DependencyIndexes: file_grpc_reflection_v1alpha_reflection_proto_depIdxs, + MessageInfos: file_grpc_reflection_v1alpha_reflection_proto_msgTypes, }.Build() - File_reflection_grpc_reflection_v1alpha_reflection_proto = out.File - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc = nil - file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = nil - file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil + File_grpc_reflection_v1alpha_reflection_proto = out.File + file_grpc_reflection_v1alpha_reflection_proto_rawDesc = nil + file_grpc_reflection_v1alpha_reflection_proto_goTypes = nil + file_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil } diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto deleted file mode 100644 index ee2b82c0a..000000000 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2016 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Service exported by server reflection - -syntax = "proto3"; - -option go_package = "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"; - -package grpc.reflection.v1alpha; - -service ServerReflection { - // The reflection service is structured as a bidirectional stream, ensuring - // all related requests go to a single server. - rpc ServerReflectionInfo(stream ServerReflectionRequest) - returns (stream ServerReflectionResponse); -} - -// The message sent by the client when calling ServerReflectionInfo method. -message ServerReflectionRequest { - string host = 1; - // To use reflection service, the client should set one of the following - // fields in message_request. The server distinguishes requests by their - // defined field and then handles them using corresponding methods. - oneof message_request { - // Find a proto file by the file name. - string file_by_filename = 3; - - // Find the proto file that declares the given fully-qualified symbol name. - // This field should be a fully-qualified symbol name - // (e.g. .[.] or .). - string file_containing_symbol = 4; - - // Find the proto file which defines an extension extending the given - // message type with the given field number. - ExtensionRequest file_containing_extension = 5; - - // Finds the tag numbers used by all known extensions of extendee_type, and - // appends them to ExtensionNumberResponse in an undefined order. - // Its corresponding method is best-effort: it's not guaranteed that the - // reflection service will implement this method, and it's not guaranteed - // that this method will provide all extensions. Returns - // StatusCode::UNIMPLEMENTED if it's not implemented. - // This field should be a fully-qualified type name. The format is - // . - string all_extension_numbers_of_type = 6; - - // List the full names of registered services. The content will not be - // checked. - string list_services = 7; - } -} - -// The type name and extension number sent by the client when requesting -// file_containing_extension. -message ExtensionRequest { - // Fully-qualified type name. The format should be . - string containing_type = 1; - int32 extension_number = 2; -} - -// The message sent by the server to answer ServerReflectionInfo method. -message ServerReflectionResponse { - string valid_host = 1; - ServerReflectionRequest original_request = 2; - // The server sets one of the following fields according to the - // message_request in the request. - oneof message_response { - // This message is used to answer file_by_filename, file_containing_symbol, - // file_containing_extension requests with transitive dependencies. - // As the repeated label is not allowed in oneof fields, we use a - // FileDescriptorResponse message to encapsulate the repeated fields. - // The reflection service is allowed to avoid sending FileDescriptorProtos - // that were previously sent in response to earlier requests in the stream. - FileDescriptorResponse file_descriptor_response = 4; - - // This message is used to answer all_extension_numbers_of_type requests. - ExtensionNumberResponse all_extension_numbers_response = 5; - - // This message is used to answer list_services requests. - ListServiceResponse list_services_response = 6; - - // This message is used when an error occurs. - ErrorResponse error_response = 7; - } -} - -// Serialized FileDescriptorProto messages sent by the server answering -// a file_by_filename, file_containing_symbol, or file_containing_extension -// request. -message FileDescriptorResponse { - // Serialized FileDescriptorProto messages. We avoid taking a dependency on - // descriptor.proto, which uses proto2 only features, by making them opaque - // bytes instead. - repeated bytes file_descriptor_proto = 1; -} - -// A list of extension numbers sent by the server answering -// all_extension_numbers_of_type request. -message ExtensionNumberResponse { - // Full name of the base type, including the package name. The format - // is . - string base_type_name = 1; - repeated int32 extension_number = 2; -} - -// A list of ServiceResponse sent by the server answering list_services request. -message ListServiceResponse { - // The information of each service may be expanded in the future, so we use - // ServiceResponse message to encapsulate it. - repeated ServiceResponse service = 1; -} - -// The information of a single service used by ListServiceResponse to answer -// list_services request. -message ServiceResponse { - // Full name of a registered service, including its package name. The format - // is . - string name = 1; -} - -// The error code and error message sent by the server when an error occurs. -message ErrorResponse { - // This field uses the error codes defined in grpc::StatusCode. - int32 error_code = 1; - string error_message = 2; -} diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go index b8e76a87d..ed54ab137 100644 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go +++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright 2016 gRPC authors. +// Copyright 2016 The gRPC Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - // Service exported by server reflection +// Warning: this entire file is deprecated. Use this instead: +// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.14.0 -// source: reflection/grpc_reflection_v1alpha/reflection.proto +// grpc/reflection/v1alpha/reflection.proto is a deprecated file. package grpc_reflection_v1alpha @@ -151,5 +153,5 @@ var ServerReflection_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "reflection/grpc_reflection_v1alpha/reflection.proto", + Metadata: "grpc/reflection/v1alpha/reflection.proto", } diff --git a/vendor/google.golang.org/grpc/reflection/serverreflection.go b/vendor/google.golang.org/grpc/reflection/serverreflection.go index 81344abd7..e2f9ebfbb 100644 --- a/vendor/google.golang.org/grpc/reflection/serverreflection.go +++ b/vendor/google.golang.org/grpc/reflection/serverreflection.go @@ -23,6 +23,7 @@ The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. To register server reflection on a gRPC server: + import "google.golang.org/grpc/reflection" s := grpc.NewServer() @@ -32,7 +33,6 @@ To register server reflection on a gRPC server: reflection.Register(s) s.Serve(lis) - */ package reflection // import "google.golang.org/grpc/reflection" @@ -42,12 +42,14 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" - rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" + + v1alphagrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" + v1alphapb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" ) // GRPCServer is the interface provided by a gRPC server. It is implemented by @@ -63,7 +65,7 @@ var _ GRPCServer = (*grpc.Server)(nil) // Register registers the server reflection service on the given gRPC server. func Register(s GRPCServer) { svr := NewServer(ServerOptions{Services: s}) - rpb.RegisterServerReflectionServer(s, svr) + v1alphagrpc.RegisterServerReflectionServer(s, svr) } // ServiceInfoProvider is an interface used to retrieve metadata about the @@ -74,7 +76,7 @@ func Register(s GRPCServer) { // for a custom implementation to return zero values for the // grpc.ServiceInfo values in the map. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -85,7 +87,7 @@ type ServiceInfoProvider interface { // ExtensionResolver is the interface used to query details about extensions. // This interface is satisfied by protoregistry.GlobalTypes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -96,7 +98,7 @@ type ExtensionResolver interface { // ServerOptions represents the options used to construct a reflection server. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -120,11 +122,11 @@ type ServerOptions struct { // This can be used to customize behavior of the reflection service. Most usages // should prefer to use Register instead. // -// Experimental +// # Experimental // // Notice: This function is EXPERIMENTAL and may be changed or removed in a // later release. -func NewServer(opts ServerOptions) rpb.ServerReflectionServer { +func NewServer(opts ServerOptions) v1alphagrpc.ServerReflectionServer { if opts.DescriptorResolver == nil { opts.DescriptorResolver = protoregistry.GlobalFiles } @@ -139,7 +141,7 @@ func NewServer(opts ServerOptions) rpb.ServerReflectionServer { } type serverReflectionServer struct { - rpb.UnimplementedServerReflectionServer + v1alphagrpc.UnimplementedServerReflectionServer s ServiceInfoProvider descResolver protodesc.Resolver extResolver ExtensionResolver @@ -213,11 +215,11 @@ func (s *serverReflectionServer) allExtensionNumbersForTypeName(name string) ([] } // listServices returns the names of services this server exposes. -func (s *serverReflectionServer) listServices() []*rpb.ServiceResponse { +func (s *serverReflectionServer) listServices() []*v1alphapb.ServiceResponse { serviceInfo := s.s.GetServiceInfo() - resp := make([]*rpb.ServiceResponse, 0, len(serviceInfo)) + resp := make([]*v1alphapb.ServiceResponse, 0, len(serviceInfo)) for svc := range serviceInfo { - resp = append(resp, &rpb.ServiceResponse{Name: svc}) + resp = append(resp, &v1alphapb.ServiceResponse{Name: svc}) } sort.Slice(resp, func(i, j int) bool { return resp[i].Name < resp[j].Name @@ -226,7 +228,7 @@ func (s *serverReflectionServer) listServices() []*rpb.ServiceResponse { } // ServerReflectionInfo is the reflection service handler. -func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflection_ServerReflectionInfoServer) error { +func (s *serverReflectionServer) ServerReflectionInfo(stream v1alphagrpc.ServerReflection_ServerReflectionInfoServer) error { sentFileDescriptors := make(map[string]bool) for { in, err := stream.Recv() @@ -237,79 +239,79 @@ func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflectio return err } - out := &rpb.ServerReflectionResponse{ + out := &v1alphapb.ServerReflectionResponse{ ValidHost: in.Host, OriginalRequest: in, } switch req := in.MessageRequest.(type) { - case *rpb.ServerReflectionRequest_FileByFilename: + case *v1alphapb.ServerReflectionRequest_FileByFilename: var b [][]byte fd, err := s.descResolver.FindFileByPath(req.FileByFilename) if err == nil { b, err = s.fileDescWithDependencies(fd, sentFileDescriptors) } if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_FileContainingSymbol: + case *v1alphapb.ServerReflectionRequest_FileContainingSymbol: b, err := s.fileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_FileContainingExtension: + case *v1alphapb.ServerReflectionRequest_FileContainingExtension: typeName := req.FileContainingExtension.ContainingType extNum := req.FileContainingExtension.ExtensionNumber b, err := s.fileDescEncodingContainingExtension(typeName, extNum, sentFileDescriptors) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_AllExtensionNumbersOfType: + case *v1alphapb.ServerReflectionRequest_AllExtensionNumbersOfType: extNums, err := s.allExtensionNumbersForTypeName(req.AllExtensionNumbersOfType) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_AllExtensionNumbersResponse{ - AllExtensionNumbersResponse: &rpb.ExtensionNumberResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_AllExtensionNumbersResponse{ + AllExtensionNumbersResponse: &v1alphapb.ExtensionNumberResponse{ BaseTypeName: req.AllExtensionNumbersOfType, ExtensionNumber: extNums, }, } } - case *rpb.ServerReflectionRequest_ListServices: - out.MessageResponse = &rpb.ServerReflectionResponse_ListServicesResponse{ - ListServicesResponse: &rpb.ListServiceResponse{ + case *v1alphapb.ServerReflectionRequest_ListServices: + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ListServicesResponse{ + ListServicesResponse: &v1alphapb.ListServiceResponse{ Service: s.listServices(), }, } diff --git a/vendor/google.golang.org/grpc/regenerate.sh b/vendor/google.golang.org/grpc/regenerate.sh index 99db79faf..a6f26c8ab 100644 --- a/vendor/google.golang.org/grpc/regenerate.sh +++ b/vendor/google.golang.org/grpc/regenerate.sh @@ -57,7 +57,8 @@ LEGACY_SOURCES=( ${WORKDIR}/grpc-proto/grpc/health/v1/health.proto ${WORKDIR}/grpc-proto/grpc/lb/v1/load_balancer.proto profiling/proto/service.proto - reflection/grpc_reflection_v1alpha/reflection.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1alpha/reflection.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1/reflection.proto ) # Generates only the new gRPC Service symbols @@ -119,8 +120,4 @@ mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/ # see grpc_testing_not_regenerate/README.md for details. rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testing_not_regenerate/*.pb.go -# grpc/testing does not have a go_package option. -mv ${WORKDIR}/out/grpc/testing/*.pb.go interop/grpc_testing/ -mv ${WORKDIR}/out/grpc/core/*.pb.go interop/grpc_testing/core/ - cp -R ${WORKDIR}/out/google.golang.org/grpc/* . diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index ca2e35a35..967cbc737 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -96,7 +96,7 @@ const ( // Address represents a server the client connects to. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -236,12 +236,12 @@ type ClientConn interface { // // Examples: // -// - "dns://some_authority/foo.bar" -// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} -// - "foo.bar" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} -// - "unknown_scheme://authority/endpoint" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} +// - "dns://some_authority/foo.bar" +// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} +// - "foo.bar" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} +// - "unknown_scheme://authority/endpoint" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} type Target struct { // Deprecated: use URL.Scheme instead. Scheme string diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 5d407b004..934fc1aa0 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption { // HeaderCallOption is a CallOption for collecting response header metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption { // TrailerCallOption is a CallOption for collecting response trailer metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption { // PeerCallOption is a CallOption for collecting the identity of the remote // peer. The peer field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption { // FailFastCallOption is a CallOption for indicating whether an RPC should fail // fast or not. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -305,7 +305,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption { // MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can receive. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -328,7 +328,7 @@ func MaxCallSendMsgSize(bytes int) CallOption { // MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can send. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -351,7 +351,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption { // PerRPCCredsCallOption is a CallOption that indicates the per-RPC // credentials to use for the call. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -369,7 +369,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} // sending the request. If WithCompressor is also set, UseCompressor has // higher priority. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -379,7 +379,7 @@ func UseCompressor(name string) CallOption { // CompressorCallOption is a CallOption that indicates the compressor to use. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -416,7 +416,7 @@ func CallContentSubtype(contentSubtype string) CallOption { // ContentSubtypeCallOption is a CallOption that indicates the content-subtype // used for marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -444,7 +444,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} // This function is provided for advanced users; prefer to use only // CallContentSubtype to select a registered codec instead. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -455,7 +455,7 @@ func ForceCodec(codec encoding.Codec) CallOption { // ForceCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -480,7 +480,7 @@ func CallCustomCodec(codec Codec) CallOption { // CustomCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -497,7 +497,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -508,7 +508,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption { // MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of // memory to be used for caching this RPC for retry purposes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -548,10 +548,11 @@ type parser struct { // format. The caller owns the returned msg memory. // // If there is an error, possible values are: -// * io.EOF, when no messages remain -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF, when no messages remain +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package +// // No other error values or types must be returned, which also means // that the underlying io.Reader must not return an incompatible // error. diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index f4dde72b4..2808b7c83 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -233,10 +233,11 @@ func newJoinServerOption(opts ...ServerOption) ServerOption { return &joinServerOption{opts: opts} } -// WriteBufferSize determines how much data can be batched before doing a write on the wire. -// The corresponding memory allocation for this buffer will be twice the size to keep syscalls low. -// The default value for this buffer is 32KB. -// Zero will disable the write buffer such that each write will be on underlying connection. +// WriteBufferSize determines how much data can be batched before doing a write +// on the wire. The corresponding memory allocation for this buffer will be +// twice the size to keep syscalls low. The default value for this buffer is +// 32KB. Zero or negative values will disable the write buffer such that each +// write will be on underlying connection. // Note: A Send call may not directly translate to a write. func WriteBufferSize(s int) ServerOption { return newFuncServerOption(func(o *serverOptions) { @@ -244,11 +245,10 @@ func WriteBufferSize(s int) ServerOption { }) } -// ReadBufferSize lets you set the size of read buffer, this determines how much data can be read at most -// for one read syscall. -// The default value for this buffer is 32KB. -// Zero will disable read buffer for a connection so data framer can access the underlying -// conn directly. +// ReadBufferSize lets you set the size of read buffer, this determines how much +// data can be read at most for one read syscall. The default value for this +// buffer is 32KB. Zero or negative values will disable read buffer for a +// connection so data framer can access the underlying conn directly. func ReadBufferSize(s int) ServerOption { return newFuncServerOption(func(o *serverOptions) { o.readBufferSize = s @@ -942,7 +942,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { } func (s *Server) serveStreams(st transport.ServerTransport) { - defer st.Close() + defer st.Close(errors.New("finished serving streams for the server transport")) var wg sync.WaitGroup var roundRobinCounter uint32 @@ -1008,7 +1008,8 @@ var _ http.Handler = (*Server)(nil) func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { st, err := transport.NewServerHandlerTransport(w, r, s.opts.statsHandlers) if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) + // Errors returned from transport.NewServerHandlerTransport have + // already been written to w. return } if !s.addConn(listenerAddressForServeHTTP, st) { @@ -1046,7 +1047,7 @@ func (s *Server) addConn(addr string, st transport.ServerTransport) bool { s.mu.Lock() defer s.mu.Unlock() if s.conns == nil { - st.Close() + st.Close(errors.New("Server.addConn called when server has already been stopped")) return false } if s.drain { @@ -1150,21 +1151,16 @@ func chainUnaryServerInterceptors(s *Server) { func chainUnaryInterceptors(interceptors []UnaryServerInterceptor) UnaryServerInterceptor { return func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (interface{}, error) { - // the struct ensures the variables are allocated together, rather than separately, since we - // know they should be garbage collected together. This saves 1 allocation and decreases - // time/call by about 10% on the microbenchmark. - var state struct { - i int - next UnaryHandler - } - state.next = func(ctx context.Context, req interface{}) (interface{}, error) { - if state.i == len(interceptors)-1 { - return interceptors[state.i](ctx, req, info, handler) - } - state.i++ - return interceptors[state.i-1](ctx, req, info, state.next) - } - return state.next(ctx, req) + return interceptors[0](ctx, req, info, getChainUnaryHandler(interceptors, 0, info, handler)) + } +} + +func getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info *UnaryServerInfo, finalHandler UnaryHandler) UnaryHandler { + if curr == len(interceptors)-1 { + return finalHandler + } + return func(ctx context.Context, req interface{}) (interface{}, error) { + return interceptors[curr+1](ctx, req, info, getChainUnaryHandler(interceptors, curr+1, info, finalHandler)) } } @@ -1470,21 +1466,16 @@ func chainStreamServerInterceptors(s *Server) { func chainStreamInterceptors(interceptors []StreamServerInterceptor) StreamServerInterceptor { return func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error { - // the struct ensures the variables are allocated together, rather than separately, since we - // know they should be garbage collected together. This saves 1 allocation and decreases - // time/call by about 10% on the microbenchmark. - var state struct { - i int - next StreamHandler - } - state.next = func(srv interface{}, ss ServerStream) error { - if state.i == len(interceptors)-1 { - return interceptors[state.i](srv, ss, info, handler) - } - state.i++ - return interceptors[state.i-1](srv, ss, info, state.next) - } - return state.next(srv, ss) + return interceptors[0](srv, ss, info, getChainStreamHandler(interceptors, 0, info, handler)) + } +} + +func getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, info *StreamServerInfo, finalHandler StreamHandler) StreamHandler { + if curr == len(interceptors)-1 { + return finalHandler + } + return func(srv interface{}, stream ServerStream) error { + return interceptors[curr+1](srv, stream, info, getChainStreamHandler(interceptors, curr+1, info, finalHandler)) } } @@ -1819,7 +1810,7 @@ func (s *Server) Stop() { } for _, cs := range conns { for st := range cs { - st.Close() + st.Close(errors.New("Server.Stop called")) } } if s.opts.numServerWorkers > 0 { diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 73a2f9266..35e7a20a0 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -19,7 +19,7 @@ // Package serviceconfig defines types and methods for operating on gRPC // service configs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go index 6d163b6e3..623be39f2 100644 --- a/vendor/google.golang.org/grpc/status/status.go +++ b/vendor/google.golang.org/grpc/status/status.go @@ -76,14 +76,14 @@ func FromProto(s *spb.Status) *Status { // FromError returns a Status representation of err. // -// - If err was produced by this package or implements the method `GRPCStatus() -// *Status`, the appropriate Status is returned. +// - If err was produced by this package or implements the method `GRPCStatus() +// *Status`, the appropriate Status is returned. // -// - If err is nil, a Status is returned with codes.OK and no message. +// - If err is nil, a Status is returned with codes.OK and no message. // -// - Otherwise, err is an error not compatible with this package. In this -// case, a Status is returned with codes.Unknown and err's Error() message, -// and ok is false. +// - Otherwise, err is an error not compatible with this package. In this +// case, a Status is returned with codes.Unknown and err's Error() message, +// and ok is false. func FromError(err error) (s *Status, ok bool) { if err == nil { return nil, true diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 0c16cfb2e..0f8e6c014 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -39,6 +39,7 @@ import ( imetadata "google.golang.org/grpc/internal/metadata" iresolver "google.golang.org/grpc/internal/resolver" "google.golang.org/grpc/internal/serviceconfig" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -195,6 +196,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method} rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo) if err != nil { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err) + } + return nil, err + } return nil, toRPCErr(err) } @@ -408,7 +416,7 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) ctx = trace.NewContext(ctx, trInfo.tr) } - if cs.cc.parsedTarget.Scheme == "xds" { + if cs.cc.parsedTarget.URL.Scheme == "xds" { // Add extra metadata (metadata that will be added by transport) to context // so the balancer can see them. ctx = grpcutil.WithExtraMetadata(ctx, metadata.Pairs( @@ -744,17 +752,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) func (cs *clientStream) Header() (metadata.MD, error) { var m metadata.MD + noHeader := false err := cs.withRetry(func(a *csAttempt) error { var err error m, err = a.s.Header() + if err == transport.ErrNoHeaders { + noHeader = true + return nil + } return toRPCErr(err) }, cs.commitAttemptLocked) + if err != nil { cs.finish(err) return nil, err } - if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged { - // Only log if binary log is on and header has not been logged. + + if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader { + // Only log if binary log is on and header has not been logged, and + // there is actually headers to log. logEntry := &binarylog.ServerHeader{ OnClientSide: true, Header: m, diff --git a/vendor/google.golang.org/grpc/tap/tap.go b/vendor/google.golang.org/grpc/tap/tap.go index dbf34e6bb..bfa5dfa40 100644 --- a/vendor/google.golang.org/grpc/tap/tap.go +++ b/vendor/google.golang.org/grpc/tap/tap.go @@ -19,7 +19,7 @@ // Package tap defines the function handles which are executed on the transport // layer of gRPC-Go and related information. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index d472ca643..243e06e8d 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.50.1" +const Version = "1.52.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index c3fc8253b..1d03c0914 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -67,7 +67,9 @@ elif [[ "$#" -ne 0 ]]; then fi # - Ensure all source files contain a copyright message. -not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go' +# (Done in two parts because Darwin "git grep" has broken support for compound +# exclusion matches.) +(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. not grep 'func Test[^(]' *_test.go @@ -81,7 +83,7 @@ not git grep -l 'x/net/context' -- "*.go" git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' # - Do not call grpclog directly. Use grpclog.Component instead. -git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' +git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' # - Ensure all ptypes proto packages are renamed when importing. not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" @@ -119,8 +121,9 @@ done # # TODO(dfawley): don't use deprecated functions in examples or first-party # plugins. +# TODO(dfawley): enable ST1019 (duplicate imports) but allow for protobufs. SC_OUT="$(mktemp)" -staticcheck -go 1.9 -checks 'inherit,-ST1015' ./... > "${SC_OUT}" || true +staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... > "${SC_OUT}" || true # Error if anything other than deprecation warnings are printed. not grep -v "is deprecated:.*SA1019" "${SC_OUT}" # Only ignore the following deprecated types/fields/functions. diff --git a/vendor/modules.txt b/vendor/modules.txt index 03dcef517..7a753d7a7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -31,6 +31,13 @@ github.com/davecgh/go-spew/spew # github.com/fatih/color v1.13.0 ## explicit; go 1.13 github.com/fatih/color +# github.com/go-logr/logr v1.2.3 +## explicit; go 1.16 +github.com/go-logr/logr +github.com/go-logr/logr/funcr +# github.com/go-logr/stdr v1.2.2 +## explicit; go 1.16 +github.com/go-logr/stdr # github.com/go-openapi/analysis v0.21.4 ## explicit; go 1.13 github.com/go-openapi/analysis @@ -43,18 +50,18 @@ github.com/go-openapi/analysis/internal/flatten/sortref # github.com/go-openapi/errors v0.20.3 ## explicit; go 1.14 github.com/go-openapi/errors -# github.com/go-openapi/jsonpointer v0.19.5 +# github.com/go-openapi/jsonpointer v0.19.6 ## explicit; go 1.13 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.20.0 +# github.com/go-openapi/jsonreference v0.20.1 ## explicit; go 1.13 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal # github.com/go-openapi/loads v0.21.2 ## explicit; go 1.13 github.com/go-openapi/loads -# github.com/go-openapi/runtime v0.24.2 -## explicit; go 1.15 +# github.com/go-openapi/runtime v0.25.0 +## explicit; go 1.18 github.com/go-openapi/runtime github.com/go-openapi/runtime/client github.com/go-openapi/runtime/logger @@ -112,13 +119,13 @@ github.com/hashicorp/go-cty/cty/gocty github.com/hashicorp/go-cty/cty/json github.com/hashicorp/go-cty/cty/msgpack github.com/hashicorp/go-cty/cty/set -# github.com/hashicorp/go-hclog v1.3.1 +# github.com/hashicorp/go-hclog v1.4.0 ## explicit; go 1.13 github.com/hashicorp/go-hclog # github.com/hashicorp/go-multierror v1.1.1 ## explicit; go 1.13 github.com/hashicorp/go-multierror -# github.com/hashicorp/go-plugin v1.4.6 +# github.com/hashicorp/go-plugin v1.4.8 ## explicit; go 1.17 github.com/hashicorp/go-plugin github.com/hashicorp/go-plugin/internal/plugin @@ -167,7 +174,7 @@ github.com/hashicorp/terraform-plugin-docs/internal/mdplain github.com/hashicorp/terraform-plugin-docs/internal/provider github.com/hashicorp/terraform-plugin-docs/internal/tmplfuncs github.com/hashicorp/terraform-plugin-docs/schemamd -# github.com/hashicorp/terraform-plugin-go v0.14.1 +# github.com/hashicorp/terraform-plugin-go v0.14.3 ## explicit; go 1.18 github.com/hashicorp/terraform-plugin-go/internal/logging github.com/hashicorp/terraform-plugin-go/tfprotov5 @@ -239,7 +246,7 @@ github.com/mailru/easyjson/jwriter # github.com/mattn/go-colorable v0.1.13 ## explicit; go 1.15 github.com/mattn/go-colorable -# github.com/mattn/go-isatty v0.0.16 +# github.com/mattn/go-isatty v0.0.17 ## explicit; go 1.15 github.com/mattn/go-isatty # github.com/mitchellh/cli v1.1.5 @@ -282,7 +289,7 @@ github.com/russross/blackfriday # github.com/shopspring/decimal v1.3.1 ## explicit; go 1.13 github.com/shopspring/decimal -# github.com/smutel/go-netbox/v3 v3.2.3 +# github.com/smutel/go-netbox/v3 v3.3.0 ## explicit; go 1.16 github.com/smutel/go-netbox/v3/netbox/client github.com/smutel/go-netbox/v3/netbox/client/circuits @@ -320,7 +327,7 @@ github.com/zclconf/go-cty/cty/function/stdlib github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/json github.com/zclconf/go-cty/cty/set -# go.mongodb.org/mongo-driver v1.11.0 +# go.mongodb.org/mongo-driver v1.11.1 ## explicit; go 1.13 go.mongodb.org/mongo-driver/bson go.mongodb.org/mongo-driver/bson/bsoncodec @@ -329,7 +336,23 @@ go.mongodb.org/mongo-driver/bson/bsonrw go.mongodb.org/mongo-driver/bson/bsontype go.mongodb.org/mongo-driver/bson/primitive go.mongodb.org/mongo-driver/x/bsonx/bsoncore -# golang.org/x/crypto v0.2.0 +# go.opentelemetry.io/otel v1.11.2 +## explicit; go 1.18 +go.opentelemetry.io/otel +go.opentelemetry.io/otel/attribute +go.opentelemetry.io/otel/baggage +go.opentelemetry.io/otel/codes +go.opentelemetry.io/otel/internal +go.opentelemetry.io/otel/internal/attribute +go.opentelemetry.io/otel/internal/baggage +go.opentelemetry.io/otel/internal/global +go.opentelemetry.io/otel/propagation +go.opentelemetry.io/otel/semconv/internal +go.opentelemetry.io/otel/semconv/v1.12.0 +# go.opentelemetry.io/otel/trace v1.11.2 +## explicit; go 1.18 +go.opentelemetry.io/otel/trace +# golang.org/x/crypto v0.5.0 ## explicit; go 1.17 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish @@ -350,7 +373,7 @@ golang.org/x/crypto/pbkdf2 golang.org/x/crypto/scrypt golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf -# golang.org/x/net v0.2.0 +# golang.org/x/net v0.5.0 ## explicit; go 1.17 golang.org/x/net/context golang.org/x/net/http/httpguts @@ -359,11 +382,11 @@ golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/timeseries golang.org/x/net/trace -# golang.org/x/sys v0.2.0 +# golang.org/x/sys v0.4.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/unix -# golang.org/x/text v0.4.0 +# golang.org/x/text v0.6.0 ## explicit; go 1.17 golang.org/x/text/cases golang.org/x/text/internal @@ -388,17 +411,17 @@ google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/log google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api -# google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 +# google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.50.1 +# google.golang.org/grpc v1.52.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes google.golang.org/grpc/backoff google.golang.org/grpc/balancer google.golang.org/grpc/balancer/base -google.golang.org/grpc/balancer/grpclb/state +google.golang.org/grpc/balancer/grpclb/grpclbstate google.golang.org/grpc/balancer/roundrobin google.golang.org/grpc/binarylog/grpc_binarylog_v1 google.golang.org/grpc/channelz