diff --git a/.gitignore b/.gitignore index 3d9ffa9..daf913b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,24 @@ -.idea -node_modules -openapitools.json -package-lock.json -runzero-api -pdfgen/html +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/go.mod b/go.mod index c1321bd..900c63c 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,16 @@ module github.com/runZeroInc/runzero-api -go 1.18 +go 1.25.0 require ( - github.com/gofrs/uuid v3.3.0+incompatible - golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 + github.com/stretchr/testify v1.11.1 + golang.org/x/oauth2 v0.36.0 + gopkg.in/validator.v2 v2.0.1 ) require ( - github.com/golang/protobuf v1.5.0 // indirect - golang.org/x/net v0.23.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.33.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 144c6ac..5b870d7 100644 --- a/go.sum +++ b/go.sum @@ -1,370 +1,21 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 h1:Lm4OryKCca1vehdsWogr9N4t7NfZxLbJoc/H0w4K4S4= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/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-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/validator.v2 v2.0.1 h1:xF0KWyGWXm/LM2G1TrEjqOu4pa6coO9AlWSf3msVfDY= +gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPuG8= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go/.openapi-generator/FILES b/go/.openapi-generator/FILES new file mode 100644 index 0000000..c5a37ad --- /dev/null +++ b/go/.openapi-generator/FILES @@ -0,0 +1,252 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_account.go +api_cisco_sntc.go +api_export.go +api_import.go +api_organization.go +api_public.go +api_service_now.go +api_splunk.go +client.go +configuration.go +docs/APIClientCredentials.md +docs/APIKeyOptions.md +docs/AWSCredentialFields.md +docs/AccessToken.md +docs/AccountAPI.md +docs/Agent.md +docs/AgentPatchedSettings.md +docs/AgentPatchedSettingsSettings.md +docs/Asset.md +docs/AssetComments.md +docs/AssetCriticality.md +docs/AssetCriticalityWithSearch.md +docs/AssetExportResponse.md +docs/AssetIDs.md +docs/AssetMetric.md +docs/AssetOwnership.md +docs/AssetOwnershipType.md +docs/AssetOwnershipTypePost.md +docs/AssetOwnerships.md +docs/AssetOwnershipsWithSearch.md +docs/AssetOwnershipsWithSearchOwnershipsInner.md +docs/AssetPage.md +docs/AssetServiceNow.md +docs/AssetTags.md +docs/AssetTagsWithSearch.md +docs/AssetsWithCheckpoint.md +docs/AzureClientSecretCredentialFields.md +docs/AzureUsernamePasswordCredentialFields.md +docs/BaseCustomIntegration.md +docs/BaseResponse.md +docs/BulkAssetUpdateResult.md +docs/CensysCredentialFields.md +docs/Certificate.md +docs/CiscoSNTCAPI.md +docs/ComponentVersion.md +docs/Credential.md +docs/CredentialFields.md +docs/CredentialOptions.md +docs/CrowdstrikeCredentialFields.md +docs/CustomAttributesValue.md +docs/CustomIntegration.md +docs/CustomIntegrationCreate.md +docs/CustomIntegrationScriptCredentialFields.md +docs/DirectoryGroup.md +docs/DirectoryUser.md +docs/Event.md +docs/EventExportResponse.md +docs/EventPage.md +docs/ExportAPI.md +docs/ExportToken.md +docs/ExportTokenOptions.md +docs/Finding.md +docs/FindingLink.md +docs/FindingLinks.md +docs/GCPCredentialFields.md +docs/GoogleWorkspaceCredentialFields.md +docs/Group.md +docs/GroupMapping.md +docs/GroupPost.md +docs/GroupPut.md +docs/HealthCheckResponse.md +docs/HostedZone.md +docs/ImportAPI.md +docs/ImportAsset.md +docs/ImportTask.md +docs/InsightVMCredentialFields.md +docs/LDAPCredentialFields.md +docs/License.md +docs/MECMCredentialFields.md +docs/MiradoreCredentialFields.md +docs/MirakiCredentialFields.md +docs/NessusCredentialFields.md +docs/NetboxCredentialFields.md +docs/NetworkInterface.md +docs/OrgOptions.md +docs/Organization.md +docs/OrganizationAPI.md +docs/OrganizationAPIKey.md +docs/PaloAltoFirewallCredentialFields.md +docs/Problem.md +docs/PublicAPI.md +docs/QualysCredentialFields.md +docs/SNMPv2CommunitiesCredentialFields.md +docs/SNMPv3CredentialFields.md +docs/SampleOptions.md +docs/ScanOptions.md +docs/ScanTemplate.md +docs/ScanTemplateOptions.md +docs/SearchQuery.md +docs/SentinelOneCredentialFields.md +docs/Service.md +docs/ServiceExportResponse.md +docs/ServiceNowAPI.md +docs/ServicePage.md +docs/ShodanCredentialFields.md +docs/Site.md +docs/SiteOptions.md +docs/Software.md +docs/SoftwareExportResponse.md +docs/SoftwarePage.md +docs/SplunkAPI.md +docs/TaniumCredentialFields.md +docs/Task.md +docs/TaskBase.md +docs/TaskOptions.md +docs/TenableIoCredentialFields.md +docs/TenableScCredentialFields.md +docs/URL.md +docs/User.md +docs/UserInviteOptions.md +docs/UserOptions.md +docs/VMwareCredentialFields.md +docs/Vulnerability.md +docs/VulnerabilityExportResponse.md +docs/VulnerabilityPage.md +docs/Wireless.md +docs/WirelessExportResponse.md +docs/WirelessPage.md +docs/WizCredentialFields.md +docs/X509CredentialFields.md +git_push.sh +go.mod +go.sum +model_access_token.go +model_agent.go +model_agent_patched_settings.go +model_agent_patched_settings_settings.go +model_api_client_credentials.go +model_api_key_options.go +model_asset.go +model_asset_comments.go +model_asset_criticality.go +model_asset_criticality_with_search.go +model_asset_export_response.go +model_asset_ids.go +model_asset_metric.go +model_asset_ownership.go +model_asset_ownership_type.go +model_asset_ownership_type_post.go +model_asset_ownerships.go +model_asset_ownerships_with_search.go +model_asset_ownerships_with_search_ownerships_inner.go +model_asset_page.go +model_asset_service_now.go +model_asset_tags.go +model_asset_tags_with_search.go +model_assets_with_checkpoint.go +model_aws_credential_fields.go +model_azure_client_secret_credential_fields.go +model_azure_username_password_credential_fields.go +model_base_custom_integration.go +model_base_response.go +model_bulk_asset_update_result.go +model_censys_credential_fields.go +model_certificate.go +model_component_version.go +model_credential.go +model_credential_fields.go +model_credential_options.go +model_crowdstrike_credential_fields.go +model_custom_attributes_value.go +model_custom_integration.go +model_custom_integration_create.go +model_custom_integration_script_credential_fields.go +model_directory_group.go +model_directory_user.go +model_event.go +model_event_export_response.go +model_event_page.go +model_export_token.go +model_export_token_options.go +model_finding.go +model_finding_link.go +model_finding_links.go +model_gcp_credential_fields.go +model_google_workspace_credential_fields.go +model_group.go +model_group_mapping.go +model_group_post.go +model_group_put.go +model_health_check_response.go +model_hosted_zone.go +model_import_asset.go +model_import_task.go +model_insight_vm_credential_fields.go +model_ldap_credential_fields.go +model_license.go +model_mecm_credential_fields.go +model_miradore_credential_fields.go +model_miraki_credential_fields.go +model_nessus_credential_fields.go +model_netbox_credential_fields.go +model_network_interface.go +model_org_options.go +model_organization.go +model_organization_api_key.go +model_palo_alto_firewall_credential_fields.go +model_problem.go +model_qualys_credential_fields.go +model_sample_options.go +model_scan_options.go +model_scan_template.go +model_scan_template_options.go +model_search_query.go +model_sentinel_one_credential_fields.go +model_service.go +model_service_export_response.go +model_service_page.go +model_shodan_credential_fields.go +model_site.go +model_site_options.go +model_snmpv2_communities_credential_fields.go +model_snmpv3_credential_fields.go +model_software.go +model_software_export_response.go +model_software_page.go +model_tanium_credential_fields.go +model_task.go +model_task_base.go +model_task_options.go +model_tenable_io_credential_fields.go +model_tenable_sc_credential_fields.go +model_url.go +model_user.go +model_user_invite_options.go +model_user_options.go +model_v_mware_credential_fields.go +model_vulnerability.go +model_vulnerability_export_response.go +model_vulnerability_page.go +model_wireless.go +model_wireless_export_response.go +model_wireless_page.go +model_wiz_credential_fields.go +model_x509_credential_fields.go +response.go +utils.go diff --git a/go/.openapi-generator/VERSION b/go/.openapi-generator/VERSION index ecedc98..696eaac 100644 --- a/go/.openapi-generator/VERSION +++ b/go/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.1 \ No newline at end of file +7.22.0 diff --git a/go/README.md b/go/README.md index 19ba96b..c0b1e84 100644 --- a/go/README.md +++ b/go/README.md @@ -1,30 +1,27 @@ # Go API client for openapi -runZero API - deprecated +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. ## Overview -This API client was generated by an experimental version of the [OpenAPI Generator](https://openapi-generator.tech) project using an older version of the YAML spec file. It is deprecated, and you are strongly recommended not to use it. +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -By using a current version of the [OpenAPI-spec](https://www.openapis.org/) `runzero-api.yml` YAML file (found in the root of this repository) with an up-to-date OpenAPI generator, you can easily generate an API client. - -- API version: 1.0.4 +- API version: 4.0.250826.0 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen +- Generator version: 7.22.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation -Install the following dependencies: +Import the package in a go file in your project and run `go mod tidy`: -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context +```go +import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" ``` -Put the package under your project folder and add the following in import: +To use a proxy, set the environment variable `HTTP_PROXY`: -```golang -import sw "./openapi" +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` ## Configuration of Server URL @@ -33,18 +30,18 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `openapi.ContextServerIndex` of type `int`. -```golang -ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +```go +ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `openapi.ContextServerVariables` of type `map[string]string`. -```golang -ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ +```go +ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -54,14 +51,14 @@ Note, enum values are always validated and all unused variables are silently ign ### URLs Configuration per Operation Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identifield by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `openapi.ContextOperationServerIndices` and `openapi.ContextOperationServerVariables` context maps. -``` -ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ +```go +ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -74,86 +71,347 @@ All URIs are relative to *https://console.runzero.com/api/v1.0* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ExportApi* | [**ExportAssetSyncCreatedJSON**](docs/ExportApi.md#exportassetsynccreatedjson) | **Get** /export/org/assets/sync/created/assets.json | Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. -*ExportApi* | [**ExportAssetSyncUpdatedJSON**](docs/ExportApi.md#exportassetsyncupdatedjson) | **Get** /export/org/assets/sync/updated/assets.json | Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. -*ExportApi* | [**ExportAssetsCSV**](docs/ExportApi.md#exportassetscsv) | **Get** /export/org/assets.csv | Asset inventory as CSV. -*ExportApi* | [**ExportAssetsJSON**](docs/ExportApi.md#exportassetsjson) | **Get** /export/org/assets.json | Exports the asset inventory. -*ExportApi* | [**ExportAssetsJSONL**](docs/ExportApi.md#exportassetsjsonl) | **Get** /export/org/assets.jsonl | Asset inventory as JSON line-delimited. -*ExportApi* | [**ExportAssetsNmapXML**](docs/ExportApi.md#exportassetsnmapxml) | **Get** /export/org/assets.nmap.xml | Asset inventory as Nmap-style XML. -*ExportApi* | [**ExportServicesCSV**](docs/ExportApi.md#exportservicescsv) | **Get** /export/org/services.csv | Service inventory as CSV. -*ExportApi* | [**ExportServicesJSON**](docs/ExportApi.md#exportservicesjson) | **Get** /export/org/services.json | Service inventory as JSON. -*ExportApi* | [**ExportServicesJSONL**](docs/ExportApi.md#exportservicesjsonl) | **Get** /export/org/services.jsonl | Service inventory as JSON line-delimited. -*ExportApi* | [**ExportSitesCSV**](docs/ExportApi.md#exportsitescsv) | **Get** /export/org/sites.csv | Site list as CSV. -*ExportApi* | [**ExportSitesJSON**](docs/ExportApi.md#exportsitesjson) | **Get** /export/org/sites.json | Export all sites. -*ExportApi* | [**ExportSitesJSONL**](docs/ExportApi.md#exportsitesjsonl) | **Get** /export/org/sites.jsonl | Site list as JSON line-delimited. -*ExportApi* | [**ExportWirelessCSV**](docs/ExportApi.md#exportwirelesscsv) | **Get** /export/org/wireless.csv | Wireless inventory as CSV. -*ExportApi* | [**ExportWirelessJSON**](docs/ExportApi.md#exportwirelessjson) | **Get** /export/org/wireless.json | Wireless inventory as JSON. -*ExportApi* | [**ExportWirelessJSONL**](docs/ExportApi.md#exportwirelessjsonl) | **Get** /export/org/wireless.jsonl | Wireless inventory as JSON line-delimited. -*OrganizationApi* | [**CreateScan**](docs/OrganizationApi.md#createscan) | **Put** /org/sites/{site_id}/scan | Create a scan task for a given site. -*OrganizationApi* | [**CreateSite**](docs/OrganizationApi.md#createsite) | **Put** /org/sites | Create a new site. -*OrganizationApi* | [**GetAgent**](docs/OrganizationApi.md#getagent) | **Get** /org/agents/{agent_id} | Get details for a single agent. -*OrganizationApi* | [**GetAgents**](docs/OrganizationApi.md#getagents) | **Get** /org/agents | Get all agents. -*OrganizationApi* | [**GetAsset**](docs/OrganizationApi.md#getasset) | **Get** /org/assets/{asset_id} | Get asset details. -*OrganizationApi* | [**GetAssets**](docs/OrganizationApi.md#getassets) | **Get** /org/assets | Get all assets. -*OrganizationApi* | [**GetKey**](docs/OrganizationApi.md#getkey) | **Get** /org/key | Get API key details. -*OrganizationApi* | [**GetOrganization**](docs/OrganizationApi.md#getorganization) | **Get** /org | Get organization details. -*OrganizationApi* | [**GetService**](docs/OrganizationApi.md#getservice) | **Get** /org/services/{service_id} | Get service details. -*OrganizationApi* | [**GetServices**](docs/OrganizationApi.md#getservices) | **Get** /org/services | Get all services. -*OrganizationApi* | [**GetSite**](docs/OrganizationApi.md#getsite) | **Get** /org/sites/{site_id} | Get site details. -*OrganizationApi* | [**GetSites**](docs/OrganizationApi.md#getsites) | **Get** /org/sites | Get all sites. -*OrganizationApi* | [**GetTask**](docs/OrganizationApi.md#gettask) | **Get** /org/tasks/{task_id} | Get task details. -*OrganizationApi* | [**GetTaskChangeReport**](docs/OrganizationApi.md#gettaskchangereport) | **Get** /org/tasks/{task_id}/changes | Returns a temporary task change report data url. -*OrganizationApi* | [**GetTaskScanData**](docs/OrganizationApi.md#gettaskscandata) | **Get** /org/tasks/{task_id}/data | Returns a temporary task scan data url. -*OrganizationApi* | [**GetTasks**](docs/OrganizationApi.md#gettasks) | **Get** /org/tasks | Get all tasks (last 1000). -*OrganizationApi* | [**GetWirelessLAN**](docs/OrganizationApi.md#getwirelesslan) | **Get** /org/wirelesss/{wireless_id} | Get wireless LAN details. -*OrganizationApi* | [**GetWirelessLANs**](docs/OrganizationApi.md#getwirelesslans) | **Get** /org/wireless | Get all wireless LANs. -*OrganizationApi* | [**HideTask**](docs/OrganizationApi.md#hidetask) | **Post** /org/tasks/{task_id}/hide | Signal that a completed task should be hidden. -*OrganizationApi* | [**ImportScanData**](docs/OrganizationApi.md#importscandata) | **Put** /org/sites/{site_id}/import | Import a scan data file into a site. -*OrganizationApi* | [**RemoveAgent**](docs/OrganizationApi.md#removeagent) | **Delete** /org/agents/{agent_id} | Remove and uninstall an agent. -*OrganizationApi* | [**RemoveAsset**](docs/OrganizationApi.md#removeasset) | **Delete** /org/assets/{asset_id} | Remove an asset. -*OrganizationApi* | [**RemoveService**](docs/OrganizationApi.md#removeservice) | **Delete** /org/services/{service_id} | Remove a service. -*OrganizationApi* | [**RemoveSite**](docs/OrganizationApi.md#removesite) | **Delete** /org/sites/{site_id} | Remove a site and associated assets. -*OrganizationApi* | [**RemoveWirelessLAN**](docs/OrganizationApi.md#removewirelesslan) | **Delete** /org/wirelesss/{wireless_id} | Remove a wireless LAN. -*OrganizationApi* | [**StopTask**](docs/OrganizationApi.md#stoptask) | **Post** /org/tasks/{task_id}/stop | Signal that a task should be stopped or canceled. -*OrganizationApi* | [**UpdateAgentSite**](docs/OrganizationApi.md#updateagentsite) | **Patch** /org/agents/{agent_id} | Update the site associated with agent. -*OrganizationApi* | [**UpdateAssetComments**](docs/OrganizationApi.md#updateassetcomments) | **Patch** /org/assets/{asset_id}/comments | Update asset comments. -*OrganizationApi* | [**UpdateAssetTags**](docs/OrganizationApi.md#updateassettags) | **Patch** /org/assets/{asset_id}/tags | Update asset tags. -*OrganizationApi* | [**UpdateOrganization**](docs/OrganizationApi.md#updateorganization) | **Patch** /org | Update organization details. -*OrganizationApi* | [**UpdateSite**](docs/OrganizationApi.md#updatesite) | **Patch** /org/sites/{site_id} | Update a site definition. -*OrganizationApi* | [**UpdateTask**](docs/OrganizationApi.md#updatetask) | **Patch** /org/tasks/{task_id} | Update task parameters. -*OrganizationApi* | [**UpgradeAgent**](docs/OrganizationApi.md#upgradeagent) | **Post** /org/agents/{agent_id}/update | Force an agent to update and restart. -*PublicApi* | [**GetLatestAgentVersion**](docs/PublicApi.md#getlatestagentversion) | **Get** /releases/agent/version | Returns latest agent version. -*PublicApi* | [**GetLatestPlatformVersion**](docs/PublicApi.md#getlatestplatformversion) | **Get** /releases/platform/version | Returns latest platform version. -*PublicApi* | [**GetLatestScannerVersion**](docs/PublicApi.md#getlatestscannerversion) | **Get** /releases/scanner/version | Returns latest scanner version. +*AccountAPI* | [**CreateAccountAssetOwnershipTypes**](docs/AccountAPI.md#createaccountassetownershiptypes) | **Post** /account/assets/ownership-types | Create new asset ownership types +*AccountAPI* | [**CreateAccountCredential**](docs/AccountAPI.md#createaccountcredential) | **Put** /account/credentials | Create a new credential +*AccountAPI* | [**CreateAccountCustomIntegration**](docs/AccountAPI.md#createaccountcustomintegration) | **Post** /account/custom-integrations | Create a new custom integration +*AccountAPI* | [**CreateAccountCustomIntegrationAndID**](docs/AccountAPI.md#createaccountcustomintegrationandid) | **Put** /account/custom-integrations/{customIntegrationId} | Replace custom integration at provided ID +*AccountAPI* | [**CreateAccountGroup**](docs/AccountAPI.md#createaccountgroup) | **Post** /account/groups | Create a new group +*AccountAPI* | [**CreateAccountGroupMapping**](docs/AccountAPI.md#createaccountgroupmapping) | **Post** /account/sso/groups | Create a new SSO group mapping +*AccountAPI* | [**CreateAccountKey**](docs/AccountAPI.md#createaccountkey) | **Put** /account/keys | Create a new key +*AccountAPI* | [**CreateAccountOrganization**](docs/AccountAPI.md#createaccountorganization) | **Put** /account/orgs | Create a new organization +*AccountAPI* | [**CreateAccountOrganizationExportToken**](docs/AccountAPI.md#createaccountorganizationexporttoken) | **Post** /account/orgs/{org_id}/exportTokens | Create a new export token for an organization +*AccountAPI* | [**CreateAccountScanTemplate**](docs/AccountAPI.md#createaccountscantemplate) | **Post** /account/tasks/templates | Create a new scan template +*AccountAPI* | [**CreateAccountUser**](docs/AccountAPI.md#createaccountuser) | **Put** /account/users | Create a new user account +*AccountAPI* | [**CreateAccountUserInvite**](docs/AccountAPI.md#createaccountuserinvite) | **Put** /account/users/invite | Create a new user account and send an email invite +*AccountAPI* | [**DeleteAccountAssetOwnershipType**](docs/AccountAPI.md#deleteaccountassetownershiptype) | **Delete** /account/assets/ownership-types/{ownership_type_id} | Delete a single asset ownership type +*AccountAPI* | [**DeleteAccountAssetOwnershipTypes**](docs/AccountAPI.md#deleteaccountassetownershiptypes) | **Delete** /account/assets/ownership-types | Delete asset ownership types +*AccountAPI* | [**DeleteAccountCustomIntegration**](docs/AccountAPI.md#deleteaccountcustomintegration) | **Delete** /account/custom-integrations/{customIntegrationId} | Delete an custom integration +*AccountAPI* | [**DeleteAccountOrganizationExportToken**](docs/AccountAPI.md#deleteaccountorganizationexporttoken) | **Delete** /account/orgs/{org_id}/exportTokens/{key_id} | Removes the export token from the specified organization +*AccountAPI* | [**DeleteAccountOrganizationExportTokenDeprecated**](docs/AccountAPI.md#deleteaccountorganizationexporttokendeprecated) | **Delete** /account/orgs/{org_id}/exportToken | Removes the export token from the specified organization +*AccountAPI* | [**ExportEventsJSON**](docs/AccountAPI.md#exporteventsjson) | **Get** /account/events.json | System event log as JSON +*AccountAPI* | [**ExportEventsJSONL**](docs/AccountAPI.md#exporteventsjsonl) | **Get** /account/events.jsonl | System event log as JSON line-delimited +*AccountAPI* | [**GetAPIToken**](docs/AccountAPI.md#getapitoken) | **Post** /account/api/token | Generate an access token using an API client +*AccountAPI* | [**GetAccountAgents**](docs/AccountAPI.md#getaccountagents) | **Get** /account/agents | Get all agents across all organizations +*AccountAPI* | [**GetAccountAssetOwnershipTypes**](docs/AccountAPI.md#getaccountassetownershiptypes) | **Get** /account/assets/ownership-types | Get all asset ownership types +*AccountAPI* | [**GetAccountCredential**](docs/AccountAPI.md#getaccountcredential) | **Get** /account/credentials/{credential_id} | Get credential details +*AccountAPI* | [**GetAccountCredentials**](docs/AccountAPI.md#getaccountcredentials) | **Get** /account/credentials | Get all account credentials +*AccountAPI* | [**GetAccountCustomIntegration**](docs/AccountAPI.md#getaccountcustomintegration) | **Get** /account/custom-integrations/{customIntegrationId} | Get single custom integration +*AccountAPI* | [**GetAccountCustomIntegrations**](docs/AccountAPI.md#getaccountcustomintegrations) | **Get** /account/custom-integrations | Get all custom integrations +*AccountAPI* | [**GetAccountGroup**](docs/AccountAPI.md#getaccountgroup) | **Get** /account/groups/{group_id} | Get group details +*AccountAPI* | [**GetAccountGroupMapping**](docs/AccountAPI.md#getaccountgroupmapping) | **Get** /account/sso/groups/{group_mapping_id} | Get SSO group mapping details +*AccountAPI* | [**GetAccountGroupMappings**](docs/AccountAPI.md#getaccountgroupmappings) | **Get** /account/sso/groups | Get all SSO group mappings +*AccountAPI* | [**GetAccountGroups**](docs/AccountAPI.md#getaccountgroups) | **Get** /account/groups | Get all groups +*AccountAPI* | [**GetAccountKey**](docs/AccountAPI.md#getaccountkey) | **Get** /account/keys/{key_id} | Get key details +*AccountAPI* | [**GetAccountKeys**](docs/AccountAPI.md#getaccountkeys) | **Get** /account/keys | Get all active API keys +*AccountAPI* | [**GetAccountLicense**](docs/AccountAPI.md#getaccountlicense) | **Get** /account/license | Get license details +*AccountAPI* | [**GetAccountOrganization**](docs/AccountAPI.md#getaccountorganization) | **Get** /account/orgs/{org_id} | Get organization details +*AccountAPI* | [**GetAccountOrganizationExportToken**](docs/AccountAPI.md#getaccountorganizationexporttoken) | **Get** /account/orgs/{org_id}/exportTokens/{key_id} | Get export token details +*AccountAPI* | [**GetAccountOrganizationExportTokens**](docs/AccountAPI.md#getaccountorganizationexporttokens) | **Get** /account/orgs/{org_id}/exportTokens | Get all active export tokens for an organization +*AccountAPI* | [**GetAccountOrganizations**](docs/AccountAPI.md#getaccountorganizations) | **Get** /account/orgs | Get all organization details +*AccountAPI* | [**GetAccountScanTemplate**](docs/AccountAPI.md#getaccountscantemplate) | **Get** /account/tasks/templates/{scan_template_id} | Get scan template details +*AccountAPI* | [**GetAccountScanTemplates**](docs/AccountAPI.md#getaccountscantemplates) | **Get** /account/tasks/templates | Get all scan templates across all organizations (up to 1000) +*AccountAPI* | [**GetAccountSites**](docs/AccountAPI.md#getaccountsites) | **Get** /account/sites | Get all sites details across all organizations +*AccountAPI* | [**GetAccountTasks**](docs/AccountAPI.md#getaccounttasks) | **Get** /account/tasks | Get all task details across all organizations (up to 1000) +*AccountAPI* | [**GetAccountUser**](docs/AccountAPI.md#getaccountuser) | **Get** /account/users/{user_id} | Get user details +*AccountAPI* | [**GetAccountUsers**](docs/AccountAPI.md#getaccountusers) | **Get** /account/users | Get all users +*AccountAPI* | [**RemoveAccountCredential**](docs/AccountAPI.md#removeaccountcredential) | **Delete** /account/credentials/{credential_id} | Remove this credential +*AccountAPI* | [**RemoveAccountGroup**](docs/AccountAPI.md#removeaccountgroup) | **Delete** /account/groups/{group_id} | Remove this group +*AccountAPI* | [**RemoveAccountGroupMapping**](docs/AccountAPI.md#removeaccountgroupmapping) | **Delete** /account/sso/groups/{group_mapping_id} | Remove this SSO group mapping +*AccountAPI* | [**RemoveAccountKey**](docs/AccountAPI.md#removeaccountkey) | **Delete** /account/keys/{key_id} | Remove this key +*AccountAPI* | [**RemoveAccountOrganization**](docs/AccountAPI.md#removeaccountorganization) | **Delete** /account/orgs/{org_id} | Remove this organization +*AccountAPI* | [**RemoveAccountScanTemplate**](docs/AccountAPI.md#removeaccountscantemplate) | **Delete** /account/tasks/templates/{scan_template_id} | Remove scan template +*AccountAPI* | [**RemoveAccountUser**](docs/AccountAPI.md#removeaccountuser) | **Delete** /account/users/{user_id} | Remove this user +*AccountAPI* | [**ResetAccountUserLockout**](docs/AccountAPI.md#resetaccountuserlockout) | **Patch** /account/users/{user_id}/resetLockout | Resets the user's lockout status +*AccountAPI* | [**ResetAccountUserMFA**](docs/AccountAPI.md#resetaccountusermfa) | **Patch** /account/users/{user_id}/resetMFA | Resets the user's MFA tokens +*AccountAPI* | [**ResetAccountUserPassword**](docs/AccountAPI.md#resetaccountuserpassword) | **Patch** /account/users/{user_id}/resetPassword | Sends the user a password reset email +*AccountAPI* | [**RotateAPIToken**](docs/AccountAPI.md#rotateapitoken) | **Post** /account/api/rotate | Rotate the API client secret +*AccountAPI* | [**RotateAccountKey**](docs/AccountAPI.md#rotateaccountkey) | **Patch** /account/keys/{key_id}/rotate | Rotates the key secret +*AccountAPI* | [**RotateAccountOrganizationExportToken**](docs/AccountAPI.md#rotateaccountorganizationexporttoken) | **Patch** /account/orgs/{org_id}/exportTokens/{key_id}/rotate | Rotates an organization export token and returns the updated token +*AccountAPI* | [**RotateAccountOrganizationExportTokenDeprecated**](docs/AccountAPI.md#rotateaccountorganizationexporttokendeprecated) | **Patch** /account/orgs/{org_id}/exportToken/rotate | Rotates an organization export token and returns the updated token +*AccountAPI* | [**UpdateAccountAssetOwnershipType**](docs/AccountAPI.md#updateaccountassetownershiptype) | **Patch** /account/assets/ownership-types/{ownership_type_id} | Update a single asset ownership type +*AccountAPI* | [**UpdateAccountAssetOwnershipTypes**](docs/AccountAPI.md#updateaccountassetownershiptypes) | **Put** /account/assets/ownership-types | Update asset ownership types +*AccountAPI* | [**UpdateAccountCustomIntegration**](docs/AccountAPI.md#updateaccountcustomintegration) | **Patch** /account/custom-integrations/{customIntegrationId} | Update a single custom integration +*AccountAPI* | [**UpdateAccountGroup**](docs/AccountAPI.md#updateaccountgroup) | **Put** /account/groups | Update an existing group +*AccountAPI* | [**UpdateAccountGroupMapping**](docs/AccountAPI.md#updateaccountgroupmapping) | **Put** /account/sso/groups | Update an existing SSO group mapping +*AccountAPI* | [**UpdateAccountOrganization**](docs/AccountAPI.md#updateaccountorganization) | **Patch** /account/orgs/{org_id} | Update organization details +*AccountAPI* | [**UpdateAccountScanTemplate**](docs/AccountAPI.md#updateaccountscantemplate) | **Put** /account/tasks/templates | Update scan template +*AccountAPI* | [**UpdateAccountUser**](docs/AccountAPI.md#updateaccountuser) | **Patch** /account/users/{user_id} | Update a user's details +*CiscoSNTCAPI* | [**ExportAssetsCiscoCSV**](docs/CiscoSNTCAPI.md#exportassetsciscocsv) | **Get** /export/org/assets.cisco.csv | Cisco serial number and model name export for Cisco Smart Net Total Care Service. +*ExportAPI* | [**ExportAssetMetricsJSON**](docs/ExportAPI.md#exportassetmetricsjson) | **Get** /org/metrics | Export asset metrics +*ExportAPI* | [**ExportAssetTopHWCSV**](docs/ExportAPI.md#exportassettophwcsv) | **Get** /org/assets/hw.csv | Top asset hardware products as CSV +*ExportAPI* | [**ExportAssetTopOSCSV**](docs/ExportAPI.md#exportassettoposcsv) | **Get** /org/assets/os.csv | Top asset operating systems as CSV +*ExportAPI* | [**ExportAssetTopTagsCSV**](docs/ExportAPI.md#exportassettoptagscsv) | **Get** /org/assets/tags.csv | Top asset tags as CSV +*ExportAPI* | [**ExportAssetTopTypesCSV**](docs/ExportAPI.md#exportassettoptypescsv) | **Get** /org/assets/type.csv | Top asset types as CSV +*ExportAPI* | [**ExportAssetsCSV**](docs/ExportAPI.md#exportassetscsv) | **Get** /export/org/assets.csv | Asset inventory as CSV +*ExportAPI* | [**ExportAssetsJSON**](docs/ExportAPI.md#exportassetsjson) | **Get** /export/org/assets.json | Exports the asset inventory +*ExportAPI* | [**ExportAssetsJSONL**](docs/ExportAPI.md#exportassetsjsonl) | **Get** /export/org/assets.jsonl | Asset inventory as JSON line-delimited +*ExportAPI* | [**ExportAssetsNmapXML**](docs/ExportAPI.md#exportassetsnmapxml) | **Get** /export/org/assets.nmap.xml | Asset inventory as Nmap-style XML +*ExportAPI* | [**ExportCertificatesCSV**](docs/ExportAPI.md#exportcertificatescsv) | **Get** /export/org/certificates.csv | Export the certificate inventory as CSV +*ExportAPI* | [**ExportCertificatesJSON**](docs/ExportAPI.md#exportcertificatesjson) | **Get** /export/org/certificates.json | Export the certificate inventory as JSON +*ExportAPI* | [**ExportCertificatesJSONL**](docs/ExportAPI.md#exportcertificatesjsonl) | **Get** /export/org/certificates.jsonl | Export the certificate inventory as JSONL line-delimited +*ExportAPI* | [**ExportDirectoryGroupsCSV**](docs/ExportAPI.md#exportdirectorygroupscsv) | **Get** /export/org/groups.csv | Group inventory as CSV +*ExportAPI* | [**ExportDirectoryGroupsJSON**](docs/ExportAPI.md#exportdirectorygroupsjson) | **Get** /export/org/groups.json | Exports the group inventory +*ExportAPI* | [**ExportDirectoryGroupsJSONL**](docs/ExportAPI.md#exportdirectorygroupsjsonl) | **Get** /export/org/groups.jsonl | Group inventory as JSON line-delimited +*ExportAPI* | [**ExportDirectoryUsersCSV**](docs/ExportAPI.md#exportdirectoryuserscsv) | **Get** /export/org/users.csv | User inventory as CSV +*ExportAPI* | [**ExportDirectoryUsersJSON**](docs/ExportAPI.md#exportdirectoryusersjson) | **Get** /export/org/users.json | Exports the user inventory +*ExportAPI* | [**ExportDirectoryUsersJSONL**](docs/ExportAPI.md#exportdirectoryusersjsonl) | **Get** /export/org/users.jsonl | User inventory as JSON line-delimited +*ExportAPI* | [**ExportFindingsCSV**](docs/ExportAPI.md#exportfindingscsv) | **Get** /export/org/findings.csv | Export findings as CSV +*ExportAPI* | [**ExportFindingsJSON**](docs/ExportAPI.md#exportfindingsjson) | **Get** /export/org/findings.json | Export findings as JSON +*ExportAPI* | [**ExportFindingsJSONL**](docs/ExportAPI.md#exportfindingsjsonl) | **Get** /export/org/findings.jsonl | Export findings as JSON line-delimited +*ExportAPI* | [**ExportSNMPARPCacheCSV**](docs/ExportAPI.md#exportsnmparpcachecsv) | **Get** /export/org/snmp.arpcache.csv | SNMP ARP cache data as CSV +*ExportAPI* | [**ExportServicesCSV**](docs/ExportAPI.md#exportservicescsv) | **Get** /export/org/services.csv | Service inventory as CSV +*ExportAPI* | [**ExportServicesJSON**](docs/ExportAPI.md#exportservicesjson) | **Get** /export/org/services.json | Service inventory as JSON +*ExportAPI* | [**ExportServicesJSONL**](docs/ExportAPI.md#exportservicesjsonl) | **Get** /export/org/services.jsonl | Service inventory as JSON line-delimited +*ExportAPI* | [**ExportServicesTopProductsCSV**](docs/ExportAPI.md#exportservicestopproductscsv) | **Get** /org/services/products.csv | Top service products as CSV +*ExportAPI* | [**ExportServicesTopProtocolsCSV**](docs/ExportAPI.md#exportservicestopprotocolscsv) | **Get** /org/services/protocols.csv | Top service protocols as CSV +*ExportAPI* | [**ExportServicesTopTCPCSV**](docs/ExportAPI.md#exportservicestoptcpcsv) | **Get** /org/services/tcp.csv | Top TCP services as CSV +*ExportAPI* | [**ExportServicesTopUDPCSV**](docs/ExportAPI.md#exportservicestopudpcsv) | **Get** /org/services/udp.csv | Top UDP services as CSV +*ExportAPI* | [**ExportSitesCSV**](docs/ExportAPI.md#exportsitescsv) | **Get** /export/org/sites.csv | Site list as CSV +*ExportAPI* | [**ExportSitesJSON**](docs/ExportAPI.md#exportsitesjson) | **Get** /export/org/sites.json | Export all sites +*ExportAPI* | [**ExportSitesJSONL**](docs/ExportAPI.md#exportsitesjsonl) | **Get** /export/org/sites.jsonl | Site list as JSON line-delimited +*ExportAPI* | [**ExportSoftwareCSV**](docs/ExportAPI.md#exportsoftwarecsv) | **Get** /export/org/software.csv | Software inventory as CSV +*ExportAPI* | [**ExportSoftwareJSON**](docs/ExportAPI.md#exportsoftwarejson) | **Get** /export/org/software.json | Exports the software inventory +*ExportAPI* | [**ExportSoftwareJSONL**](docs/ExportAPI.md#exportsoftwarejsonl) | **Get** /export/org/software.jsonl | Software inventory as JSON line-delimited +*ExportAPI* | [**ExportSubnetUtilizationStatsCSV**](docs/ExportAPI.md#exportsubnetutilizationstatscsv) | **Get** /export/org/subnet.stats.csv | Subnet utilization statistics as as CSV +*ExportAPI* | [**ExportTasksJSON**](docs/ExportAPI.md#exporttasksjson) | **Get** /export/org/tasks.json | Exports organization tasks +*ExportAPI* | [**ExportTasksJSONL**](docs/ExportAPI.md#exporttasksjsonl) | **Get** /export/org/tasks.jsonl | Organization tasks as JSON line-delimited +*ExportAPI* | [**ExportVulnerabilitiesCSV**](docs/ExportAPI.md#exportvulnerabilitiescsv) | **Get** /export/org/vulnerabilities.csv | Export the vulnerability inventory as CSV +*ExportAPI* | [**ExportVulnerabilitiesJSON**](docs/ExportAPI.md#exportvulnerabilitiesjson) | **Get** /export/org/vulnerabilities.json | Export the vulnerability inventory as JSON +*ExportAPI* | [**ExportVulnerabilitiesJSONL**](docs/ExportAPI.md#exportvulnerabilitiesjsonl) | **Get** /export/org/vulnerabilities.jsonl | Export the vulnerability inventory as JSON line-delimited +*ExportAPI* | [**ExportWirelessCSV**](docs/ExportAPI.md#exportwirelesscsv) | **Get** /export/org/wireless.csv | Wireless inventory as CSV +*ExportAPI* | [**ExportWirelessJSON**](docs/ExportAPI.md#exportwirelessjson) | **Get** /export/org/wireless.json | Wireless inventory as JSON +*ExportAPI* | [**ExportWirelessJSONL**](docs/ExportAPI.md#exportwirelessjsonl) | **Get** /export/org/wireless.jsonl | Wireless inventory as JSON line-delimited +*ImportAPI* | [**ImportCustomIntegrationAssets**](docs/ImportAPI.md#importcustomintegrationassets) | **Post** /import/org/{orgID}/assets | Import assets described by a registered custom integration +*OrganizationAPI* | [**BulkRemoveCustomIntegration**](docs/OrganizationAPI.md#bulkremovecustomintegration) | **Post** /org/custom-integrations/{custom_integration_id}/bulk/remove | Remove custom integration from a list of assets +*OrganizationAPI* | [**ClearBulkAssetOwners**](docs/OrganizationAPI.md#clearbulkassetowners) | **Post** /org/assets/bulk/clearOwners | Clear all owners across multiple assets based on a search query +*OrganizationAPI* | [**ClearBulkAssetTags**](docs/OrganizationAPI.md#clearbulkassettags) | **Post** /org/assets/bulk/clearTags | Clear all tags across multiple assets based on a search query +*OrganizationAPI* | [**CreateSample**](docs/OrganizationAPI.md#createsample) | **Put** /org/sites/{site_id}/sample | Create a traffic sampling task for a given site +*OrganizationAPI* | [**CreateScan**](docs/OrganizationAPI.md#createscan) | **Put** /org/sites/{site_id}/scan | Create a scan task for a given site +*OrganizationAPI* | [**CreateSite**](docs/OrganizationAPI.md#createsite) | **Put** /org/sites | Create a new site +*OrganizationAPI* | [**GetAgent**](docs/OrganizationAPI.md#getagent) | **Get** /org/agents/{agent_id} | Get details for a single agent. Legacy path for /org/explorers/{explorer_id} +*OrganizationAPI* | [**GetAgents**](docs/OrganizationAPI.md#getagents) | **Get** /org/agents | Get all agents. Legacy path for /org/explorers +*OrganizationAPI* | [**GetAsset**](docs/OrganizationAPI.md#getasset) | **Get** /org/assets/{asset_id} | Get asset details +*OrganizationAPI* | [**GetAssets**](docs/OrganizationAPI.md#getassets) | **Get** /org/assets | Get all assets +*OrganizationAPI* | [**GetExplorer**](docs/OrganizationAPI.md#getexplorer) | **Get** /org/explorers/{explorer_id} | Get details for a single explorer. +*OrganizationAPI* | [**GetExplorers**](docs/OrganizationAPI.md#getexplorers) | **Get** /org/explorers | Get all explorers +*OrganizationAPI* | [**GetHostedZone**](docs/OrganizationAPI.md#gethostedzone) | **Get** /org/hosted-zones/{hosted_zone_id} | Get details for a single hosted zone. +*OrganizationAPI* | [**GetHostedZones**](docs/OrganizationAPI.md#gethostedzones) | **Get** /org/hosted-zones | Get all hosted zones +*OrganizationAPI* | [**GetKey**](docs/OrganizationAPI.md#getkey) | **Get** /org/key | Get API key details +*OrganizationAPI* | [**GetOrgCustomIntegration**](docs/OrganizationAPI.md#getorgcustomintegration) | **Get** /org/custom-integrations/{customIntegrationId} | Get single custom integration +*OrganizationAPI* | [**GetOrgCustomIntegrations**](docs/OrganizationAPI.md#getorgcustomintegrations) | **Get** /org/custom-integrations | Get all custom integrations +*OrganizationAPI* | [**GetOrganization**](docs/OrganizationAPI.md#getorganization) | **Get** /org | Get organization details +*OrganizationAPI* | [**GetService**](docs/OrganizationAPI.md#getservice) | **Get** /org/services/{service_id} | Get service details +*OrganizationAPI* | [**GetServices**](docs/OrganizationAPI.md#getservices) | **Get** /org/services | Get all services +*OrganizationAPI* | [**GetSite**](docs/OrganizationAPI.md#getsite) | **Get** /org/sites/{site_id} | Get site details +*OrganizationAPI* | [**GetSites**](docs/OrganizationAPI.md#getsites) | **Get** /org/sites | Get all sites +*OrganizationAPI* | [**GetTask**](docs/OrganizationAPI.md#gettask) | **Get** /org/tasks/{task_id} | Get task details +*OrganizationAPI* | [**GetTaskChangeReport**](docs/OrganizationAPI.md#gettaskchangereport) | **Get** /org/tasks/{task_id}/changes | Returns a temporary task change report data url +*OrganizationAPI* | [**GetTaskLog**](docs/OrganizationAPI.md#gettasklog) | **Get** /org/tasks/{task_id}/log | Returns a temporary task log data url +*OrganizationAPI* | [**GetTaskScanData**](docs/OrganizationAPI.md#gettaskscandata) | **Get** /org/tasks/{task_id}/data | Returns a temporary task scan data url +*OrganizationAPI* | [**GetTasks**](docs/OrganizationAPI.md#gettasks) | **Get** /org/tasks | Get all tasks (last 1000) +*OrganizationAPI* | [**GetWirelessLAN**](docs/OrganizationAPI.md#getwirelesslan) | **Get** /org/wireless/{wireless_id} | Get wireless LAN details +*OrganizationAPI* | [**GetWirelessLANs**](docs/OrganizationAPI.md#getwirelesslans) | **Get** /org/wireless | Get all wireless LANs +*OrganizationAPI* | [**HideTask**](docs/OrganizationAPI.md#hidetask) | **Post** /org/tasks/{task_id}/hide | Signal that a completed task should be hidden +*OrganizationAPI* | [**ImportNessusScanData**](docs/OrganizationAPI.md#importnessusscandata) | **Put** /org/sites/{site_id}/import/nessus | Import a Nessus scan data file into a site +*OrganizationAPI* | [**ImportPacketData**](docs/OrganizationAPI.md#importpacketdata) | **Put** /org/sites/{site_id}/import/packet | Import a packet capture file into a site +*OrganizationAPI* | [**ImportScanData**](docs/OrganizationAPI.md#importscandata) | **Put** /org/sites/{site_id}/import | Import a scan data file into a site +*OrganizationAPI* | [**MergeAssets**](docs/OrganizationAPI.md#mergeassets) | **Patch** /org/assets/merge | Merge multiple assets +*OrganizationAPI* | [**RemoveAgent**](docs/OrganizationAPI.md#removeagent) | **Delete** /org/agents/{agent_id} | Remove and uninstall an agent. Legacy path for /org/explorers/{explorer_id} +*OrganizationAPI* | [**RemoveAsset**](docs/OrganizationAPI.md#removeasset) | **Delete** /org/assets/{asset_id} | Remove an asset +*OrganizationAPI* | [**RemoveAssetSource**](docs/OrganizationAPI.md#removeassetsource) | **Delete** /org/assets/{asset_id}/sources/{source_id}/remove | Remove single source from asset +*OrganizationAPI* | [**RemoveBulkAssets**](docs/OrganizationAPI.md#removebulkassets) | **Post** /org/assets/bulk/delete | Removes multiple assets by ID +*OrganizationAPI* | [**RemoveCustomIntegration**](docs/OrganizationAPI.md#removecustomintegration) | **Delete** /org/assets/{asset_id}/custom-integrations/{custom_integration_id}/remove | Remove single custom integration from asset +*OrganizationAPI* | [**RemoveExplorer**](docs/OrganizationAPI.md#removeexplorer) | **Delete** /org/explorers/{explorer_id} | Remove and uninstall an explorer +*OrganizationAPI* | [**RemoveKey**](docs/OrganizationAPI.md#removekey) | **Delete** /org/key | Remove the current API key +*OrganizationAPI* | [**RemoveService**](docs/OrganizationAPI.md#removeservice) | **Delete** /org/services/{service_id} | Remove a service +*OrganizationAPI* | [**RemoveSite**](docs/OrganizationAPI.md#removesite) | **Delete** /org/sites/{site_id} | Remove a site and associated assets +*OrganizationAPI* | [**RemoveWirelessLAN**](docs/OrganizationAPI.md#removewirelesslan) | **Delete** /org/wireless/{wireless_id} | Remove a wireless LAN +*OrganizationAPI* | [**RotateKey**](docs/OrganizationAPI.md#rotatekey) | **Patch** /org/key/rotate | Rotate the API key secret and return the updated key +*OrganizationAPI* | [**StopTask**](docs/OrganizationAPI.md#stoptask) | **Post** /org/tasks/{task_id}/stop | Signal that a task should be stopped or canceled.This will also remove recurring and scheduled tasks +*OrganizationAPI* | [**UpdateAgentSettings**](docs/OrganizationAPI.md#updateagentsettings) | **Patch** /org/agents/{agent_id} | Update the settings associated with the agent. Legacy path for /org/explorers/{explorer_id} +*OrganizationAPI* | [**UpdateAssetComments**](docs/OrganizationAPI.md#updateassetcomments) | **Patch** /org/assets/{asset_id}/comments | Update asset comments +*OrganizationAPI* | [**UpdateAssetCriticality**](docs/OrganizationAPI.md#updateassetcriticality) | **Patch** /org/assets/{asset_id}/criticality | Update asset criticality +*OrganizationAPI* | [**UpdateAssetOwners**](docs/OrganizationAPI.md#updateassetowners) | **Patch** /org/assets/{asset_id}/owners | Update asset owners +*OrganizationAPI* | [**UpdateAssetTags**](docs/OrganizationAPI.md#updateassettags) | **Patch** /org/assets/{asset_id}/tags | Update asset tags +*OrganizationAPI* | [**UpdateBulkAssetCriticality**](docs/OrganizationAPI.md#updatebulkassetcriticality) | **Patch** /org/assets/bulk/criticality | Update criticality across multiple assets based on a search query +*OrganizationAPI* | [**UpdateBulkAssetOwners**](docs/OrganizationAPI.md#updatebulkassetowners) | **Patch** /org/assets/bulk/owners | Update asset owners across multiple assets based on a search query +*OrganizationAPI* | [**UpdateBulkAssetTags**](docs/OrganizationAPI.md#updatebulkassettags) | **Patch** /org/assets/bulk/tags | Update tags across multiple assets based on a search query +*OrganizationAPI* | [**UpdateExplorerSettings**](docs/OrganizationAPI.md#updateexplorersettings) | **Patch** /org/explorers/{explorer_id} | Update the settings associated with the Explorer +*OrganizationAPI* | [**UpdateOrganization**](docs/OrganizationAPI.md#updateorganization) | **Patch** /org | Update organization details +*OrganizationAPI* | [**UpdateSite**](docs/OrganizationAPI.md#updatesite) | **Patch** /org/sites/{site_id} | Update a site definition +*OrganizationAPI* | [**UpdateTask**](docs/OrganizationAPI.md#updatetask) | **Patch** /org/tasks/{task_id} | Update task parameters +*OrganizationAPI* | [**UpgradeAgent**](docs/OrganizationAPI.md#upgradeagent) | **Post** /org/agents/{agent_id}/update | Force an agent to update and restart. Legacy path for /org/explorers/{explorer_id}/update +*OrganizationAPI* | [**UpgradeExplorer**](docs/OrganizationAPI.md#upgradeexplorer) | **Post** /org/explorers/{explorer_id}/update | Force an explorer to update and restart +*PublicAPI* | [**GetHealthCheck**](docs/PublicAPI.md#gethealthcheck) | **Get** /health | Returns a health check status (cloud and self-hosted) +*PublicAPI* | [**GetLatestAgentVersion**](docs/PublicAPI.md#getlatestagentversion) | **Get** /releases/agent/version | Returns latest agent version +*PublicAPI* | [**GetLatestPlatformVersion**](docs/PublicAPI.md#getlatestplatformversion) | **Get** /releases/platform/version | Returns latest platform version +*PublicAPI* | [**GetLatestScannerVersion**](docs/PublicAPI.md#getlatestscannerversion) | **Get** /releases/scanner/version | Returns latest scanner version +*ServiceNowAPI* | [**SnowExportAssetsCSV**](docs/ServiceNowAPI.md#snowexportassetscsv) | **Get** /export/org/assets.servicenow.csv | Export an asset inventory as CSV for ServiceNow integration +*ServiceNowAPI* | [**SnowExportAssetsJSON**](docs/ServiceNowAPI.md#snowexportassetsjson) | **Get** /export/org/assets.servicenow.json | Exports the asset inventory as JSON +*ServiceNowAPI* | [**SnowExportServicesCSV**](docs/ServiceNowAPI.md#snowexportservicescsv) | **Get** /export/org/services.servicenow.csv | Export a service inventory as CSV for ServiceNow integration +*ServiceNowAPI* | [**SnowServiceGraphExportAssetsJSON**](docs/ServiceNowAPI.md#snowservicegraphexportassetsjson) | **Get** /export/org/assets.servicegraph.json | Exports the asset inventory as JSON +*SplunkAPI* | [**SplunkAssetSyncCreatedJSON**](docs/SplunkAPI.md#splunkassetsynccreatedjson) | **Get** /export/org/assets/sync/created/assets.json | Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. Requires the Splunk entitlement. +*SplunkAPI* | [**SplunkAssetSyncUpdatedJSON**](docs/SplunkAPI.md#splunkassetsyncupdatedjson) | **Get** /export/org/assets/sync/updated/assets.json | Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. Requires the Splunk entitlement. ## Documentation For Models - - [APIKey](docs/APIKey.md) + - [APIClientCredentials](docs/APIClientCredentials.md) + - [APIKeyOptions](docs/APIKeyOptions.md) + - [AWSCredentialFields](docs/AWSCredentialFields.md) + - [AccessToken](docs/AccessToken.md) - [Agent](docs/Agent.md) - - [AgentSiteID](docs/AgentSiteID.md) + - [AgentPatchedSettings](docs/AgentPatchedSettings.md) + - [AgentPatchedSettingsSettings](docs/AgentPatchedSettingsSettings.md) - [Asset](docs/Asset.md) - [AssetComments](docs/AssetComments.md) + - [AssetCriticality](docs/AssetCriticality.md) + - [AssetCriticalityWithSearch](docs/AssetCriticalityWithSearch.md) + - [AssetExportResponse](docs/AssetExportResponse.md) + - [AssetIDs](docs/AssetIDs.md) + - [AssetMetric](docs/AssetMetric.md) + - [AssetOwnership](docs/AssetOwnership.md) + - [AssetOwnershipType](docs/AssetOwnershipType.md) + - [AssetOwnershipTypePost](docs/AssetOwnershipTypePost.md) + - [AssetOwnerships](docs/AssetOwnerships.md) + - [AssetOwnershipsWithSearch](docs/AssetOwnershipsWithSearch.md) + - [AssetOwnershipsWithSearchOwnershipsInner](docs/AssetOwnershipsWithSearchOwnershipsInner.md) + - [AssetPage](docs/AssetPage.md) + - [AssetServiceNow](docs/AssetServiceNow.md) - [AssetTags](docs/AssetTags.md) + - [AssetTagsWithSearch](docs/AssetTagsWithSearch.md) - [AssetsWithCheckpoint](docs/AssetsWithCheckpoint.md) + - [AzureClientSecretCredentialFields](docs/AzureClientSecretCredentialFields.md) + - [AzureUsernamePasswordCredentialFields](docs/AzureUsernamePasswordCredentialFields.md) + - [BaseCustomIntegration](docs/BaseCustomIntegration.md) + - [BaseResponse](docs/BaseResponse.md) + - [BulkAssetUpdateResult](docs/BulkAssetUpdateResult.md) + - [CensysCredentialFields](docs/CensysCredentialFields.md) + - [Certificate](docs/Certificate.md) - [ComponentVersion](docs/ComponentVersion.md) + - [Credential](docs/Credential.md) + - [CredentialFields](docs/CredentialFields.md) + - [CredentialOptions](docs/CredentialOptions.md) + - [CrowdstrikeCredentialFields](docs/CrowdstrikeCredentialFields.md) + - [CustomAttributesValue](docs/CustomAttributesValue.md) + - [CustomIntegration](docs/CustomIntegration.md) + - [CustomIntegrationCreate](docs/CustomIntegrationCreate.md) + - [CustomIntegrationScriptCredentialFields](docs/CustomIntegrationScriptCredentialFields.md) + - [DirectoryGroup](docs/DirectoryGroup.md) + - [DirectoryUser](docs/DirectoryUser.md) + - [Event](docs/Event.md) + - [EventExportResponse](docs/EventExportResponse.md) + - [EventPage](docs/EventPage.md) + - [ExportToken](docs/ExportToken.md) + - [ExportTokenOptions](docs/ExportTokenOptions.md) + - [Finding](docs/Finding.md) + - [FindingLink](docs/FindingLink.md) + - [FindingLinks](docs/FindingLinks.md) + - [GCPCredentialFields](docs/GCPCredentialFields.md) + - [GoogleWorkspaceCredentialFields](docs/GoogleWorkspaceCredentialFields.md) + - [Group](docs/Group.md) + - [GroupMapping](docs/GroupMapping.md) + - [GroupPost](docs/GroupPost.md) + - [GroupPut](docs/GroupPut.md) + - [HealthCheckResponse](docs/HealthCheckResponse.md) + - [HostedZone](docs/HostedZone.md) + - [ImportAsset](docs/ImportAsset.md) + - [ImportTask](docs/ImportTask.md) + - [InsightVMCredentialFields](docs/InsightVMCredentialFields.md) + - [LDAPCredentialFields](docs/LDAPCredentialFields.md) + - [License](docs/License.md) + - [MECMCredentialFields](docs/MECMCredentialFields.md) + - [MiradoreCredentialFields](docs/MiradoreCredentialFields.md) + - [MirakiCredentialFields](docs/MirakiCredentialFields.md) + - [NessusCredentialFields](docs/NessusCredentialFields.md) + - [NetboxCredentialFields](docs/NetboxCredentialFields.md) + - [NetworkInterface](docs/NetworkInterface.md) - [OrgOptions](docs/OrgOptions.md) - [Organization](docs/Organization.md) + - [OrganizationAPIKey](docs/OrganizationAPIKey.md) + - [PaloAltoFirewallCredentialFields](docs/PaloAltoFirewallCredentialFields.md) + - [Problem](docs/Problem.md) + - [QualysCredentialFields](docs/QualysCredentialFields.md) + - [SNMPv2CommunitiesCredentialFields](docs/SNMPv2CommunitiesCredentialFields.md) + - [SNMPv3CredentialFields](docs/SNMPv3CredentialFields.md) + - [SampleOptions](docs/SampleOptions.md) - [ScanOptions](docs/ScanOptions.md) + - [ScanTemplate](docs/ScanTemplate.md) + - [ScanTemplateOptions](docs/ScanTemplateOptions.md) + - [SearchQuery](docs/SearchQuery.md) + - [SentinelOneCredentialFields](docs/SentinelOneCredentialFields.md) - [Service](docs/Service.md) + - [ServiceExportResponse](docs/ServiceExportResponse.md) + - [ServicePage](docs/ServicePage.md) + - [ShodanCredentialFields](docs/ShodanCredentialFields.md) - [Site](docs/Site.md) - [SiteOptions](docs/SiteOptions.md) + - [Software](docs/Software.md) + - [SoftwareExportResponse](docs/SoftwareExportResponse.md) + - [SoftwarePage](docs/SoftwarePage.md) + - [TaniumCredentialFields](docs/TaniumCredentialFields.md) - [Task](docs/Task.md) + - [TaskBase](docs/TaskBase.md) + - [TaskOptions](docs/TaskOptions.md) + - [TenableIoCredentialFields](docs/TenableIoCredentialFields.md) + - [TenableScCredentialFields](docs/TenableScCredentialFields.md) - [URL](docs/URL.md) + - [User](docs/User.md) + - [UserInviteOptions](docs/UserInviteOptions.md) + - [UserOptions](docs/UserOptions.md) + - [VMwareCredentialFields](docs/VMwareCredentialFields.md) + - [Vulnerability](docs/Vulnerability.md) + - [VulnerabilityExportResponse](docs/VulnerabilityExportResponse.md) + - [VulnerabilityPage](docs/VulnerabilityPage.md) - [Wireless](docs/Wireless.md) + - [WirelessExportResponse](docs/WirelessExportResponse.md) + - [WirelessPage](docs/WirelessPage.md) + - [WizCredentialFields](docs/WizCredentialFields.md) + - [X509CredentialFields](docs/X509CredentialFields.md) ## Documentation For Authorization - +Authentication schemes defined for the API: ### bearerAuth +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### oauthDefaults + + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: N/A + +Example + +```go +auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```go +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, openapi.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + ## Documentation for Utility Methods diff --git a/go/api/openapi.yaml b/go/api/openapi.yaml index 1ddb9b2..decb0fd 100644 --- a/go/api/openapi.yaml +++ b/go/api/openapi.yaml @@ -2,20 +2,40 @@ openapi: 3.0.0 info: contact: email: support@runzero.com - description: runZero Network Discovery API + description: "runZero API. API use is rate limited, you can make as many calls per\ + \ day as you have licensed assets." license: name: Commercial - url: https://runzero.com/terms + url: https://www.runzero.com/legal/terms title: runZero API - version: 1.0.4 + version: 4.0.250826.0 servers: - description: runZero Console url: https://console.runzero.com/api/v1.0 +security: +- bearerAuth: [] +- oauthDefaults: [] tags: -- description: Requires Organization Key +- description: "Requires Account key (starts with CT), or OAuth" + name: Account +- description: "Requires Organization key (starts with OT), Account key (starts with\ + \ CT), or OAuth" name: Organization -- description: Requires Export Token or Organization Key +- description: "Requires Export token (starts with ET), Organization key (starts with\ + \ OT), Account key (starts with CT), or OAuth" name: Export +- description: "Requires Organization key (starts with OT), Account key (starts with\ + \ CT), or OAuth" + name: Import +- description: "ServiceNow integration endpoints. Requires Organization key (starts\ + \ with OT), Account key (starts with CT), or OAuth." + name: ServiceNow +- description: "Splunk-friendly export endpoints. Requires Export token (starts with\ + \ ET), Organization key (starts with OT), Account key (starts with CT), or OAuth." + name: Splunk +- description: "Cisco Smart Net Total Care integration endpoints. Requires Organization\ + \ key (starts with OT), Account key (starts with CT), or OAuth." + name: Cisco SNTC - description: Unauthenticated name: Public paths: @@ -27,9 +47,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ComponentVersion' + $ref: "#/components/schemas/ComponentVersion" description: component version - summary: Returns latest agent version. + security: [] + summary: Returns latest agent version tags: - Public /releases/scanner/version: @@ -40,9 +61,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ComponentVersion' + $ref: "#/components/schemas/ComponentVersion" description: component version - summary: Returns latest scanner version. + security: [] + summary: Returns latest scanner version tags: - Public /releases/platform/version: @@ -53,16 +75,112 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ComponentVersion' + $ref: "#/components/schemas/ComponentVersion" description: component version - summary: Returns latest platform version. + security: [] + summary: Returns latest platform version tags: - Public + /health: + get: + operationId: getHealthCheck + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/HealthCheckResponse" + description: health status and current version + security: [] + summary: Returns a health check status (cloud and self-hosted) + tags: + - Public + /import/org/{orgID}/assets: + post: + description: | + Assets can be discovered, imported, and merged by runZero scan tasks, first-party integrations, and third-party + defined custom integrations. See [/account/custom-integrations](#/account/getAccountCustomIntegrations). Currently only assets for custom integrations are importable here. + operationId: importCustomIntegrationAssets + parameters: + - description: The ID of the organization to import the assets into + explode: false + in: path + name: orgID + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + multipart/form-data: + encoding: + assetData: + contentType: application/gzip + style: form + schema: + $ref: "#/components/schemas/NewAssetImport" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: import task created. The task ID should be checked for its + status. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Import assets described by a registered custom integration + tags: + - Import /export/org/assets.json: get: operationId: exportAssetsJSON parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -70,7 +188,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -78,27 +196,57 @@ paths: schema: type: string style: form + - description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Asset' - type: array - description: filtered asset results + $ref: "#/components/schemas/AssetExportResponse" + description: "Filtered asset results. " "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Exports the asset inventory. + summary: Exports the asset inventory tags: - Export /export/org/assets.jsonl: get: operationId: exportAssetsJSONL parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -106,7 +254,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -123,44 +271,27 @@ paths: type: string description: filtered asset results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Asset inventory as JSON line-delimited. + summary: Asset inventory as JSON line-delimited tags: - Export /export/org/assets.csv: get: operationId: exportAssetsCSV parameters: - - description: an optional search string for filtering results + - description: The current Organization explode: true in: query - name: search + name: _oid required: false schema: type: string style: form - responses: - "200": - content: - text/csv: - schema: - format: binary - type: string - description: filtered asset results - "401": - description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Asset inventory as CSV. - tags: - - Export - /export/org/assets.nmap.xml: - get: - operationId: exportAssetsNmapXML - parameters: - - description: an optional search string for filtering results + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -171,124 +302,99 @@ paths: responses: "200": content: - text/xml: + text/csv: schema: format: binary type: string description: filtered asset results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Asset inventory as Nmap-style XML. + summary: Asset inventory as CSV tags: - Export - /export/org/assets/sync/created/assets.json: + /export/org/assets.nmap.xml: get: - operationId: exportAssetSyncCreatedJSON + operationId: exportAssetsNmapXML parameters: - - description: an optional search string for filtering results + - description: The current Organization explode: true in: query - name: search + name: _oid required: false schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: A search query in runZero search query syntax explode: true in: query - name: fields + name: search required: false schema: type: string style: form - - description: an optional unix timestamp to use as a checkpoint - explode: true - in: query - name: since - required: false - schema: - example: 1576300370 - format: int64 - type: integer - style: form responses: "200": content: - application/json: + text/xml: schema: - $ref: '#/components/schemas/AssetsWithCheckpoint' - description: filtered asset results with a checkpoint wrapper + format: binary + type: string + description: filtered asset results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Exports the asset inventory in a sync-friendly manner using created_at - as a checkpoint. + summary: Asset inventory as Nmap-style XML tags: - Export - /export/org/assets/sync/updated/assets.json: + /export/org/services.json: get: - operationId: exportAssetSyncUpdatedJSON + operationId: exportServicesJSON parameters: - - description: an optional search string for filtering results + - description: The current Organization explode: true in: query - name: search + name: _oid required: false schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: A search query in runZero search query syntax explode: true in: query - name: fields + name: search required: false schema: type: string style: form - - description: an optional unix timestamp to use as a checkpoint + - description: "A list of fields to export, comma-separated" explode: true in: query - name: since + name: fields required: false schema: - example: 1576300370 - format: int64 - type: integer + type: string style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AssetsWithCheckpoint' - description: filtered asset results with a checkpoint wrapper - "401": - description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Exports the asset inventory in a sync-friendly manner using updated_at - as a checkpoint. - tags: - - Export - /export/org/services.json: - get: - operationId: exportServicesJSON - parameters: - - description: an optional search string for filtering results + - description: The number of results to return per request. explode: true in: query - name: search + name: page_size required: false schema: - type: string + type: integer style: form - - description: an optional list of fields to export, comma-separated + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. explode: true in: query - name: fields + name: start_key required: false schema: type: string @@ -298,22 +404,34 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/Service' - type: array - description: filtered service results + $ref: "#/components/schemas/ServiceExportResponse" + description: "Filtered service results. " "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Service inventory as JSON. + summary: Service inventory as JSON tags: - Export /export/org/services.jsonl: get: operationId: exportServicesJSONL parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -321,7 +439,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -338,17 +456,27 @@ paths: type: string description: filtered service results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Service inventory as JSON line-delimited. + summary: Service inventory as JSON line-delimited tags: - Export /export/org/services.csv: get: operationId: exportServicesCSV parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -365,17 +493,27 @@ paths: type: string description: filtered service results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Service inventory as CSV. + summary: Service inventory as CSV tags: - Export /export/org/sites.json: get: operationId: exportSitesJSON parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -383,7 +521,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -397,21 +535,31 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/Site' + $ref: "#/components/schemas/Site" type: array description: all sites "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Export all sites. + summary: Export all sites tags: - Export /export/org/sites.jsonl: get: operationId: exportSitesJSONL parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -419,7 +567,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -436,15 +584,26 @@ paths: type: string description: all sites "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Site list as JSON line-delimited. + summary: Site list as JSON line-delimited tags: - Export /export/org/sites.csv: get: operationId: exportSitesCSV + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form responses: "200": content: @@ -454,17 +613,27 @@ paths: type: string description: all sites "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Site list as CSV. + summary: Site list as CSV tags: - Export /export/org/wireless.json: get: operationId: exportWirelessJSON parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -472,7 +641,7 @@ paths: schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: "A list of fields to export, comma-separated" explode: true in: query name: fields @@ -480,38 +649,68 @@ paths: schema: type: string style: form + - description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Wireless' - type: array - description: filtered wireless results + $ref: "#/components/schemas/WirelessExportResponse" + description: "Filtered wireless results. " "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Wireless inventory as JSON. + summary: Wireless inventory as JSON tags: - Export /export/org/wireless.jsonl: get: operationId: exportWirelessJSONL parameters: - - description: an optional search string for filtering results + - description: The current Organization explode: true in: query - name: search + name: _oid required: false schema: type: string style: form - - description: an optional list of fields to export, comma-separated + - description: A search query in runZero search query syntax explode: true in: query - name: fields + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields required: false schema: type: string @@ -525,17 +724,27 @@ paths: type: string description: filtered wireless results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Wireless inventory as JSON line-delimited. + summary: Wireless inventory as JSON line-delimited tags: - Export /export/org/wireless.csv: get: operationId: exportWirelessCSV parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -552,415 +761,526 @@ paths: type: string description: filtered wireless results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Wireless inventory as CSV. + summary: Wireless inventory as CSV tags: - Export - /org: + /export/org/software.json: get: - operationId: getOrganization + operationId: exportSoftwareJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Organization' - description: organization details + $ref: "#/components/schemas/SoftwareExportResponse" + description: "Filtered software results. " "401": - description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get organization details. - tags: - - Organization - patch: - operationId: updateOrganization - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrgOptions' - description: organization options - required: true - responses: - "200": content: application/json: schema: - $ref: '#/components/schemas/Organization' - description: organization details - "401": + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Update organization details. + summary: Exports the software inventory tags: - - Organization - /org/key: + - Export + /export/org/software.jsonl: get: - operationId: getKey + operationId: exportSoftwareJSONL + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/APIKey' - description: api key details + format: binary + type: string + description: filtered software results "401": - description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get API key details. - tags: - - Organization - /org/agents: - get: - operationId: getAgents - responses: - "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Agent' - type: array - description: array of agents - "401": + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all agents. + summary: Software inventory as JSON line-delimited tags: - - Organization - /org/agents/{agent_id}: - delete: - operationId: removeAgent + - Export + /export/org/software.csv: + get: + operationId: exportSoftwareCSV parameters: - - description: UUID of the agent to remove - explode: false - in: path - name: agent_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: - "204": - description: empty response + "200": + content: + text/csv: + schema: + format: binary + type: string + description: filtered software results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Remove and uninstall an agent. + summary: Software inventory as CSV tags: - - Organization + - Export + /export/org/vulnerabilities.json: get: - operationId: getAgent + operationId: exportVulnerabilitiesJSON parameters: - - description: UUID of the agent - explode: false - in: path - name: agent_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Agent' - description: agent details + $ref: "#/components/schemas/VulnerabilityExportResponse" + description: "Filtered vulnerability results. " "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Get details for a single agent. + summary: Export the vulnerability inventory as JSON tags: - - Organization - patch: - operationId: updateAgentSite + - Export + /export/org/vulnerabilities.jsonl: + get: + operationId: exportVulnerabilitiesJSONL parameters: - - description: UUID of the agent to update - explode: false - in: path - name: agent_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AgentSiteID' - description: site_id to associate with the agent - required: true + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Agent' - description: agent details + format: binary + type: string + description: filtered vulnerability results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Update the site associated with agent. + summary: Export the vulnerability inventory as JSON line-delimited tags: - - Organization - /org/agents/{agent_id}/update: - post: - operationId: upgradeAgent + - Export + /export/org/vulnerabilities.csv: + get: + operationId: exportVulnerabilitiesCSV parameters: - - description: UUID of the agent to update - explode: false - in: path - name: agent_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - responses: - "204": - description: empty response - "401": - description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Force an agent to update and restart. - tags: - - Organization - /org/sites: - get: - operationId: getSites + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: "200": content: - application/json: + text/csv: schema: - items: - $ref: '#/components/schemas/Site' - type: array - description: array of sites + format: binary + type: string + description: filtered vulnerability results "401": - description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all sites. - tags: - - Organization - put: - operationId: createSite - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SiteOptions' - description: site definition - required: true - responses: - "200": content: application/json: schema: - $ref: '#/components/schemas/Site' - description: site details - "401": + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Create a new site. + summary: Export the vulnerability inventory as CSV tags: - - Organization - /org/sites/{site_id}: - delete: - operationId: removeSite + - Export + /export/org/certificates.csv: + get: + operationId: exportCertificatesCSV parameters: - - description: UUID or name of the site to remove - explode: false - in: path - name: site_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: - "204": - description: empty response + "200": + content: + text/csv: + schema: + format: binary + type: string + description: filtered certificate results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Remove a site and associated assets. + summary: Export the certificate inventory as CSV tags: - - Organization + - Export + /export/org/certificates.json: get: - operationId: getSite + operationId: exportCertificatesJSON parameters: - - description: UUID or name of the site - explode: false - in: path - name: site_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Site' - description: site details + items: + $ref: "#/components/schemas/Certificate" + type: array + description: filtered certificate results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Get site details. + summary: Export the certificate inventory as JSON tags: - - Organization - patch: - operationId: updateSite + - Export + /export/org/certificates.jsonl: + get: + operationId: exportCertificatesJSONL parameters: - - description: UUID or name of the site to update - explode: false - in: path - name: site_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SiteOptions' - description: site object - required: true + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Site' - description: site details + format: binary + type: string + description: filtered certificate results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Update a site definition. + summary: Export the certificate inventory as JSONL line-delimited tags: - - Organization - /org/sites/{site_id}/import: - put: - operationId: importScanData + - Export + /export/org/users.json: + get: + operationId: exportDirectoryUsersJSON parameters: - - description: UUID or name of the site to import scan data into - explode: false - in: path - name: site_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Task' - description: import task + items: + $ref: "#/components/schemas/DirectoryUser" + type: array + description: filtered user results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "403": - description: License has expired - "404": - description: Resource not found - "500": - description: Request could not be processed - security: - - bearerAuth: [] - summary: Import a scan data file into a site. + summary: Exports the user inventory tags: - - Organization - /org/sites/{site_id}/scan: - put: - operationId: createScan + - Export + /export/org/users.jsonl: + get: + operationId: exportDirectoryUsersJSONL parameters: - - description: UUID or name of the site to scan - explode: false - in: path - name: site_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - text/json: - schema: - $ref: '#/components/schemas/ScanOptions' + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Task' - description: a created scan task + format: binary + type: string + description: filtered user results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "403": - description: License has expired - "404": - description: Resource not found - "500": - description: Request could not be processed - security: - - bearerAuth: [] - summary: Create a scan task for a given site. + summary: User inventory as JSON line-delimited tags: - - Organization - /org/assets: + - Export + /export/org/users.csv: get: - operationId: getAssets + operationId: exportDirectoryUsersCSV parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -971,149 +1291,198 @@ paths: responses: "200": content: - application/json: + text/csv: schema: - items: - $ref: '#/components/schemas/Asset' - type: array - description: array of assets + format: binary + type: string + description: filtered user results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all assets. + summary: User inventory as CSV tags: - - Organization - /org/assets/{asset_id}: - delete: - operationId: removeAsset + - Export + /export/org/groups.json: + get: + operationId: exportDirectoryGroupsJSON parameters: - - description: UUID of the asset to remove - explode: false - in: path - name: asset_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: - "204": - description: empty response + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/DirectoryGroup" + type: array + description: filtered group results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Remove an asset. + summary: Exports the group inventory tags: - - Organization + - Export + /export/org/groups.jsonl: get: - operationId: getAsset + operationId: exportDirectoryGroupsJSONL parameters: - - description: UUID of the asset to retrieve - explode: false - in: path - name: asset_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Asset' - description: asset details + format: binary + type: string + description: filtered group results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Get asset details. + summary: Group inventory as JSON line-delimited tags: - - Organization - /org/assets/{asset_id}/comments: - patch: - operationId: updateAssetComments + - Export + /export/org/groups.csv: + get: + operationId: exportDirectoryGroupsCSV parameters: - - description: UUID of the asset to update - explode: false - in: path - name: asset_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AssetComments' - description: comments to apply to the asset - required: true + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: "200": content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/Asset' - description: asset details + format: binary + type: string + description: filtered group results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Update asset comments. + summary: Group inventory as CSV tags: - - Organization - /org/assets/{asset_id}/tags: - patch: - operationId: updateAssetTags + - Export + /export/org/findings.csv: + get: + operationId: exportFindingsCSV parameters: - - description: UUID of the agent to update - explode: false - in: path - name: asset_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AssetTags' - description: tags to apply to the asset - required: true + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: "200": content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/Asset' - description: asset details + format: binary + type: string + description: filtered findings "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Update asset tags. + summary: Export findings as CSV tags: - - Organization - /org/services: + - Export + /export/org/findings.json: get: - operationId: getServices + operationId: exportFindingsJSON parameters: - - description: an optional search string for filtering results + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax explode: true in: query name: search @@ -1127,77 +1496,101 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/Service' + $ref: "#/components/schemas/Finding" type: array - description: array of services + description: filtered findings "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all services. + summary: Export findings as JSON tags: - - Organization - /org/services/{service_id}: - delete: - operationId: removeService + - Export + /export/org/findings.jsonl: + get: + operationId: exportFindingsJSONL parameters: - - description: UUID of the service to remove - explode: false - in: path - name: service_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form responses: - "204": - description: empty response + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Finding" + type: array + description: filtered findings "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Remove a service. + summary: Export findings as JSON line-delimited tags: - - Organization + - Export + /export/org/subnet.stats.csv: get: - operationId: getService + operationId: exportSubnetUtilizationStatsCSV parameters: - - description: UUID of the service to retrieve - explode: false - in: path - name: service_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: an optional subnet mask size (ex:24) + explode: true + in: query + name: mask + required: false + schema: + type: string + style: form responses: "200": content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/Service' - description: service details + format: binary + type: string + description: subnet utilization stats as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Get service details. + summary: Subnet utilization statistics as as CSV tags: - - Organization - /org/wireless: + - Export + /export/org/snmp.arpcache.csv: get: - operationId: getWirelessLANs + operationId: exportSNMPARPCacheCSV parameters: - - description: an optional search string for filtering results + - description: The current Organization explode: true in: query - name: search + name: _oid required: false schema: type: string @@ -1205,78 +1598,119 @@ paths: responses: "200": content: - application/json: + text/csv: schema: - items: - $ref: '#/components/schemas/Wireless' - type: array - description: array of wireless LANs + format: binary + type: string + description: SNMP ARP cache data as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all wireless LANs. + summary: SNMP ARP cache data as CSV tags: - - Organization - /org/wirelesss/{wireless_id}: - delete: - operationId: removeWirelessLAN + - Export + /export/org/tasks.json: + get: + operationId: exportTasksJSON parameters: - - description: UUID of the wireless LAN to remove - explode: false - in: path - name: wireless_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: - "204": - description: empty response + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Task" + type: array + description: filtered task results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Remove a wireless LAN. + summary: Exports organization tasks tags: - - Organization + - Export + /export/org/tasks.jsonl: get: - operationId: getWirelessLAN + operationId: exportTasksJSONL parameters: - - description: UUID of the wireless LAN to retrieve - explode: false - in: path - name: wireless_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Wireless' - description: wireless details + format: binary + type: string + description: filtered task results "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get wireless LAN details. + summary: Organization tasks as JSON line-delimited tags: - - Organization - /org/tasks: + - Export + /org/assets/type.csv: get: - operationId: getTasks + operationId: exportAssetTopTypesCSV parameters: - - description: an optional status string for filtering results + - description: The current Organization explode: true in: query - name: status + name: _oid required: false schema: type: string @@ -1284,586 +1718,9259 @@ paths: responses: "200": content: - application/json: + text/csv: schema: - items: - $ref: '#/components/schemas/Task' - type: array - description: array of tasks + format: binary + type: string + description: top asset types and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get all tasks (last 1000). + summary: Top asset types as CSV tags: - - Organization - /org/tasks/{task_id}: + - Export + /org/assets/os.csv: get: - operationId: getTask + operationId: exportAssetTopOSCSV parameters: - - description: UUID of the task to retrieve - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form responses: "200": content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/Task' - description: task details + format: binary + type: string + description: top operating systems and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - security: - - bearerAuth: [] - summary: Get task details. + summary: Top asset operating systems as CSV tags: - - Organization - patch: - operationId: updateTask + - Export + /org/assets/hw.csv: + get: + operationId: exportAssetTopHWCSV parameters: - - description: UUID of the task to update - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - description: task object - required: true + style: form responses: "200": content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/Task' - description: task details + format: binary + type: string + description: top asset hardware platforms and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Update task parameters. + summary: Top asset hardware products as CSV tags: - - Organization - /org/tasks/{task_id}/data: + - Export + /org/assets/tags.csv: get: - operationId: getTaskScanData + operationId: exportAssetTopTagsCSV parameters: - - description: UUID of the task - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form responses: "200": - $ref: '#/components/schemas/URL' + content: + text/csv: + schema: + format: binary + type: string + description: top asset tags and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Returns a temporary task scan data url. + summary: Top asset tags as CSV tags: - - Organization - /org/tasks/{task_id}/changes: + - Export + /org/services/tcp.csv: get: - operationId: getTaskChangeReport + operationId: exportServicesTopTCPCSV parameters: - - description: UUID of the task - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form responses: "200": - $ref: '#/components/schemas/URL' + content: + text/csv: + schema: + format: binary + type: string + description: top TCP services and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Returns a temporary task change report data url. + summary: Top TCP services as CSV tags: - - Organization - /org/tasks/{task_id}/stop: - post: - operationId: stopTask + - Export + /org/services/udp.csv: + get: + operationId: exportServicesTopUDPCSV parameters: - - description: UUID of the task to stop - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form responses: "200": - $ref: '#/components/schemas/Task' + content: + text/csv: + schema: + format: binary + type: string + description: top UDP services and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": - description: Resource not found - security: - - bearerAuth: [] - summary: Signal that a task should be stopped or canceled. + summary: Top UDP services as CSV tags: - - Organization - /org/tasks/{task_id}/hide: - post: - operationId: hideTask + - Export + /org/services/protocols.csv: + get: + operationId: exportServicesTopProtocolsCSV parameters: - - description: UUID of the task to hide - explode: false - in: path - name: task_id - required: true + - description: The current Organization + explode: true + in: query + name: _oid + required: false schema: - format: uuid type: string - style: simple + style: form responses: "200": - $ref: '#/components/schemas/Task' + content: + text/csv: + schema: + format: binary + type: string + description: top service protocols and counts as csv "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Access token is missing or invalid - "404": + summary: Top service protocols as CSV + tags: + - Export + /org/services/products.csv: + get: + operationId: exportServicesTopProductsCSV + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/csv: + schema: + format: binary + type: string + description: top service products and counts as csv + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Top service products as CSV + tags: + - Export + /org/metrics: + get: + operationId: exportAssetMetricsJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + additionalProperties: + $ref: "#/components/schemas/AssetMetric" + type: object + description: asset metrics + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Export asset metrics + tags: + - Export + /org: + get: + operationId: getOrganization + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Organization" + description: organization details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get organization details + tags: + - Organization + patch: + operationId: updateOrganization + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrgOptions" + description: organization options + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Organization" + description: organization details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Update organization details + tags: + - Organization + /org/key: + delete: + operationId: removeKey + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove the current API key + tags: + - Organization + get: + operationId: getKey + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationAPIKey" + description: api key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get API key details + tags: + - Organization + /org/key/rotate: + patch: + operationId: rotateKey + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationAPIKey" + description: api key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Rotate the API key secret and return the updated key + tags: + - Organization + /org/agents: + get: + operationId: getAgents + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Agent" + type: array + description: array of agents + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all agents. Legacy path for /org/explorers + tags: + - Organization + /org/agents/{agent_id}: + delete: + operationId: removeAgent + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the agent to remove + explode: false + in: path + name: agent_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" description: Resource not found - security: - - bearerAuth: [] - summary: Signal that a completed task should be hidden. + summary: "Remove and uninstall an agent. Legacy path for /org/explorers/{explorer_id}" tags: - Organization -components: - responses: - UnauthorizedError: - description: Access token is missing or invalid - LicenseExpiredError: - description: License has expired - ProcessingError: - description: Request could not be processed - NotFoundError: - description: Resource not found - schemas: - ComponentVersion: - description: A component ID and version + get: + operationId: getAgent + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the agent + explode: false + in: path + name: agent_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + description: agent details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: "Get details for a single agent. Legacy path for /org/explorers/{explorer_id}" + tags: + - Organization + patch: + operationId: updateAgentSettings + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the agent to update + explode: false + in: path + name: agent_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AgentPatchedSettings" + description: The updated settings to apply to the agent + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + description: agent details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: "Update the settings associated with the agent. Legacy path for /org/explorers/{explorer_id}" + tags: + - Organization + /org/agents/{agent_id}/update: + post: + operationId: upgradeAgent + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the agent to update + explode: false + in: path + name: agent_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: "Force an agent to update and restart. Legacy path for /org/explorers/{explorer_id}/update" + tags: + - Organization + /org/explorers: + get: + description: Get all explorers. This is the same call as legacy path /org/agents + operationId: getExplorers + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Agent" + type: array + description: array of agents + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all explorers + tags: + - Organization + /org/explorers/{explorer_id}: + delete: + description: "Remove and uninstall an explorer. This is the same call as legacy\ + \ path /org/agents/{agent_id}" + operationId: removeExplorer + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the explorer to remove + explode: false + in: path + name: explorer_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove and uninstall an explorer + tags: + - Organization + get: + description: "Get details for a single explorer. This is the same call as legacy\ + \ path /org/agents/{agent_id}" + operationId: getExplorer + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the explorer + explode: false + in: path + name: explorer_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + description: explorer details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get details for a single explorer. + tags: + - Organization + patch: + description: "Update the settings associated with the Explorer. This is the\ + \ same call as legacy path /org/agents/{agent_id}" + operationId: updateExplorerSettings + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the explorer to update + explode: false + in: path + name: explorer_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AgentPatchedSettings" + description: The updated settings to apply to the Explorer + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + description: explorer details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update the settings associated with the Explorer + tags: + - Organization + /org/explorers/{explorer_id}/update: + post: + description: "Force an explorer to update and restart. This is the same call\ + \ as legacy path /org/agents/{agent_id}/update" + operationId: upgradeExplorer + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the explorer to update + explode: false + in: path + name: explorer_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Force an explorer to update and restart + tags: + - Organization + /org/hosted-zones: + get: + description: Get all hosted zones. Hosted Zones are only available to Enterprise + licensed customers. + operationId: getHostedZones + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/HostedZone" + type: array + description: array of hosted zones + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all hosted zones + tags: + - Organization + /org/hosted-zones/{hosted_zone_id}: + get: + description: Get details for a single Hosted Zone. Hosted Zones are only available + to Enterprise licensed customers. + operationId: getHostedZone + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the hosted zone + explode: false + in: path + name: hosted_zone_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/HostedZone" + description: hosted zone details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get details for a single hosted zone. + tags: + - Organization + /org/sites: + get: + operationId: getSites + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Site" + type: array + description: array of sites + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all sites + tags: + - Organization + put: + operationId: createSite + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SiteOptions" + description: site definition + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Site" + description: site details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new site + tags: + - Organization + /org/sites/{site_id}: + delete: + operationId: removeSite + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to remove + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove a site and associated assets + tags: + - Organization + get: + operationId: getSite + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Site" + description: site details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get site details + tags: + - Organization + patch: + operationId: updateSite + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to update + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SiteOptions" + description: site object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Site" + description: site details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update a site definition + tags: + - Organization + /org/sites/{site_id}/import: + put: + operationId: importScanData + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to import scan data into + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: import task + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + summary: Import a scan data file into a site + tags: + - Organization + /org/sites/{site_id}/import/nessus: + put: + operationId: importNessusScanData + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to import Nessus scan data into + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: import task + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + summary: Import a Nessus scan data file into a site + tags: + - Organization + /org/sites/{site_id}/import/packet: + put: + operationId: importPacketData + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to import packet capture into + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: import task + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + summary: Import a packet capture file into a site + tags: + - Organization + /org/sites/{site_id}/scan: + put: + operationId: createScan + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to scan + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ScanOptions" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: a created scan task + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + summary: Create a scan task for a given site + tags: + - Organization + /org/sites/{site_id}/sample: + put: + operationId: createSample + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID or name of the site to scan + explode: false + in: path + name: site_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SampleOptions" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: a created scan task + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + summary: Create a traffic sampling task for a given site + tags: + - Organization + /org/assets: + get: + operationId: getAssets + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Asset" + type: array + description: array of assets + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all assets + tags: + - Organization + /org/assets/{asset_id}: + delete: + operationId: removeAsset + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to remove + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove an asset + tags: + - Organization + get: + operationId: getAsset + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to retrieve + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Asset" + description: asset details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get asset details + tags: + - Organization + /org/assets/bulk/delete: + post: + operationId: removeBulkAssets + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetIDs" + description: list of asset IDs to remove + required: true + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Removes multiple assets by ID + tags: + - Organization + /org/assets/{asset_id}/comments: + patch: + operationId: updateAssetComments + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetComments" + description: comments to apply to the asset + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Asset" + description: asset details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update asset comments + tags: + - Organization + /org/assets/{asset_id}/tags: + patch: + operationId: updateAssetTags + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetTags" + description: tags to apply to the asset + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Asset" + description: asset details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update asset tags + tags: + - Organization + /org/assets/{asset_id}/criticality: + patch: + operationId: updateAssetCriticality + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetCriticality" + description: comments to apply to the asset + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Asset" + description: asset details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update asset criticality + tags: + - Organization + /org/assets/merge: + patch: + operationId: mergeAssets + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetIDs" + description: List of Asset IDs to merge + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" + description: Summary of operation results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Merge multiple assets + tags: + - Organization + /org/assets/bulk/tags: + patch: + operationId: updateBulkAssetTags + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetTagsWithSearch" + description: search query to filter and tags to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" + description: Summary of operation results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update tags across multiple assets based on a search query + tags: + - Organization + /org/assets/bulk/clearTags: + post: + operationId: clearBulkAssetTags + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SearchQuery" + description: search query to filter + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" + description: Summary of operation results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Clear all tags across multiple assets based on a search query + tags: + - Organization + /org/assets/bulk/criticality: + patch: + operationId: updateBulkAssetCriticality + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetCriticalityWithSearch" + description: search query to filter and criticality to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" + description: Summary of operation results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update criticality across multiple assets based on a search query + tags: + - Organization + /org/assets/{asset_id}/owners: + patch: + operationId: updateAssetOwners + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetOwnerships" + description: list of ownerships to apply to the asset + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Asset" + description: asset details + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Update asset owners + tags: + - Organization + /org/assets/bulk/owners: + patch: + operationId: updateBulkAssetOwners + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetOwnershipsWithSearch" + description: search query to filter and ownerships to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/BulkAssetUpdateResult" + description: updated asset count + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Update asset owners across multiple assets based on a search query + tags: + - Organization + /org/assets/bulk/clearOwners: + post: + operationId: clearBulkAssetOwners + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SearchQuery" + description: search query to filter + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/BulkAssetUpdateResult" + description: updated asset count + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Clear all owners across multiple assets based on a search query + tags: + - Organization + /org/custom-integrations/{custom_integration_id}/bulk/remove: + post: + operationId: bulkRemoveCustomIntegration + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: custom_integration_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetIDs" + description: list of asset IDs to remove + required: true + responses: + "204": + description: empty response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Remove custom integration from a list of assets + tags: + - Organization + /org/assets/{asset_id}/custom-integrations/{custom_integration_id}/remove: + delete: + operationId: removeCustomIntegration + parameters: + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + - description: UUID of the custom integration + explode: false + in: path + name: custom_integration_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Remove single custom integration from asset + tags: + - Organization + /org/assets/{asset_id}/sources/{source_id}/remove: + delete: + operationId: removeAssetSource + parameters: + - description: UUID of the asset to update + explode: false + in: path + name: asset_id + required: true + schema: + format: uuid + type: string + style: simple + - description: UUID of the source + explode: false + in: path + name: source_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Remove single source from asset + tags: + - Organization + /org/custom-integrations: + get: + operationId: getOrgCustomIntegrations + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: An array of all custom integrations + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Get all custom integrations + tags: + - Organization + /org/custom-integrations/{customIntegrationId}: + get: + operationId: getOrgCustomIntegration + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: customIntegrationId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The custom integration with given ID + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Get single custom integration + tags: + - Organization + /org/services: + get: + operationId: getServices + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Service" + type: array + description: array of services + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all services + tags: + - Organization + /org/services/{service_id}: + delete: + operationId: removeService + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the service to remove + explode: false + in: path + name: service_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove a service + tags: + - Organization + get: + operationId: getService + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the service to retrieve + explode: false + in: path + name: service_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Service" + description: service details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get service details + tags: + - Organization + /org/wireless: + get: + operationId: getWirelessLANs + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Wireless" + type: array + description: array of wireless LANs + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all wireless LANs + tags: + - Organization + /org/wireless/{wireless_id}: + delete: + operationId: removeWirelessLAN + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the wireless LAN to remove + explode: false + in: path + name: wireless_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove a wireless LAN + tags: + - Organization + get: + operationId: getWirelessLAN + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the wireless LAN to retrieve + explode: false + in: path + name: wireless_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Wireless" + description: wireless details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get wireless LAN details + tags: + - Organization + /org/tasks: + get: + operationId: getTasks + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional status string for filtering results + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Task" + type: array + description: array of tasks + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all tasks (last 1000) + tags: + - Organization + /org/tasks/{task_id}: + get: + operationId: getTask + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task to retrieve + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: task details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get task details + tags: + - Organization + patch: + operationId: updateTask + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task to update + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TaskOptions" + description: task object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: task details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Update task parameters + tags: + - Organization + /org/tasks/{task_id}/data: + get: + operationId: getTaskScanData + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "303": + content: + application/json: + schema: + $ref: "#/components/schemas/URL" + description: Redirection to scan data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Returns a temporary task scan data url + tags: + - Organization + /org/tasks/{task_id}/changes: + get: + operationId: getTaskChangeReport + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "303": + content: + application/json: + schema: + $ref: "#/components/schemas/URL" + description: Redirection to scan data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Returns a temporary task change report data url + tags: + - Organization + /org/tasks/{task_id}/log: + get: + operationId: getTaskLog + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "303": + content: + application/json: + schema: + $ref: "#/components/schemas/URL" + description: Redirection to scan data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Returns a temporary task log data url + tags: + - Organization + /org/tasks/{task_id}/stop: + post: + operationId: stopTask + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task to stop + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: task information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Signal that a task should be stopped or canceled.This will also remove + recurring and scheduled tasks + tags: + - Organization + /org/tasks/{task_id}/hide: + post: + operationId: hideTask + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: UUID of the task to hide + explode: false + in: path + name: task_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + description: task information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Signal that a completed task should be hidden + tags: + - Organization + /account/orgs: + get: + operationId: getAccountOrganizations + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Organization" + type: array + description: array of organizations + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all organization details + tags: + - Account + put: + operationId: createAccountOrganization + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrgOptions" + description: organization definition + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Organization" + description: organization details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new organization + tags: + - Account + /account/orgs/{org_id}: + delete: + operationId: removeAccountOrganization + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove this organization + tags: + - Account + get: + operationId: getAccountOrganization + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Organization" + description: organization information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get organization details + tags: + - Account + patch: + operationId: updateAccountOrganization + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrgOptions" + description: organization options + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Organization" + description: organization details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Update organization details + tags: + - Account + /account/orgs/{org_id}/exportToken: + delete: + deprecated: true + description: "This API has been deprecated. Please use `DELETE /account/orgs/{org_id}/exportTokens/{key_id}`\ + \ instead. This API will fail if more than one export tokens exist for the\ + \ given organization." + operationId: deleteAccountOrganizationExportTokenDeprecated + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Removes the export token from the specified organization + tags: + - Account + /account/orgs/{org_id}/exportToken/rotate: + patch: + deprecated: true + description: "This API has been deprecated. Please use `PATCH /account/orgs/{org_id}/exportTokens/{key_id}/rotate`\ + \ instead. This API will fail if more than one export tokens exist for the\ + \ given organization." + operationId: rotateAccountOrganizationExportTokenDeprecated + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ExportToken" + description: export token details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Rotates an organization export token and returns the updated token + tags: + - Account + /account/orgs/{org_id}/exportTokens: + get: + operationId: getAccountOrganizationExportTokens + parameters: + - description: UUID of the organization to retrieve export tokens for + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/ExportToken" + type: array + description: array of export tokens + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all active export tokens for an organization + tags: + - Account + post: + operationId: createAccountOrganizationExportToken + parameters: + - description: UUID of the organization to create an export token for + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ExportTokenOptions" + description: export token parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ExportToken" + description: export token details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new export token for an organization + tags: + - Account + /account/orgs/{org_id}/exportTokens/{key_id}: + delete: + operationId: deleteAccountOrganizationExportToken + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + - description: UUID of the export token ID to remove + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Removes the export token from the specified organization + tags: + - Account + get: + operationId: getAccountOrganizationExportToken + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + - description: UUID of the export token ID to retrieve + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ExportToken" + description: export token details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get export token details + tags: + - Account + /account/orgs/{org_id}/exportTokens/{key_id}/rotate: + patch: + operationId: rotateAccountOrganizationExportToken + parameters: + - description: UUID of the organization to retrieve + explode: false + in: path + name: org_id + required: true + schema: + format: uuid + type: string + style: simple + - description: UUID of the export token ID to rotate + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ExportToken" + description: export token details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Rotates an organization export token and returns the updated token + tags: + - Account + /account/license: + get: + operationId: getAccountLicense + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/License" + description: license information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get license details + tags: + - Account + /account/sites: + get: + operationId: getAccountSites + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Site" + type: array + description: array of sites + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all sites details across all organizations + tags: + - Account + /account/credentials: + get: + operationId: getAccountCredentials + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Credential" + type: array + description: array of credentials + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all account credentials + tags: + - Account + put: + operationId: createAccountCredential + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialOptions" + description: credential parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Credential" + description: credential details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new credential + tags: + - Account + /account/credentials/{credential_id}: + delete: + operationId: removeAccountCredential + parameters: + - description: UUID of the credential to delete + explode: false + in: path + name: credential_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Remove this credential + tags: + - Account + get: + operationId: getAccountCredential + parameters: + - description: UUID of the credential to retrieve + explode: false + in: path + name: credential_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Credential" + description: credential details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get credential details + tags: + - Account + /account/keys: + get: + operationId: getAccountKeys + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/OrganizationAPIKey" + type: array + description: array of keys + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all active API keys + tags: + - Account + put: + operationId: createAccountKey + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/APIKeyOptions" + description: key parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationAPIKey" + description: key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new key + tags: + - Account + /account/keys/{key_id}: + delete: + operationId: removeAccountKey + parameters: + - description: UUID of the key to retrieve + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove this key + tags: + - Account + get: + operationId: getAccountKey + parameters: + - description: UUID of the key to retrieve + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationAPIKey" + description: api key information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get key details + tags: + - Account + /account/keys/{key_id}/rotate: + patch: + operationId: rotateAccountKey + parameters: + - description: UUID of the key to retrieve + explode: false + in: path + name: key_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrganizationAPIKey" + description: key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Rotates the key secret + tags: + - Account + /account/events.json: + get: + operationId: exportEventsJSON + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "an optional list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The value to use for requesting the next page when requesting + paginated results. This should be the value of the `next_key` attribute + returned in the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventExportResponse" + description: "Filtered event results. " + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: System event log as JSON + tags: + - Account + /account/events.jsonl: + get: + operationId: exportEventsJSONL + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "an optional list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: filtered event results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: System event log as JSON line-delimited + tags: + - Account + /account/tasks: + get: + operationId: getAccountTasks + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Task" + type: array + description: array of tasks + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all task details across all organizations (up to 1000) + tags: + - Account + /account/tasks/templates: + get: + operationId: getAccountScanTemplates + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/ScanTemplate" + type: array + description: array of scan templates + "422": + description: failed to parse search string + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all scan templates across all organizations (up to 1000) + tags: + - Account + post: + operationId: createAccountScanTemplate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplateOptions" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplate" + description: scan template + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + summary: Create a new scan template + tags: + - Account + put: + operationId: updateAccountScanTemplate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplate" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplate" + description: scan template + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "404": + description: scan template or permissions not found + summary: Update scan template + tags: + - Account + /account/tasks/templates/{scan_template_id}: + delete: + operationId: removeAccountScanTemplate + parameters: + - description: UUID of the scan template to remove + explode: false + in: path + name: scan_template_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplate" + description: scan template + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "422": + description: invalid request + "404": + description: scan template not found + summary: Remove scan template + tags: + - Account + get: + operationId: getAccountScanTemplate + parameters: + - description: UUID of the scan template to retrieve + explode: false + in: path + name: scan_template_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScanTemplate" + description: scan template + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "422": + description: invalid scan template id + "404": + description: scan template not found + summary: Get scan template details + tags: + - Account + /account/agents: + get: + operationId: getAccountAgents + parameters: + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/Agent" + type: array + description: array of tasks + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all agents across all organizations + tags: + - Account + /account/users: + get: + operationId: getAccountUsers + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/User" + type: array + description: array of users + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all users + tags: + - Account + put: + operationId: createAccountUser + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserOptions" + description: user parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new user account + tags: + - Account + /account/users/invite: + put: + operationId: createAccountUserInvite + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserInviteOptions" + description: user invite parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: key details + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Create a new user account and send an email invite + tags: + - Account + /account/users/{user_id}: + delete: + operationId: removeAccountUser + parameters: + - description: UUID of the user to delete + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove this user + tags: + - Account + get: + operationId: getAccountUser + parameters: + - description: UUID of the user to retrieve + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: user information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get user details + tags: + - Account + patch: + operationId: updateAccountUser + parameters: + - description: UUID of the user to retrieve + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserOptions" + description: user parameters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: user information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Update a user's details + tags: + - Account + /account/users/{user_id}/resetMFA: + patch: + operationId: resetAccountUserMFA + parameters: + - description: UUID of the user to retrieve + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: user information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Resets the user's MFA tokens + tags: + - Account + /account/users/{user_id}/resetLockout: + patch: + operationId: resetAccountUserLockout + parameters: + - description: UUID of the user to retrieve + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: user information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Resets the user's lockout status + tags: + - Account + /account/users/{user_id}/resetPassword: + patch: + operationId: resetAccountUserPassword + parameters: + - description: UUID of the user to retrieve + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: user information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Sends the user a password reset email + tags: + - Account + /account/groups: + get: + operationId: getAccountGroups + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all groups + tags: + - Account + post: + operationId: createAccountGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupPost" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Create a new group + tags: + - Account + put: + operationId: updateAccountGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupPut" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Update an existing group + tags: + - Account + /account/groups/{group_id}: + delete: + operationId: removeAccountGroup + parameters: + - description: UUID of the group + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove this group + tags: + - Account + get: + operationId: getAccountGroup + parameters: + - description: UUID of the group + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get group details + tags: + - Account + /account/sso/groups: + get: + operationId: getAccountGroupMappings + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + description: group mapping information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Get all SSO group mappings + tags: + - Account + post: + operationId: createAccountGroupMapping + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Create a new SSO group mapping + tags: + - Account + put: + operationId: updateAccountGroupMapping + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Update an existing SSO group mapping + tags: + - Account + /account/sso/groups/{group_mapping_id}: + delete: + operationId: removeAccountGroupMapping + parameters: + - description: UUID of the SSO group mapping + explode: false + in: path + name: group_mapping_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: empty response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Remove this SSO group mapping + tags: + - Account + get: + operationId: getAccountGroupMapping + parameters: + - description: UUID of the SSO group mapping + explode: false + in: path + name: group_mapping_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMapping" + description: group information + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + summary: Get SSO group mapping details + tags: + - Account + /account/assets/ownership-types: + delete: + operationId: deleteAccountAssetOwnershipTypes + requestBody: + content: + application/json: + schema: + example: + - 2318e078-4164-4e1b-92a5-11e353093f4b + - a352c76b-0eb7-4dab-adea-66e8b6016565 + items: + type: string + type: array + description: Array of ids + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of remaining asset ownership types + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Delete asset ownership types + tags: + - Account + get: + operationId: getAccountAssetOwnershipTypes + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of asset ownership types + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Get all asset ownership types + tags: + - Account + post: + operationId: createAccountAssetOwnershipTypes + requestBody: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipTypePost" + type: array + description: array of asset ownership types + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of asset ownership types + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Create new asset ownership types + tags: + - Account + put: + operationId: updateAccountAssetOwnershipTypes + requestBody: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of asset ownership types + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of asset ownership types + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Update asset ownership types + tags: + - Account + /account/assets/ownership-types/{ownership_type_id}: + delete: + operationId: deleteAccountAssetOwnershipType + parameters: + - description: UUID of the asset ownership type + explode: false + in: path + name: ownership_type_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetOwnershipType" + type: array + description: array of remaining asset ownership types + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Delete a single asset ownership type + tags: + - Account + patch: + operationId: updateAccountAssetOwnershipType + parameters: + - description: UUID of the asset ownership type + explode: false + in: path + name: ownership_type_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AssetOwnershipTypePost" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AssetOwnershipType" + description: updated asset ownership type + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Update a single asset ownership type + tags: + - Account + /account/custom-integrations: + get: + operationId: getAccountCustomIntegrations + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: An array of all custom integrations + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Get all custom integrations + tags: + - Account + post: + operationId: createAccountCustomIntegration + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegrationCreate" + description: The description of the custom integration + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The custom integration created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Create a new custom integration + tags: + - Account + /account/custom-integrations/{customIntegrationId}: + delete: + operationId: deleteAccountCustomIntegration + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: customIntegrationId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The deleted custom integration + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Delete an custom integration + tags: + - Account + get: + operationId: getAccountCustomIntegration + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: customIntegrationId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The custom integration with given ID + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Get single custom integration + tags: + - Account + patch: + operationId: updateAccountCustomIntegration + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: customIntegrationId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BaseCustomIntegration" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The updated custom integration + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Update a single custom integration + tags: + - Account + put: + operationId: createAccountCustomIntegrationAndID + parameters: + - description: UUID of the custom integration + explode: false + in: path + name: customIntegrationId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegrationCreate" + description: single custom integration type + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomIntegration" + description: The updated custom integration + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + summary: Replace custom integration at provided ID + tags: + - Account + /account/api/token: + post: + operationId: getAPIToken + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: "#/components/schemas/ClientIDForm" + description: Client ID and secret + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessToken" + description: An access token + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Generate an access token using an API client + tags: + - Account + /account/api/rotate: + post: + operationId: rotateAPIToken + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: "#/components/schemas/ClientIDForm" + description: Client ID and secret + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/APIClientCredentials" + description: Client details with an updated api_client_secret value + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Rotate the API client secret + tags: + - Account + /export/org/assets/sync/created/assets.json: + get: + operationId: splunkAssetSyncCreatedJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "an optional list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: an optional unix timestamp to use as a checkpoint + explode: true + in: query + name: since + required: false + schema: + example: 1576300370 + format: int64 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AssetsWithCheckpoint" + description: filtered asset results with a checkpoint wrapper + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Exports the asset inventory in a sync-friendly manner using created_at + as a checkpoint. Requires the Splunk entitlement. + tags: + - Splunk + /export/org/assets/sync/updated/assets.json: + get: + operationId: splunkAssetSyncUpdatedJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "an optional list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: an optional unix timestamp to use as a checkpoint + explode: true + in: query + name: since + required: false + schema: + example: 1576300370 + format: int64 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AssetsWithCheckpoint" + description: filtered asset results with a checkpoint wrapper + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Exports the asset inventory in a sync-friendly manner using updated_at + as a checkpoint. Requires the Splunk entitlement. + tags: + - Splunk + /export/org/assets.servicenow.csv: + get: + operationId: snowExportAssetsCSV + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/csv: + schema: + format: binary + type: string + description: asset export + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Export an asset inventory as CSV for ServiceNow integration + tags: + - ServiceNow + /export/org/assets.servicenow.json: + get: + operationId: snowExportAssetsJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetServiceNow" + type: array + description: filtered asset results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Exports the asset inventory as JSON + tags: + - ServiceNow + /export/org/services.servicenow.csv: + get: + operationId: snowExportServicesCSV + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/csv: + schema: + format: binary + type: string + description: services export + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Export a service inventory as CSV for ServiceNow integration + tags: + - ServiceNow + /export/org/assets.servicegraph.json: + get: + operationId: snowServiceGraphExportAssetsJSON + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/AssetServiceNow" + type: array + description: filtered asset results + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + summary: Exports the asset inventory as JSON + tags: + - ServiceNow + /export/org/assets.cisco.csv: + get: + operationId: exportAssetsCiscoCSV + parameters: + - description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + - description: an optional search string for filtering results + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/csv: + schema: + format: binary + type: string + description: filtered asset results + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + summary: Cisco serial number and model name export for Cisco Smart Net Total + Care Service. + tags: + - Cisco SNTC +components: + parameters: + orgID: + description: The current Organization + explode: true + in: query + name: _oid + required: false + schema: + type: string + style: form + search: + description: A search query in runZero search query syntax + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + fields: + description: "A list of fields to export, comma-separated" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + pageSize: + description: The number of results to return per request. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + startKey: + description: The value to use for requesting the next page when requesting paginated + results. This should be the value of the `next_key` attribute returned in + the previous response. + explode: true + in: query + name: start_key + required: false + schema: + type: string + style: form + responses: + UnauthorizedError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Access token is missing or invalid + LicenseExpiredError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: License has expired + ProcessingError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Request could not be processed + NotFoundError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Resource not found + InternalServerError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Unexpected error occurred on the server + NotAllowedForLicenseError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Action not allowed for this license type + InvalidRequestBodyError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request body + InvalidRequestParamError: + content: + application/json: + schema: + $ref: "#/components/schemas/Problem" + description: Invalid request parameter + StatusMessage: + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" + description: Summary of operation results + schemas: + OperationStatus: + description: Summary of the result of a bulk or asynchronous operation. + type: object + Problem: + description: | + RFC7807 Problem JSON object from https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml without the standard 'type' and 'instance' fields. + example: + detail: A human readable explanation specific to this occurrence of the problem. + title: A short summary of the problem type. + status: 140 + properties: + title: + description: | + A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + example: A short summary of the problem type. + type: string + status: + description: | + The HTTP status code generated by the origin server for this occurrence of the problem. + exclusiveMaximum: true + format: int32 + maximum: 600 + minimum: 100 + type: integer + detail: + description: | + A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + example: A human readable explanation specific to this occurrence of the + problem. + type: string + type: object + AWSCredentialFields: + example: + regions: "us-west-1, us-east-2" + role: runzero-role + use_cross_account_org: "true" + access_key: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + secret_access_key: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + properties: + access_key: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + secret_access_key: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + regions: + example: "us-west-1, us-east-2" + format: string + type: string + use_cross_account_org: + example: "true" + format: string + type: string + role: + example: runzero-role + format: string + type: string + required: + - access_key + - secret_access_key + type: object + AzureClientSecretCredentialFields: + properties: + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + client_secret: + example: abcde~abcdefghiklmnopqrstuvwx_yz123456-7 + format: string + type: string + tenant_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + environment: + enum: + - global + - gcc + - gcc_high + - dod + example: global + format: string + type: string + multi_subscription: + example: "true" + format: string + type: string + subscription_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + required: + - client_id + - client_secret + - environment + - tenant_id + type: object + AzureUsernamePasswordCredentialFields: + properties: + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + tenant_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + username: + example: user@example.com + format: string + type: string + password: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + required: + - client_id + - password + - tenant_id + - username + type: object + CensysCredentialFields: + properties: + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + client_secret: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + api_url: + example: https://search.censys.io + format: string + type: string + required: + - client_id + - client_secret + type: object + Certificate: + example: + public_key: public_key + hidden: true + key_usage: + - key_usage + - key_usage + signature: signature + subject: subject + created_at: 1576300370 + type: x509 + san_uris: + - https://openapi-generator.tech + - https://openapi-generator.tech + validity_end: 1576300370 + issuer: issuer + fp_sha1: fp_sha1 + subject_key_id: subject_key_id + ocsp_server: + - http://example.com/aeiou + - http://example.com/aeiou + updated_at: 1576300370 + public_key_bits: 2048 + signature_algorithm: sha256WithRSAEncryption + public_key_parameters: "{}" + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + self_signed: true + san_dns_names: + - san_dns_names + - san_dns_names + fp_sha256: fp_sha256 + issuing_certificate_url: + - http://example.com/aeiou + - http://example.com/aeiou + fp_bkhash: fp_bkhash + cn: www.example.com + san_ip_addresses: + - san_ip_addresses + - san_ip_addresses + fp_md5: fp_md5 + version: 0 + is_ca: true + san_email_addresses: + - san_email_addresses + - san_email_addresses + crl_distribution_points: + - http://example.com/aeiou + - http://example.com/aeiou + names: + - "CN=server,OU=Dept,O=Company" + - "CN=server,OU=Dept,O=Company" + authority_key_id: authority_key_id + serial: 03beffa48e31b95581b0ebb0b1b3fe5ada9c + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + validity_start: 1576300370 + public_key_algorithm: rsaEncryption + ext_key_usage: + - ext_key_usage + - ext_key_usage + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + type: + enum: + - x509 + - ssh + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + description: "When the certificate was last seen in a response from a service,\ + \ and updated." + example: 1576300370 + format: int64 + type: integer + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + names: + description: An assembled list of all names in the certificate. + items: + example: "CN=server,OU=Dept,O=Company" + type: string + type: array + self_signed: + description: Whether the certificate appears to be self-signed based on + subject and authority. + type: boolean + hidden: + description: Whether the certificate has been hidden from the default certificates + view. + type: boolean + serial: + description: The serial number of the certificate. + example: 03beffa48e31b95581b0ebb0b1b3fe5ada9c + format: string + type: string + validity_start: + description: When the certificate becomes valid. + example: 1576300370 + format: int64 + type: integer + validity_end: + description: When the certificate ceases to be valid. + example: 1576300370 + format: int64 + type: integer + public_key: + format: base64 + type: string + public_key_bits: + example: 2048 + format: int32 + type: integer + public_key_algorithm: + example: rsaEncryption + format: string + type: string + signature: + format: base64 + type: string + signature_algorithm: + example: sha256WithRSAEncryption + format: string + type: string + fp_bkhash: + description: The badkeys hash. + format: string + type: string + fp_sha1: + description: The SHA1 hash of the certificate. + format: string + type: string + fp_sha256: + description: The SHA256 hash of the certificate. + format: string + type: string + fp_md5: + description: The MD5 hash of the certificate (for SSH). + format: string + type: string + subject: + description: The subject of the certificate. + format: dn + type: string + cn: + description: The Common Name field from the certificate (no longer used + by web browsers). + example: www.example.com + format: string + type: string + version: + description: The version of the certificate. + format: int32 + type: integer + issuer: + description: The authority which issued the certificate. + format: dn + type: string + subject_key_id: + description: The key ID of the subject of the certificate. + format: string + type: string + authority_key_id: + description: The key ID of the authority which signed the certificate. + format: string + type: string + ocsp_server: + description: Zero or more OCSP server URLs. + items: + format: url + type: string + type: array + crl_distribution_points: + description: Zero or more URLs of CRLs. + items: + format: url + type: string + type: array + issuing_certificate_url: + description: Zero or more URLs where the issuing certificate can be found. + items: + format: url + type: string + type: array + is_ca: + description: Whether the certificate claims to be a Certificate Authority. + type: boolean + key_usage: + description: Valid purposes the certificate's key can be used for. + items: + type: string + type: array + ext_key_usage: + description: Additional purposes the certificate's key can be used for. + items: + type: string + type: array + san_dns_names: + description: Subject Alternative Name hostnames. + items: + format: hostname + type: string + type: array + san_ip_addresses: + description: Subject Alternative Name IP addresses. + items: + nullable: true + type: string + type: array + san_email_addresses: + description: Subject Alternative Name email addresses. + items: + format: email + type: string + type: array + san_uris: + description: Subject Alternative Name URIs. + items: + format: uri + type: string + type: array + public_key_parameters: + description: Parameters specific to the public key type. + type: object + required: + - id + - organization_id + type: object + CrowdstrikeCredentialFields: + properties: + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + client_secret: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + api_url: + example: example.crowdstrike.com + format: string + type: string + required: + - api_url + - client_id + - client_secret + type: object + CustomIntegrationScriptCredentialFields: + properties: + access_key: + format: string + type: string + access_secret: + format: string + type: string + required: + - access_key + - access_secret + type: object + Finding: + example: + risk_rank_value: 2 + description: description + created_at: 0 + solution: solution + updated_at: 6 + risk_rank: risk_rank + organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + finding_code: finding_code + name: name + links: + urls: + - title: title + url: url + - title: title + url: url + rz_blog: + - title: title + url: url + - title: title + url: url + cves: + - title: title + url: url + - title: title + url: url + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + category: category + last_detected_at: 1 + instance_count: 5 + properties: + id: + format: uuid + type: string + category: + format: string + type: string + organization_id: + format: uuid + type: string + finding_code: + description: A runZero-assigned code for the finding. + type: string + name: + description: The title of the finding. + type: string + description: + description: Additional information about the finding. + type: string + solution: + description: Remediation information. + type: string + links: + $ref: "#/components/schemas/FindingLinks" + created_at: + format: int64 + type: integer + updated_at: + format: int64 + type: integer + last_detected_at: + format: int64 + type: integer + instance_count: + format: int64 + type: integer + risk_rank: + type: string + risk_rank_value: + description: "0 = info, 4 = critical" + format: int32 + maximum: 4 + minimum: 0 + type: integer + required: + - id + - organization_id + type: object + GCPCredentialFields: + properties: + cross_project: + example: "false" + format: string + type: string + auth_provider_x509_cert_url: + example: https://www.googleapis.com/oauth2/v1/certs + format: string + type: string + auth_uri: + example: https://accounts.google.com/o/oauth2/auth + format: string + type: string + client_email: + example: example@example.iam.gserviceaccount.com + format: string + type: string + client_id: + example: "111111111111111111111" + format: string + type: string + client_x509_cert_url: + example: https://www.googleapis.com/robot/v1/metadata/x509/example.iam.gserviceaccount.com + format: string + type: string + private_key: + description: "base64 encoded private key, beginning with -----BEGIN PRIVATE\ + \ KEY-----" + format: string + type: string + private_key_id: + example: "1111111111111111111111111111111111111111" + format: string + type: string + project_id: + example: example + format: string + type: string + token_uri: + example: https://oauth2.googleapis.com/token + format: string + type: string + type: + example: service_account + format: string + type: string + universe_domain: + example: googleapis.com + format: string + type: string + type: object + GoogleWorkspaceCredentialFields: + properties: + delegate: + example: adminexample@example.com + format: string + type: string + customer_id: + format: string + type: string + auth_provider_x509_cert_url: + example: https://www.googleapis.com/oauth2/v1/certs + format: string + type: string + auth_uri: + example: https://accounts.google.com/o/oauth2/auth + format: string + type: string + client_email: + example: example@example.iam.gserviceaccount.com + format: string + type: string + client_id: + example: "111111111111111111111" + format: string + type: string + client_x509_cert_url: + example: https://www.googleapis.com/robot/v1/metadata/x509/example.iam.gserviceaccount.com + format: string + type: string + private_key: + description: "base64 encoded private key, beginning with -----BEGIN PRIVATE\ + \ KEY-----" + format: string + type: string + private_key_id: + example: "1111111111111111111111111111111111111111" + format: string + type: string + project_id: + example: example + format: string + type: string + token_uri: + example: https://oauth2.googleapis.com/token + format: string + type: string + type: + example: service_account + format: string + type: string + universe_domain: + example: googleapis.com + format: string + type: string + required: + - delegate + type: object + InsightVMCredentialFields: + properties: + api_url: + example: https://ivm.example:3780 + format: string + type: string + username: + example: admin + format: string + type: string + password: + example: pass + format: string + type: string + insecure: + example: "true" + format: string + type: string + thumbprints: + format: string + type: string + required: + - api_url + - password + - username + type: object + LDAPCredentialFields: + properties: + url: + example: ldap://example.com:389 + format: string + type: string + username: + example: admin + format: string + type: string + password: + example: pass + format: string + type: string + base_dn: + example: "dc=example,dc=com" + format: string + type: string + insecure: + example: "true" + format: string + type: string + legacy_tls: + example: "false" + format: string + type: string + thumbprints: + format: string + type: string + required: + - base_dn + - password + - url + - username + type: object + MECMCredentialFields: + properties: + db_connection_string: + format: string + type: string + required: + - db_connection_string + type: object + MirakiCredentialFields: + properties: + api_url: + format: string + type: string + api_key: + format: string + type: string + required: + - api_key + - api_url + type: object + MiradoreCredentialFields: + properties: + hostname: + example: yourcompanyinc.online.miradore.com + format: string + type: string + api_key: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + required: + - api_key + - hostname + type: object + NessusCredentialFields: + properties: + api_url: + format: string + type: string + access_key: + format: string + type: string + secret_key: + format: string + type: string + insecure: + example: "false" + format: string + type: string + thumbprints: + format: string + type: string + required: + - access_key + - api_url + - secret_key + type: object + NetboxCredentialFields: + properties: + api_url: + format: string + type: string + api_key: + format: string + type: string + required: + - api_key + - api_url + type: object + PaloAltoFirewallCredentialFields: + properties: + api_key: + format: string + type: string + required: + - api_key + type: object + QualysCredentialFields: + properties: + api_url: + format: string + type: string + username: + format: string + type: string + password: + format: string + type: string + required: + - api_url + - password + - username + type: object + SentinelOneCredentialFields: + properties: + api_url: + format: string + type: string + api_key: + format: string + type: string + required: + - api_key + - api_url + type: object + ShodanCredentialFields: + properties: + api_key: + format: string + type: string + required: + - api_key + type: object + SNMPv2CommunitiesCredentialFields: + properties: + community: + example: "public,private" + format: string + type: string + required: + - community + type: object + SNMPv3CredentialFields: + properties: + username: + example: user + format: string + type: string + context: + example: vlan-32 + format: string + type: string + auth-protocol: + example: sha + format: string + type: string + auth-passphrase: + example: authpass + format: string + type: string + privacy-protocol: + example: aes + format: string + type: string + privacy-passphrase: + example: privpass + format: string + type: string + required: + - username + type: object + TaniumCredentialFields: + properties: + api_url: + format: string + type: string + api_token: + format: string + type: string + required: + - api_token + - api_url + type: object + TenableIoCredentialFields: + properties: + api_url: + format: string + type: string + access_key: + format: string + type: string + secret_key: + format: string + type: string + required: + - access_key + - api_url + - secret_key + type: object + TenableScCredentialFields: + properties: + api_url: + format: string + type: string + access_key: + format: string + type: string + secret_key: + format: string + type: string + insecure: + example: "false" + format: string + type: string + thumbprints: + format: string + type: string + required: + - access_key + - api_url + - secret_key + type: object + VMwareCredentialFields: + properties: + username: + example: user + format: string + type: string + password: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: string + type: string + insecure: + example: "true" + format: string + type: string + thumbprints: + example: IP=SHA256:B64HASH + format: string + type: string + required: + - password + - username + type: object + WizCredentialFields: + properties: + auth_url: + example: https://auth.app.wiz.io/ + format: string + type: string + api_url: + format: string + type: string + client_id: + format: string + type: string + client_secret: + format: string + type: string + required: + - api_url + - auth_url + - client_id + - client_secret + type: object + X509CredentialFields: + properties: + x509_certificate: + format: string + type: string + private_key: + format: string + type: string + required: + - private_key + - x509_certificate + type: object + ComponentVersion: + description: A component ID and version + example: + id: agent + version: 1.0.0 + properties: + id: + example: agent + format: string + type: string + version: + example: 1.0.0 + format: string + type: string + required: + - id + - version + type: object + HealthCheckResponse: + description: A health check response and version + example: + version: 3.0.0 + status: ok + properties: + status: + example: ok + format: string + type: string + version: + example: 3.0.0 + format: string + type: string + required: + - status + - version + type: object + URL: + description: A URL to a resource + example: + url: https://www.runzero.com/docs/ + properties: + url: + example: https://www.runzero.com/docs/ + format: url + type: string + required: + - url + type: object + SampleOptions: + description: Options which can be set to create or modify traffic sampling. + example: + agent: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + interfaces: "eth0,wlan0" + excludes: excludes + explorer: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + targets: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 + tags: owner=IT location=Texas + properties: + explorer: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + agent: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + targets: + example: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 + type: string + excludes: + type: string + tags: + example: owner=IT location=Texas + type: string + interfaces: + example: "eth0,wlan0" + type: string + required: + - interfaces + type: object + ScanOptions: + description: Options which can be set to create or modify a scan. + example: + agent: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + excludes: excludes + host-ping-probes: "arp, echo, syn, connect, netbios, snmp, ntp, sunrpc, ike,\ + \ openvpn, mdns" + scan-description: Scan of Wireless + host-ping: "false" + targets: defaults + scan-template: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + screenshots: "true" + max-host-rate: "100" + scan-frequency: hourly + passes: "3" + subnet-ping: "true" + rate: "10000" + hosted-zone-id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + max-attempts: "3" + tos: "255" + probes: "arp,bacnet,connect,dns,echo,ike,ipmi,mdns,memcache,mssql,natpmp,netbios,pca,rdns,rpcbind,sip,snmp,ssdp,syn,ubnt,wlan-list,wsd" + scan-start: "0" + scan-tags: owner=IT location=Texas + tcp-ports: "1-1000,5000-6000" + subnet-ping-net-size: "256" + subnet-ping-sample-rate: "3" + max-group-size: "4096" + hosted-zone-name: auto + scan-name: My Scan + subnet-ping-probes: "arp, echo, syn, connect, netbios, snmp, ntp, sunrpc,\ + \ ike, openvpn, mdns" + max-sockets: "500" + nameservers: 8.8.8.8 + explorer-group-id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + tcp-excludes: "9500" + scan-grace-period: "4" + explorer: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + max-ttl: "255" + properties: + targets: + example: defaults + type: string + excludes: + type: string + scan-name: + example: My Scan + type: string + scan-description: + description: A description of the scan. + example: Scan of Wireless + type: string + scan-template: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + scan-frequency: + description: "A string time duration value representing execution frequency,\ + \ if scheduled to repeat." + enum: + - once + - hourly + - daily + - weekly + - monthly + - continuous + example: hourly + type: string + scan-start: + description: Unix timestamp value indicating when the template was created. + example: "0" + type: string + scan-tags: + example: owner=IT location=Texas + type: string + scan-grace-period: + example: "4" + type: string + agent: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + explorer: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + explorer-group-id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + hosted-zone-id: + description: "The string 'auto' will use any available hosted zone. Otherwise,\ + \ provide the string name (hostedzone1) or UUID (\"e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8\"\ + ) of a hosted zone." + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: string + hosted-zone-name: + description: "The string 'auto' will use any available hosted zone. Otherwise,\ + \ provide the string name (hostedzone1) of the hosted zone." + example: auto + type: string + rate: + example: "10000" + type: string + max-host-rate: + example: "100" + type: string + passes: + example: "3" + type: string + max-attempts: + example: "3" + type: string + max-sockets: + example: "500" + type: string + max-group-size: + example: "4096" + type: string + max-ttl: + example: "255" + type: string + tos: + example: "255" + type: string + tcp-ports: + example: "1-1000,5000-6000" + type: string + tcp-excludes: + example: "9500" + type: string + screenshots: + example: "true" + type: string + nameservers: + example: 8.8.8.8 + type: string + subnet-ping: + example: "true" + type: string + subnet-ping-net-size: + example: "256" + type: string + subnet-ping-probes: + description: Optional subnet ping probe list as comma separated strings. + The example shows possibilities. + example: "arp, echo, syn, connect, netbios, snmp, ntp, sunrpc, ike, openvpn,\ + \ mdns" + type: string + subnet-ping-sample-rate: + example: "3" + type: string + host-ping: + example: "false" + type: string + host-ping-probes: + description: Optional host ping probe list as comma separated strings. The + example shows possibilities. + example: "arp, echo, syn, connect, netbios, snmp, ntp, sunrpc, ike, openvpn,\ + \ mdns" + type: string + probes: + description: "Optional probe list, otherwise all probes are used" + example: "arp,bacnet,connect,dns,echo,ike,ipmi,mdns,memcache,mssql,natpmp,netbios,pca,rdns,rpcbind,sip,snmp,ssdp,syn,ubnt,wlan-list,wsd" + type: string + required: + - targets + type: object + ScanTemplateOptions: + description: Options which can be set to create a scan template. + example: + organization_id: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + name: My Scan Template + description: My Scan Template + global: false + acl: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + params: + key: params + properties: + name: + description: Name of the template. + example: My Scan Template + type: string + description: + description: Description of the template. + example: My Scan Template + type: string + organization_id: + description: The ID of the organization the template will be created in + example: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + format: uuid + type: string + params: + additionalProperties: + type: string + description: A number of scan parameter values. Currently there is no authoritative + list of acceptable values. See existing templates for examples. + type: object + global: + description: Whether the template is globally available to all organizations. + example: false + type: boolean + acl: + additionalProperties: true + description: A map of IDs to strings which describe how the template may + be accessed. Currently there is no authoritative list of acceptable values. + See existing templates for examples. + example: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + type: object + required: + - acl + - global + - name + - organization_id + type: object + ScanTemplate: + description: A scan task template + example: + agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hidden: false + description: My Scan Template + created_at: 1576300370 + global: false + acl: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + type: scan + error: agent unavailable + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + cruncher_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + updated_at: 1576300370 + stats: + key: "" + recur: false + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + size_site: 0 + recur_last: 1576300370 + custom_integration_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + recur_last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hosted_zone_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + params: + key: params + created_by: user@example.com + created_by_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + size_results: 0 + grace_period: "4" + start_time: 1576300370 + linked_task_count: 1 + recur_frequency: hourly + parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + name: My Scan Template + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + template_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + source_id: "1" + size_data: 0 + recur_next: 1576300370 + status: processed + properties: + id: + description: ID of the template. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + name: + description: The name of the template. + example: My Scan Template + type: string + description: + description: The description of the template. + example: My Scan Template + type: string + client_id: + description: ID of the account which owns the template. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + organization_id: + description: ID of the organization the template is available in. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + agent_id: + description: ID of the explorer which may execute the template. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + description: ID of the site the template is being used in. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + cruncher_id: + description: ID of the runZero cruncher the task is executing on. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + description: Unix timestamp value indicating when the template was created. + example: 1576300370 + format: int64 + type: integer + created_by: + description: The username of the account which created the template. + example: user@example.com + type: string + created_by_user_id: + description: The ID of the account which created the template. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + updated_at: + description: Unix timestamp value indicating when the template was last + modified. + example: 1576300370 + format: int64 + type: integer + type: + description: The type of task the template creates. + example: scan + type: string + status: + description: The status of the last task using the template. + example: processed + type: string + error: + description: "The error message, if any, of the last task using the template." + example: agent unavailable + type: string + params: + additionalProperties: + type: string + description: A number of task parameter values. Currently there is no authoritative + list of in-use values. See existing templates for examples. + type: object + stats: + additionalProperties: true + description: A map of statistics about the last task executed with the template. + Currently there is no authoritative list of in-use values. See existing + templates for examples. + type: object + hidden: + description: A flag indicating whether the item is hidden from common view. + example: false + type: boolean + parent_id: + description: The ID of the parent entity of the task scheduled. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + recur: + description: A flag representing whether derived tasks are scheduled to + repeat. + example: false + type: boolean + recur_frequency: + description: | + A string time duration value representing execution frequency, if scheduled to repeat. You may use + values including as once, hourly, daily, weekly, monthly, continuous + example: hourly + type: string + start_time: + description: Unix timestamp representing the next execution time. + example: 1576300370 + format: int64 + type: integer + recur_last: + description: Unix timestamp representing the last execution if scheduled + to repeat. + example: 1576300370 + format: int64 + type: integer + recur_next: + description: Unix timestamp representing the next execution if scheduled + to repeat. + example: 1576300370 + format: int64 + type: integer + recur_last_task_id: + description: The ID of the task that last executed if scheduled to repeat. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + grace_period: + description: Additional time beyond hard expiration deadline by which the + task may still be allowed to execute. + example: "4" + type: string + custom_integration_id: + description: "The ID of the custom integration source, if the last task\ + \ executed with this template was an import of Asset Data." + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + source_id: + description: "The numeric ID of the data source, if the task executed with\ + \ this template is a runZero scan or third party data connection import." + example: "1" + type: string + template_id: + description: The ID of the template. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + size_site: + description: The size in assets of the site the last task the template was + executed against. + example: 0 + format: int64 + type: integer + size_data: + description: The total size of result data of the last task the template + was used with. + example: 0 + format: int64 + type: integer + size_results: + description: The number of results in the last task the template was used + with. + example: 0 + format: int64 + type: integer + hosted_zone_id: + description: The ID of the hosted zone that ran the last task the template + was used with. + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + linked_task_count: + description: The number of tasks derived from the template. + example: 1 + format: int32 + type: integer + global: + description: Whether the template is globally available to all organizations. + example: false + type: boolean + acl: + additionalProperties: true + description: A map of IDs to strings which describe how the template may + be accessed. Currently there is no authoritative list of in-use values. + See existing templates for examples. + example: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + type: object + required: + - acl + - global + - id + - organization_id + type: object + AgentPatchedSettings: + example: + settings: + max_concurrent_scans: 5 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + properties: + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + settings: + $ref: "#/components/schemas/AgentPatchedSettings_settings" + type: object + OrgOptions: + example: + expiration_scans: "365" + expiration_assets_offline: "365" + expiration_integration_attributes: "365" + parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + name: My Organization + description: "Wobbly Widgets, Inc." + expiration_assets_stale: "365" + keep_latest_integration_attributes: "true" + expiration_vulnerabilities: "365" + properties: + name: + example: My Organization + type: string + description: + example: "Wobbly Widgets, Inc." + type: string + parent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + expiration_assets_stale: + description: "Number of days before stale assets are expired, as a decimal\ + \ string." + example: "365" + type: string + expiration_assets_offline: + description: "Number of days before offline assets are expired, as a decimal\ + \ string." + example: "365" + type: string + expiration_integration_attributes: + description: "Number of days before integration attributes are expired,\ + \ as a decimal string." + example: "365" + type: string + expiration_scans: + description: "Number of days before scan data is expired, as a decimal string." + example: "365" + type: string + expiration_vulnerabilities: + description: "Number of days before vulnerabilities are expired, as a decimal\ + \ string." + example: "365" + type: string + keep_latest_integration_attributes: + description: "Whether to retain only the latest integration attribute values,\ + \ as a boolean string (\"true\"/\"false\")." + example: "true" + type: string + type: object + SiteOptions: + example: + excludes: 192.168.10.1 + scope: 192.168.10.0/24 + name: New Site + description: County Office + subnets: + key: "" + properties: + name: + example: New Site + type: string + description: + example: County Office + type: string + scope: + example: 192.168.10.0/24 + type: string + excludes: + example: 192.168.10.1 + type: string + subnets: + additionalProperties: true + type: object + required: + - name + type: object + CredentialFields: + oneOf: + - $ref: "#/components/schemas/AWSCredentialFields" + - $ref: "#/components/schemas/AzureClientSecretCredentialFields" + - $ref: "#/components/schemas/AzureUsernamePasswordCredentialFields" + - $ref: "#/components/schemas/CensysCredentialFields" + - $ref: "#/components/schemas/CrowdstrikeCredentialFields" + - $ref: "#/components/schemas/CustomIntegrationScriptCredentialFields" + - $ref: "#/components/schemas/GCPCredentialFields" + - $ref: "#/components/schemas/GoogleWorkspaceCredentialFields" + - $ref: "#/components/schemas/InsightVMCredentialFields" + - $ref: "#/components/schemas/LDAPCredentialFields" + - $ref: "#/components/schemas/MECMCredentialFields" + - $ref: "#/components/schemas/MirakiCredentialFields" + - $ref: "#/components/schemas/MiradoreCredentialFields" + - $ref: "#/components/schemas/NessusCredentialFields" + - $ref: "#/components/schemas/NetboxCredentialFields" + - $ref: "#/components/schemas/PaloAltoFirewallCredentialFields" + - $ref: "#/components/schemas/QualysCredentialFields" + - $ref: "#/components/schemas/SentinelOneCredentialFields" + - $ref: "#/components/schemas/ShodanCredentialFields" + - $ref: "#/components/schemas/SNMPv2CommunitiesCredentialFields" + - $ref: "#/components/schemas/SNMPv3CredentialFields" + - $ref: "#/components/schemas/TaniumCredentialFields" + - $ref: "#/components/schemas/TenableIoCredentialFields" + - $ref: "#/components/schemas/TenableScCredentialFields" + - $ref: "#/components/schemas/VMwareCredentialFields" + - $ref: "#/components/schemas/WizCredentialFields" + - $ref: "#/components/schemas/X509CredentialFields" + CredentialOptions: + example: + name: credentials_name + global: false + acl: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + e77602e0-3fb8-4734-aef9-fbc6fdcb0fe9: none + cidrs: "10.0.0.17/32, 192.168.1.0/24" + secret: + regions: "us-west-1, us-east-2" + role: runzero-role + use_cross_account_org: "true" + access_key: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + secret_access_key: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: miradore_api_key_v1 + properties: + name: + example: credentials_name + type: string + type: + enum: + - aws_access_secret + - azure_client_secret + - azure_username_password + - censys_search_api_key + - crowdstrike_api_key + - custom_integration_credential + - gcp_service_account_key + - google_workspace_client_secret + - insightvm_username_password + - ldap_username_password + - mecm_db_connection_string + - meraki_api_key + - miradore_api_key_v1 + - nessus_access_secret + - netbox_api_key + - palo_alto_api_key + - qualys_username_password + - sentinelone_api_key + - shodan_api_key + - snmpv2_community + - snmpv3_credential + - tanium_api_token + - tenable_access_secret + - tenable_security_center_access_secret + - vmware_username_password + - wiz_client_secret + - x509_keypair + example: miradore_api_key_v1 + type: string + acl: + additionalProperties: true + example: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + e77602e0-3fb8-4734-aef9-fbc6fdcb0fe9: none + type: object + global: + example: false + type: boolean + cidrs: + example: "10.0.0.17/32, 192.168.1.0/24" + type: string + secret: + $ref: "#/components/schemas/CredentialFields" + type: object + APIKeyOptions: + example: + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + comment: Splunk integration key + properties: + comment: + example: Splunk integration key + type: string + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + type: object + ExportTokenOptions: + example: + comment: Splunk export key + properties: + comment: + example: Splunk export key + type: string + type: object + AssetsWithCheckpoint: + example: + assets: + - addresses: + - 192.168.0.1 + - 192.168.0.1 + last_seen: 1576300370 + agent_name: LAPTOP-F4P1R6 + type: Server + vulnerability_count: 6.027456183070403 + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hw: Dell PowerEdge 2500 + lowest_rtt: 1 + scanned: true + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + addresses_extra: + - 192.168.100.1 + - 192.168.100.1 + domains: + - www + - www + newest_mac_vendor: Intel Corporate + lowest_ttl: 0 + newest_mac: 11:22:33:44:55:66 + service_protocols: + - ssh + - ssh + tags: + key: tags + site_name: Primary + service_count_icmp: 1 + service_products: + - bind + - bind + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + macs: + - 11:22:33:44:55:66 + - 11:22:33:44:55:66 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + newest_mac_age: 1304035200000000000 + first_seen: 1576300370 + alive: true + sources: + - sources + - sources + credentials: + key: + key: true + created_at: 1576300370 + service_count_udp: 1 + mac_vendors: + - Dell + - Dell + service_ports_udp: + - "53" + - "53" + updated_at: 1576300370 + risk_rank: -0.5995859047694942 + detected_by: icmp + org_name: Test Labs + eol_os_ext: 5.637376656633329 + comments: File Server + os: Ubuntu Linux + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + os_version: "18.04" + service_count: 10 + finding_count: 1.4658129805029452 + service_count_tcp: 7 + eol_os: 5.962133916683182 + service_count_arp: 1 + services: + key: + key: services + service_ports_tcp: + - "22" + - "22" + names: + - www + - www + rtts: + key: "" + risk: critical + attributes: + key: attributes + - addresses: + - 192.168.0.1 + - 192.168.0.1 + last_seen: 1576300370 + agent_name: LAPTOP-F4P1R6 + type: Server + vulnerability_count: 6.027456183070403 + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hw: Dell PowerEdge 2500 + lowest_rtt: 1 + scanned: true + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + addresses_extra: + - 192.168.100.1 + - 192.168.100.1 + domains: + - www + - www + newest_mac_vendor: Intel Corporate + lowest_ttl: 0 + newest_mac: 11:22:33:44:55:66 + service_protocols: + - ssh + - ssh + tags: + key: tags + site_name: Primary + service_count_icmp: 1 + service_products: + - bind + - bind + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + macs: + - 11:22:33:44:55:66 + - 11:22:33:44:55:66 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + newest_mac_age: 1304035200000000000 + first_seen: 1576300370 + alive: true + sources: + - sources + - sources + credentials: + key: + key: true + created_at: 1576300370 + service_count_udp: 1 + mac_vendors: + - Dell + - Dell + service_ports_udp: + - "53" + - "53" + updated_at: 1576300370 + risk_rank: -0.5995859047694942 + detected_by: icmp + org_name: Test Labs + eol_os_ext: 5.637376656633329 + comments: File Server + os: Ubuntu Linux + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + os_version: "18.04" + service_count: 10 + finding_count: 1.4658129805029452 + service_count_tcp: 7 + eol_os: 5.962133916683182 + service_count_arp: 1 + services: + key: + key: services + service_ports_tcp: + - "22" + - "22" + names: + - www + - www + rtts: + key: "" + risk: critical + attributes: + key: attributes + since: 1576300370 + properties: + since: + example: 1576300370 + format: int64 + type: integer + assets: + items: + $ref: "#/components/schemas/Asset" + type: array + required: + - assets + - since + type: object + AssetComments: + example: + comments: Sales Laptop + properties: + comments: + example: Sales Laptop + type: string + required: + - comments + type: object + AssetTags: + example: + tags: ThisTag=Value -OldTag + properties: + tags: + example: ThisTag=Value -OldTag + type: string + required: + - tags + type: object + AssetCriticality: + example: + criticality: high + properties: + criticality: + example: high + type: string + required: + - criticality + type: object + AssetIDs: + example: + asset_ids: + - 453C191F-644E-4EA8-9727-0E81E5275C35 + - 453C191F-644E-4EA8-9727-0E81E5275C35 + properties: + asset_ids: + items: + example: 453C191F-644E-4EA8-9727-0E81E5275C35 + type: string + type: array + required: + - asset_ids + type: object + AssetTagsWithSearch: + example: + search: alive:true and os:windows + tags: ThisTag=Value -OldTag + properties: + tags: + example: ThisTag=Value -OldTag + type: string + search: + example: alive:true and os:windows + type: string + required: + - search + - tags + type: object + AssetCriticalityWithSearch: + example: + search: alive:true and os:windows + criticality: high + properties: + criticality: + example: high + type: string + search: + example: alive:true and os:windows + type: string + required: + - criticality + - search + type: object + SearchQuery: + description: A request body wrapping a runZero search query string. + example: + search: alive:true and os:windows + properties: + search: + example: alive:true and os:windows + type: string + required: + - search + type: object + Asset: + example: + addresses: + - 192.168.0.1 + - 192.168.0.1 + last_seen: 1576300370 + agent_name: LAPTOP-F4P1R6 + type: Server + vulnerability_count: 6.027456183070403 + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hw: Dell PowerEdge 2500 + lowest_rtt: 1 + scanned: true + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + addresses_extra: + - 192.168.100.1 + - 192.168.100.1 + domains: + - www + - www + newest_mac_vendor: Intel Corporate + lowest_ttl: 0 + newest_mac: 11:22:33:44:55:66 + service_protocols: + - ssh + - ssh + tags: + key: tags + site_name: Primary + service_count_icmp: 1 + service_products: + - bind + - bind + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + macs: + - 11:22:33:44:55:66 + - 11:22:33:44:55:66 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + newest_mac_age: 1304035200000000000 + first_seen: 1576300370 + alive: true + sources: + - sources + - sources + credentials: + key: + key: true + created_at: 1576300370 + service_count_udp: 1 + mac_vendors: + - Dell + - Dell + service_ports_udp: + - "53" + - "53" + updated_at: 1576300370 + risk_rank: -0.5995859047694942 + detected_by: icmp + org_name: Test Labs + eol_os_ext: 5.637376656633329 + comments: File Server + os: Ubuntu Linux + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + os_version: "18.04" + service_count: 10 + finding_count: 1.4658129805029452 + service_count_tcp: 7 + eol_os: 5.962133916683182 + service_count_arp: 1 + services: + key: + key: services + service_ports_tcp: + - "22" + - "22" + names: + - www + - www + rtts: + key: "" + risk: critical + attributes: + key: attributes + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + example: 1576300370 + format: int64 + type: integer + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + scanned: + example: true + type: boolean + alive: + example: true + type: boolean + first_seen: + example: 1576300370 + format: int64 + type: integer + last_seen: + example: 1576300370 + format: int64 + type: integer + detected_by: + example: icmp + type: string + type: + example: Server + type: string + os: + example: Ubuntu Linux + type: string + os_version: + example: "18.04" + type: string + hw: + example: Dell PowerEdge 2500 + type: string + addresses: + items: + example: 192.168.0.1 + nullable: true + type: string + type: array + addresses_extra: + items: + example: 192.168.100.1 + nullable: true + type: string + type: array + macs: + items: + example: 11:22:33:44:55:66 + format: mac + type: string + type: array + mac_vendors: + items: + example: Dell + type: string + type: array + names: + items: + example: www + type: string + type: array + domains: + items: + example: www + type: string + type: array + service_count: + example: 10 + format: int64 + type: integer + service_count_tcp: + example: 7 + format: int64 + type: integer + service_count_udp: + example: 1 + format: int64 + type: integer + service_count_arp: + example: 1 + format: int64 + type: integer + service_count_icmp: + example: 1 + format: int64 + type: integer + lowest_ttl: + example: 0 + format: int64 + type: integer + lowest_rtt: + example: 1 + format: int64 + type: integer + last_agent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_task_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + newest_mac: + example: 11:22:33:44:55:66 + format: mac + type: string + newest_mac_vendor: + example: Intel Corporate + type: string + newest_mac_age: + example: 1304035200000000000 + format: int64 + type: integer + comments: + example: File Server + type: string + service_ports_tcp: + items: + example: "22" + format: port + type: string + type: array + service_ports_udp: + items: + example: "53" + format: port + type: string + type: array + service_protocols: + items: + example: ssh + type: string + type: array + service_products: + items: + example: bind + type: string + type: array + org_name: + example: Test Labs + type: string + site_name: + example: Primary + type: string + agent_name: + example: LAPTOP-F4P1R6 + type: string + tags: + additionalProperties: + type: string + type: object + services: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + rtts: + additionalProperties: true + type: object + risk_rank: + description: "-1 = none, 0 = info, 4 = critical" + format: int32 + maximum: 4 + minimum: -1 + type: number + risk: + example: critical + format: string + type: string + credentials: + additionalProperties: + additionalProperties: + type: boolean + type: object + type: object + vulnerability_count: + format: int64 + type: number + finding_count: + format: int64 + type: number + eol_os: + description: OS main EOL date + format: int64 + type: number + eol_os_ext: + description: OS extended support EOL date + format: int64 + type: number + sources: + description: Sources used for asset data + items: + format: string + type: string + type: array + attributes: + additionalProperties: + type: string + type: object + required: + - id + type: object + Service: + example: + addresses: + - 192.168.0.1 + - 192.168.0.1 + last_seen: 1576300370 + agent_name: LAPTOP-F4P1R6 + service_screenshot_link: service_screenshot_link + type: Server + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hw: Dell PowerEdge 2500 + lowest_rtt: 1 + service_ports_products: + - bind + - bind + service_protocol: http tls + service_data: + key: service_data + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + service_ports_protocols: + - ssh + - ssh + addresses_extra: + - 192.168.100.1 + - 192.168.100.1 + service_updated_at: 1576300370 + domains: + - CORPNET + - CORPNET + newest_mac_vendor: Intel Corporate + lowest_ttl: 0 + newest_mac: 11:22:33:44:55:66 + tags: + key: tags + site_name: Primary + service_count_icmp: 1 + service_link: http://192.168.0.1:80/ + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + macs: + - 11:22:33:44:55:66 + - 11:22:33:44:55:66 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + service_asset_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + service_port: "80" + newest_mac_age: 1304035200000000000 + first_seen: 1576300370 + alive: true + credentials: + key: + key: true + created_at: 1576300370 + service_count_udp: 1 + service_summary: Login Page + mac_vendors: + - Dell + - Dell + service_address: 192.168.0.1 + service_ports_udp: + - "53" + - "53" + service_created_at: 1576300370 + updated_at: 1576300370 + detected_by: icmp + service_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + org_name: Test Labs + comments: File Server + os: Ubuntu Linux + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + service_transport: tcp + os_version: "18.04" + service_count: 10 + service_count_tcp: 7 + service_count_arp: 1 + services: + key: + key: services + service_ports_tcp: + - "22" + - "22" + names: + - www + - www + rtts: + key: "" + attributes: + key: attributes + service_vhost: www + properties: + service_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + service_asset_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + service_created_at: + example: 1576300370 + format: int64 + type: integer + service_updated_at: + example: 1576300370 + format: int64 + type: integer + service_address: + example: 192.168.0.1 + nullable: true + type: string + service_transport: + example: tcp + type: string + service_vhost: + example: www + type: string + service_port: + example: "80" + format: port + type: string + service_data: + additionalProperties: + type: string + type: object + service_protocol: + example: http tls + type: string + service_summary: + example: Login Page + type: string + service_screenshot_link: + type: string + service_link: + example: http://192.168.0.1:80/ + type: string + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + example: 1576300370 + format: int64 + type: integer + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + alive: + example: true + type: boolean + first_seen: + example: 1576300370 + format: int64 + type: integer + last_seen: + example: 1576300370 + format: int64 + type: integer + detected_by: + example: icmp + type: string + type: + example: Server + type: string + os: + example: Ubuntu Linux + type: string + os_version: + example: "18.04" + type: string + hw: + example: Dell PowerEdge 2500 + type: string + addresses: + items: + example: 192.168.0.1 + nullable: true + type: string + type: array + addresses_extra: + items: + example: 192.168.100.1 + nullable: true + type: string + type: array + macs: + items: + example: 11:22:33:44:55:66 + format: mac + type: string + type: array + mac_vendors: + items: + example: Dell + type: string + type: array + names: + items: + example: www + type: string + type: array + domains: + items: + example: CORPNET + type: string + type: array + service_count: + example: 10 + format: int64 + type: integer + service_count_tcp: + example: 7 + format: int64 + type: integer + service_count_udp: + example: 1 + format: int64 + type: integer + service_count_arp: + example: 1 + format: int64 + type: integer + service_count_icmp: + example: 1 + format: int64 + type: integer + lowest_ttl: + example: 0 + format: int64 + type: integer + lowest_rtt: + example: 1 + format: int64 + type: integer + last_agent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_task_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + newest_mac: + example: 11:22:33:44:55:66 + format: mac + type: string + newest_mac_vendor: + example: Intel Corporate + type: string + newest_mac_age: + example: 1304035200000000000 + format: int64 + type: integer + comments: + example: File Server + type: string + service_ports_tcp: + items: + example: "22" + format: port + type: string + type: array + service_ports_udp: + items: + example: "53" + format: port + type: string + type: array + service_ports_protocols: + items: + example: ssh + type: string + type: array + service_ports_products: + items: + example: bind + type: string + type: array + org_name: + example: Test Labs + type: string + site_name: + example: Primary + type: string + agent_name: + example: LAPTOP-F4P1R6 + type: string + tags: + additionalProperties: + type: string + type: object + services: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + rtts: + additionalProperties: true + type: object + credentials: + additionalProperties: + additionalProperties: + type: boolean + type: object + type: object + attributes: + additionalProperties: + type: string + type: object + required: + - id + - service_id + type: object + Site: + example: + excludes: 192.168.0.5 + updated_at: 1576300370 + scope: 192.168.0.0/24 + name: Primary + created_at: 1576300370 + description: Headquarters + subnets: + key: "" + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + example: 1576300370 + format: int64 + type: integer + name: + example: Primary + type: string + description: + example: Headquarters + type: string + scope: + example: 192.168.0.0/24 + type: string + excludes: + example: 192.168.0.5 + type: string + subnets: + additionalProperties: true + type: object + required: + - id + - name + type: object + Wireless: + example: + last_seen: 1576300370 + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + data: + key: data + agent_name: LAPTOP-F4P1R6 + essid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + bssid: 11:22:33:44:55:66 + created_at: 1576300370 + type: infrastructure + interface: wlan0 + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + site_name: Primary + encryption: aes + channels: "11, 158+1" + vendor: Ubiquiti Networks + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + family: "223344" + org_name: Test Labs + signal: 99 + authentication: wpa2-psk + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + last_seen: + example: 1576300370 + format: int64 + type: integer + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_agent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_task_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + essid: + format: uuid + type: string + bssid: + example: 11:22:33:44:55:66 + format: mac + type: string + type: + example: infrastructure + type: string + authentication: + example: wpa2-psk + type: string + encryption: + example: aes + type: string + signal: + example: 99 + maximum: 100 + minimum: 0 + type: integer + channels: + example: "11, 158+1" + type: string + interface: + example: wlan0 + type: string + vendor: + example: Ubiquiti Networks + type: string + family: + example: "223344" + type: string + data: + additionalProperties: + type: string + type: object + org_name: + example: Test Labs + type: string + site_name: + example: Primary + type: string + agent_name: + example: LAPTOP-F4P1R6 + type: string + required: + - id + type: object + Software: + example: + software_updated_at: 1576300370 + software_service_port: 80 + software_sw_edition: software_sw_edition + software_created_at: 1576300370 + software_service_address: 192.168.0.1 + software_target_sw: software_target_sw + software_language: software_language + software_cpe23: cpe:/a:openbsd:openssh:8.2 + software_asset_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + software_organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + software_installed_from: software_installed_from + software_other: software_other + software_installed_size: 0 + software_vendor: OpenBSD + software_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + software_target_hw: software_target_hw + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + software_version: 8.3p1 + software_product: OpenSSH + software_app_id: software_app_id + software_update: software_update + software_part: a + software_source_id: 1 + software_service_transport: tcp + software_edition: software_edition + software_attributes: + key: software_attributes + software_installed_at: 1576300370 + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + software_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + software_asset_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + software_organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + software_source_id: + example: 1 + type: integer + software_created_at: + example: 1576300370 + format: int64 + type: integer + software_updated_at: + example: 1576300370 + format: int64 + type: integer + software_service_address: + example: 192.168.0.1 + nullable: true + type: string + software_service_transport: + example: tcp + type: string + software_service_port: + example: 80 + format: int64 + type: integer + software_installed_at: + example: 1576300370 + format: int64 + type: integer + software_installed_size: + example: 0 + format: int64 + type: integer + software_installed_from: + type: string + software_app_id: + type: string + software_part: + example: a + type: string + software_vendor: + example: OpenBSD + type: string + software_product: + example: OpenSSH + type: string + software_version: + example: 8.3p1 + type: string + software_update: + type: string + software_edition: + type: string + software_language: + type: string + software_sw_edition: + type: string + software_target_sw: + type: string + software_target_hw: + type: string + software_other: + type: string + software_cpe23: + example: cpe:/a:openbsd:openssh:8.2 + type: string + software_attributes: + additionalProperties: + type: string + type: object + required: + - id + type: object + Vulnerability: + example: + addresses: + - 192.168.0.1 + - 192.168.0.1 + last_seen: 1576300370 + agent_name: LAPTOP-F4P1R6 + vulnerability_published_at: 1576300370 + type: Server + last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hw: Dell PowerEdge 2500 + lowest_rtt: 1 + vulnerability_severity_score: 10 + vulnerability_name: Cisco IOS Software DHCP Remote Code Execution Vulnerability + service_ports_products: + - bind + - bind + vulnerability_severity: Critical + vulnerability_first_detected_at: 1576300370 + vulnerability_cvss2_temporal_score: 8.7 + vulnerability_service_address: 192.168.0.1 + vulnerability_solution: Upgrade to the relevant fixed version referenced in + Cisco bug ID(s) CSCsm45390 and CSCuw77959. + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + service_ports_protocols: + - ssh + - ssh + addresses_extra: + - 192.168.100.1 + - 192.168.100.1 + vulnerability_cve: CVE-2017-12240 + vulnerability_risk_score: 7.4 + vulnerability_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + domains: + - www + - www + newest_mac_vendor: Intel Corporate + lowest_ttl: 0 + newest_mac: 11:22:33:44:55:66 + vulnerability_last_detected_at: 1576300370 + tags: + key: tags + site_name: Primary + service_count_icmp: 1 + vulnerability_asset_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + vulnerability_attributes: + key: vulnerability_attributes + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + macs: + - 11:22:33:44:55:66 + - 11:22:33:44:55:66 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + vulnerability_category: Remote + newest_mac_age: 1304035200000000000 + vulnerability_service_transport: tcp + first_seen: 1576300370 + alive: true + credentials: + key: + key: true + created_at: 1576300370 + service_count_udp: 1 + vulnerability_description: The remote device is missing a vendor-supplied + security patch. + mac_vendors: + - Dell + - Dell + vulnerability_organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + vulnerability_risk: High + service_ports_udp: + - "53" + - "53" + vulnerability_created_at: 1576300370 + updated_at: 1576300370 + detected_by: icmp + vulnerability_cpe23: cpe:/o:cisco:ios + vulnerability_updated_at: 1576300370 + org_name: Test Labs + vulnerability_cvss2_base_score: 10 + comments: File Server + vulnerability_service_port: 80 + os: Ubuntu Linux + last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + vulnerability_source_id: 1 + os_version: "18.04" + service_count: 10 + vulnerability_cvss3_temporal_score: 9.4 + service_count_tcp: 7 + service_count_arp: 1 + services: + key: + key: services + service_ports_tcp: + - "22" + - "22" + vulnerability_vuln_id: "103565" + names: + - www + - www + rtts: + key: "" + attributes: + key: attributes + vulnerability_cvss3_base_score: 9.8 + properties: + vulnerability_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + vulnerability_asset_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + vulnerability_organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + vulnerability_source_id: + example: 1 + type: integer + vulnerability_created_at: + example: 1576300370 + format: int64 + type: integer + vulnerability_updated_at: + example: 1576300370 + format: int64 + type: integer + vulnerability_service_address: + example: 192.168.0.1 + nullable: true + type: string + vulnerability_service_transport: + example: tcp + type: string + vulnerability_service_port: + example: 80 + format: int64 + type: integer + vulnerability_cpe23: + example: cpe:/o:cisco:ios + type: string + vulnerability_vuln_id: + example: "103565" + type: string + vulnerability_category: + example: Remote + type: string + vulnerability_name: + example: Cisco IOS Software DHCP Remote Code Execution Vulnerability + type: string + vulnerability_description: + example: The remote device is missing a vendor-supplied security patch. + type: string + vulnerability_solution: + example: Upgrade to the relevant fixed version referenced in Cisco bug ID(s) + CSCsm45390 and CSCuw77959. + type: string + vulnerability_cve: + example: CVE-2017-12240 + type: string + vulnerability_cvss2_base_score: + example: 10 + format: double + type: number + vulnerability_cvss2_temporal_score: + example: 8.7 + format: double + type: number + vulnerability_cvss3_base_score: + example: 9.8 + format: double + type: number + vulnerability_cvss3_temporal_score: + example: 9.4 + format: double + type: number + vulnerability_severity: + example: Critical + type: string + vulnerability_severity_score: + example: 10 + format: double + type: number + vulnerability_risk: + example: High + type: string + vulnerability_risk_score: + example: 7.4 + format: double + type: number + vulnerability_published_at: + example: 1576300370 + format: int64 + type: integer + vulnerability_first_detected_at: + example: 1576300370 + format: int64 + type: integer + vulnerability_last_detected_at: + example: 1576300370 + format: int64 + type: integer + vulnerability_attributes: + additionalProperties: + type: string + type: object + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + example: 1576300370 + format: int64 + type: integer + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + alive: + example: true + type: boolean + first_seen: + example: 1576300370 + format: int64 + type: integer + last_seen: + example: 1576300370 + format: int64 + type: integer + detected_by: + example: icmp + type: string + type: + example: Server + type: string + os: + example: Ubuntu Linux + type: string + os_version: + example: "18.04" + type: string + hw: + example: Dell PowerEdge 2500 + type: string + addresses: + items: + example: 192.168.0.1 + nullable: true + type: string + type: array + addresses_extra: + items: + example: 192.168.100.1 + nullable: true + type: string + type: array + macs: + items: + example: 11:22:33:44:55:66 + format: mac + type: string + type: array + mac_vendors: + items: + example: Dell + type: string + type: array + names: + items: + example: www + type: string + type: array + domains: + items: + example: www + type: string + type: array + service_count: + example: 10 + format: int64 + type: integer + service_count_tcp: + example: 7 + format: int64 + type: integer + service_count_udp: + example: 1 + format: int64 + type: integer + service_count_arp: + example: 1 + format: int64 + type: integer + service_count_icmp: + example: 1 + format: int64 + type: integer + lowest_ttl: + example: 0 + format: int64 + type: integer + lowest_rtt: + example: 1 + format: int64 + type: integer + last_agent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_task_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + newest_mac: + example: 11:22:33:44:55:66 + format: mac + type: string + newest_mac_vendor: + example: Intel Corporate + type: string + newest_mac_age: + example: 1304035200000000000 + format: int64 + type: integer + comments: + example: File Server + type: string + service_ports_tcp: + items: + example: "22" + format: port + type: string + type: array + service_ports_udp: + items: + example: "53" + format: port + type: string + type: array + service_ports_protocols: + items: + example: ssh + type: string + type: array + service_ports_products: + items: + example: bind + type: string + type: array + org_name: + example: Test Labs + type: string + site_name: + example: Primary + type: string + agent_name: + example: LAPTOP-F4P1R6 + type: string + tags: + additionalProperties: + type: string + type: object + services: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + rtts: + additionalProperties: true + type: object + credentials: + additionalProperties: + additionalProperties: + type: boolean + type: object + type: object + attributes: + additionalProperties: + type: string + type: object + required: + - id + type: object + DirectoryUser: example: - id: agent - version: 1.0.0 + directory_user_name: "CN=Jane Doe,OU=Employees,DC=example,DC=com" + directory_user_attributes: + key: directory_user_attributes + directory_user_group_ids: + - e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + - e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_user_description: Example user + directory_user_last_logon_at: 1576300370 + directory_user_updated_at: 1576300370 + directory_user_source_id: 1 + directory_user_first_name: Jane + directory_user_title: Software Engineer + directory_user_phone: 555-555-5555 + directory_user_display_name: Jane Doe + directory_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_user_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_user_email_normalized: user@example.com + directory_user_email: user@example.com + directory_user_location: Remote + directory_user_site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_user_organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_user_created_at: 1576300370 + directory_user_last_name: Doe properties: id: - example: agent - format: string + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string - version: - example: 1.0.0 - format: string + directory_user_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_user_organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_user_site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_user_source_id: + example: 1 + type: integer + directory_user_created_at: + example: 1576300370 + format: int64 + type: integer + directory_user_updated_at: + example: 1576300370 + format: int64 + type: integer + directory_user_user_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: string + directory_user_group_ids: + example: + - e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + - e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + items: + type: string + type: array + directory_user_display_name: + example: Jane Doe + type: string + directory_user_name: + example: "CN=Jane Doe,OU=Employees,DC=example,DC=com" + type: string + directory_user_first_name: + example: Jane + type: string + directory_user_last_name: + example: Doe + type: string + directory_user_description: + example: Example user + type: string + directory_user_email: + example: user@example.com + format: email + type: string + directory_user_email_normalized: + example: user@example.com + format: email type: string + directory_user_phone: + example: 555-555-5555 + type: string + directory_user_title: + example: Software Engineer + type: string + directory_user_location: + example: Remote + type: string + directory_user_last_logon_at: + example: 1576300370 + format: int64 + type: integer + directory_user_attributes: + additionalProperties: + type: string + type: object required: - id - - version type: object - URL: - description: A URL to a resource + DirectoryGroup: + example: + directory_group_site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_group_name: "CN=Remote Desktop Users,CN=Builtin,DC=example,DC=com" + directory_group_created_at: 1576300370 + directory_group_description: Members in this group are granted the right to + logon remotely + directory_group_email_normalized: user@example.com + directory_group_display_name: Remote Desktop Users + directory_group_group_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_group_user_count: 1 + directory_group_organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_group_source_id: 1 + directory_group_email: user@example.com + directory_group_attributes: + key: directory_group_attributes + directory_group_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + directory_group_updated_at: 1576300370 properties: id: - example: http://runzero.com/docs/ - format: url + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_group_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_group_organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_group_site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + directory_group_source_id: + example: 1 + type: integer + directory_group_created_at: + example: 1576300370 + format: int64 + type: integer + directory_group_updated_at: + example: 1576300370 + format: int64 + type: integer + directory_group_group_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: string + directory_group_user_count: + example: 1 + format: int64 + type: integer + directory_group_name: + example: "CN=Remote Desktop Users,CN=Builtin,DC=example,DC=com" + type: string + directory_group_display_name: + example: Remote Desktop Users + type: string + directory_group_description: + example: Members in this group are granted the right to logon remotely + type: string + directory_group_email: + example: user@example.com + format: email + type: string + directory_group_email_normalized: + example: user@example.com + format: email type: string + directory_group_attributes: + additionalProperties: + type: string + type: object required: - - url + - id type: object - ScanOptions: + Organization: + example: + export_token_last_used_at: 0 + deactivated_at: 0 + download_token_created_at: 1576300370 + export_token_created_at: 1576300370 + created_at: 1576300370 + description: All subdivisions of my company + service_count_udp: 1 + project: false + export_token: ET11226D9EEEA2B035D42569585900 + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + export_token_counter: 0 + asset_count: 100 + inactive: false + expiration_integration_attributes: 365 + updated_at: 1576300370 + export_token_last_used_by: 127.0.0.1 + expiration_assets_stale: 365 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + download_token: DT11226D9EEEA2B035D42569585900 + service_count: 10 + service_count_tcp: 7 + service_count_arp: 1 + expiration_vulnerabilities: 365 + expiration_scans: 365 + service_count_icmp: 1 + expiration_assets_offline: 365 + parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + name: My Company + keep_latest_integration_attributes: true properties: - targets: - example: 192.168.0.0/24 + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string - excludes: - example: 192.168.0.3 + created_at: + example: 1576300370 + format: int64 + type: integer + updated_at: + example: 1576300370 + format: int64 + type: integer + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string - scan-name: - example: My Scan + download_token: + example: DT11226D9EEEA2B035D42569585900 type: string - scan-description: - example: Scan of Wireless + download_token_created_at: + example: 1576300370 + format: int64 + type: integer + name: + example: My Company type: string - scan-frequency: - enum: - - once - - hourly - - daily - - weekly - - monthly + description: + example: All subdivisions of my company type: string - scan-start: - example: 1578155820 - format: unixtime + inactive: + example: false + type: boolean + deactivated_at: + example: 0 + format: int64 type: integer - agent: + service_count: + example: 10 + format: int64 + type: integer + service_count_tcp: + example: 7 + format: int64 + type: integer + service_count_udp: + example: 1 + format: int64 + type: integer + service_count_arp: + example: 1 + format: int64 + type: integer + service_count_icmp: + example: 1 + format: int64 + type: integer + asset_count: + example: 100 + format: int64 + type: integer + project: + example: false + type: boolean + parent_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - rate: - example: 10000 + expiration_assets_stale: + example: 365 + format: int64 type: integer - max-host-rate: - example: 100 + expiration_assets_offline: + example: 365 + format: int64 + type: integer + expiration_integration_attributes: + example: 365 + format: int64 + type: integer + expiration_scans: + example: 365 + format: int64 type: integer - passes: - example: 3 + expiration_vulnerabilities: + example: 365 + format: int64 type: integer - max-sockets: - example: 500 + export_token: + deprecated: true + example: ET11226D9EEEA2B035D42569585900 + type: string + export_token_created_at: + deprecated: true + example: 1576300370 + format: int64 type: integer - max-group-size: - example: 4096 + export_token_last_used_at: + deprecated: true + example: 0 + format: int64 type: integer - tcp-ports: - example: 1-1000,5000-6000 + export_token_last_used_by: + deprecated: true + example: 127.0.0.1 type: string - screenshots: + export_token_counter: + deprecated: true + example: 0 + format: int64 + type: integer + keep_latest_integration_attributes: example: true type: boolean - nameservers: - example: 8.8.8.8 - type: string - probes: - description: Optional probe list, otherwise all probes are used - example: arp,bacnet,connect,dns,echo,ike,ipmi,mdns,memcache,mssql,natpmp,netbios,pca,rdns,rpcbind,sip,snmp,ssdp,syn,ubnt,wlan-list,wsd - type: string required: - - targets + - id + - name type: object - AgentSiteID: + Credential: example: - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + last_used_at: 1576300370 + name: credentials_name + created_at: 1576300370 + global: false + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + created_by_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + acl: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + cidrs: + - 10.0.0.47/32 + - 192.168.1.0/24 + last_used_by_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: aws_access_secret + created_by_email: user@example.com + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 properties: - site_id: + id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - required: - - site_id - type: object - OrgOptions: - example: - name: My Organization - description: Wobbly Widgets, Inc. - properties: - name: - example: My Organization - type: string - description: - example: Wobbly Widgets, Inc. + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string - type: object - SiteOptions: - example: - excludes: 192.168.10.1 - scope: 192.168.10.0/24 - name: New Site - description: County Office - properties: name: - example: New Site + example: credentials_name type: string - description: - example: County Office + type: + description: The service the credentials are for. + enum: + - aws_access_secret + - azure_client_secret + - azure_username_password + - censys_search_api_key + - crowdstrike_api_key + - custom_integration_credential + - gcp_service_account_key + - google_workspace_client_secret + - insightvm_username_password + - ldap_username_password + - mecm_db_connection_string + - meraki_api_key + - miradore_api_key_v1 + - nessus_access_secret + - netbox_api_key + - palo_alto_api_key + - qualys_username_password + - sentinelone_api_key + - shodan_api_key + - snmpv2_community + - snmpv3_credential + - tanium_api_token + - tenable_access_secret + - tenable_security_center_access_secret + - vmware_username_password + - wiz_client_secret + - x509_keypair type: string - scope: - example: 192.168.10.0/24 + created_at: + example: 1576300370 + format: int64 + type: integer + created_by_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string - excludes: - example: 192.168.10.1 + created_by_email: + example: user@example.com + format: email + type: string + acl: + additionalProperties: true + example: + e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8: user + type: object + global: + example: false + type: boolean + cidrs: + example: + - 10.0.0.47/32 + - 192.168.1.0/24 + items: + type: string + type: array + last_used_at: + example: 1576300370 + format: int64 + type: integer + last_used_by_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string required: - - name + - id type: object - AssetsWithCheckpoint: + OrganizationAPIKey: + description: An API key issued for an organization. example: - assets: - - addresses: - - 192.168.0.1 - - 192.168.0.1 - first_seen: 1576300370 - alive: true - last_seen: 1576300370 - agent_name: LAPTOP-F4P1R6 - credentials: - key: - key: true - created_at: 1576300370 - service_count_udp: 1 - mac_vendors: - - Dell - - Dell - type: Server - last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_udp: - - "53" - - "53" - hw: Dell PowerEdge 2500 - lowest_rtt: 1 - service_ports_products: - - bind - - bind - updated_at: 1576300370 - detected_by: icmp - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_protocols: - - ssh - - ssh - org_name: Test Labs - addresses_extra: - - 192.168.100.1 - - 192.168.100.1 - comments: File Server - os: Ubuntu Linux - last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - os_version: "18.04" - service_count: 10 - domains: - - www - - www - service_count_tcp: 7 - newest_mac_vendor: Intel Corporate - lowest_ttl: 0 - newest_mac: 11:22:33:44:55:66 - service_count_arp: 1 - services: - key: - key: services - service_ports_tcp: - - "22" - - "22" - tags: - key: tags - site_name: Primary - names: - - www - - www - service_count_icmp: 1 - rtts: - key: '{}' - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - macs: - - 11:22:33:44:55:66 - - 11:22:33:44:55:66 - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - attributes: - key: attributes - newest_mac_age: 1304035200000000000 - - addresses: - - 192.168.0.1 - - 192.168.0.1 - first_seen: 1576300370 - alive: true - last_seen: 1576300370 - agent_name: LAPTOP-F4P1R6 - credentials: - key: - key: true - created_at: 1576300370 - service_count_udp: 1 - mac_vendors: - - Dell - - Dell - type: Server - last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_udp: - - "53" - - "53" - hw: Dell PowerEdge 2500 - lowest_rtt: 1 - service_ports_products: - - bind - - bind - updated_at: 1576300370 - detected_by: icmp - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_protocols: - - ssh - - ssh - org_name: Test Labs - addresses_extra: - - 192.168.100.1 - - 192.168.100.1 - comments: File Server - os: Ubuntu Linux - last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - os_version: "18.04" - service_count: 10 - domains: - - www - - www - service_count_tcp: 7 - newest_mac_vendor: Intel Corporate - lowest_ttl: 0 - newest_mac: 11:22:33:44:55:66 - service_count_arp: 1 - services: - key: - key: services - service_ports_tcp: - - "22" - - "22" - tags: - key: tags - site_name: Primary - names: - - www - - www - service_count_icmp: 1 - rtts: - key: '{}' - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - macs: - - 11:22:33:44:55:66 - - 11:22:33:44:55:66 - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - attributes: - key: attributes - newest_mac_age: 1304035200000000000 - since: 1576300370 + usage_limit: 10000 + created_at: 1576300370 + counter: 1 + type: org + created_by: user@example.com + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + token: CTXXXXXXXXXXXXX + usage_today: 100 + last_used_at: 0 + inactive: true + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + last_used_ua: curl/7.44.1 + comment: API key used for Splunk integration + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + last_used_ip: 127.0.0.1 properties: - since: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: example: 1576300370 format: int64 type: integer - assets: - items: - $ref: '#/components/schemas/Asset' - type: array - required: - - assets - - since - type: object - AssetComments: - example: - comments: Sales Laptop - properties: - comments: - example: Sales Laptop + created_by: + example: user@example.com + format: email + type: string + comment: + example: API key used for Splunk integration + type: string + last_used_at: + example: 0 + format: int64 + type: integer + last_used_ip: + example: 127.0.0.1 + type: string + last_used_ua: + example: curl/7.44.1 + type: string + counter: + example: 1 + format: int64 + type: integer + usage_today: + example: 100 + format: int64 + type: integer + usage_limit: + example: 10000 + format: int64 + type: integer + token: + example: CTXXXXXXXXXXXXX + type: string + inactive: + example: true + type: boolean + type: + example: org type: string required: - - comments + - id type: object - AssetTags: + ExportToken: example: - tags: - key: TagValue + last_used_at: 0 + created_at: 1576300370 + comment: Export token used for Splunk integration + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + counter: 0 + last_used_by: 127.0.0.1 + token: ET11226D9EEEA2B035D42569585900 properties: - tags: - additionalProperties: - example: TagValue - type: string - type: object + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + token: + example: ET11226D9EEEA2B035D42569585900 + type: string + comment: + example: Export token used for Splunk integration + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + last_used_at: + example: 0 + format: int64 + type: integer + last_used_by: + example: 127.0.0.1 + type: string + counter: + example: 0 + format: int64 + type: integer required: - - tags + - id type: object - Asset: + Agent: + description: | + A deployed service which performs scan tasks. + Explorers may be referred to by their legacy name, Agents. example: - addresses: - - 192.168.0.1 - - 192.168.0.1 - first_seen: 1576300370 - alive: true - last_seen: 1576300370 - agent_name: LAPTOP-F4P1R6 - credentials: - key: - key: true + os: Windows + system_info: + key: "" + deactivated_at: 0 created_at: 1576300370 - service_count_udp: 1 - mac_vendors: - - Dell - - Dell - type: Server - last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_udp: - - "53" - - "53" - hw: Dell PowerEdge 2500 - lowest_rtt: 1 - service_ports_products: - - bind - - bind + last_checkin: 1576300370 + version: "1.2.3 (build 20191219224016) [fc50c5eefdc3ff5c60533c3c345d14d336396272]" + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + host_id: 6f9e6fe52271da70962e007183c5c9c9 + internal_ip: 192.168.0.1 + connected: true + hub_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + inactive: false updated_at: 1576300370 - detected_by: icmp - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_protocols: - - ssh - - ssh - org_name: Test Labs - addresses_extra: - - 192.168.100.1 - - 192.168.100.1 - comments: File Server - os: Ubuntu Linux - last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - os_version: "18.04" - service_count: 10 - domains: - - www - - www - service_count_tcp: 7 - newest_mac_vendor: Intel Corporate - lowest_ttl: 0 - newest_mac: 11:22:33:44:55:66 - service_count_arp: 1 - services: - key: - key: services - service_ports_tcp: - - "22" - - "22" - tags: - key: tags - site_name: Primary - names: - - www - - www - service_count_icmp: 1 - rtts: - key: '{}' organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - macs: - - 11:22:33:44:55:66 - - 11:22:33:44:55:66 + name: RUNZERO-AGENT site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - attributes: - key: attributes - newest_mac_age: 1304035200000000000 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + arch: amd64 + external_ip: 1.1.1.1 properties: id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string created_at: example: 1576300370 format: int64 @@ -1872,312 +10979,355 @@ components: example: 1576300370 format: int64 type: integer - organization_id: + host_id: + example: 6f9e6fe52271da70962e007183c5c9c9 + type: string + hub_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + name: + example: RUNZERO-AGENT + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + last_checkin: + example: 1576300370 + format: int64 + type: integer + os: + example: Windows + type: string + arch: + example: amd64 + type: string + version: + example: "1.2.3 (build 20191219224016) [fc50c5eefdc3ff5c60533c3c345d14d336396272]" + type: string + external_ip: + example: 1.1.1.1 + type: string + internal_ip: + example: 192.168.0.1 + nullable: true + type: string + system_info: + additionalProperties: true + type: object + connected: + example: true + type: boolean + inactive: + example: false + type: boolean + deactivated_at: + example: 0 + format: int64 + type: integer + required: + - id + type: object + TaskBase: + description: All fields of a Task with none required + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + name: + example: Hourly Scan + type: string + description: + example: Scan the headquarters hourly + type: string + template_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + agent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + hosted_zone_id: + description: | + The ID of the Hosted Zone which executes the task. If the + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + cruncher_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 + format: int64 + type: integer + created_by: + example: user@example.com + type: string + created_by_user_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - site_id: + custom_integration_id: + description: "The ID of the custom integration source, if the last task\ + \ executed with this template was an import of Asset Data." example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - alive: - example: true - format: boolean - type: boolean - first_seen: - example: 1576300370 - format: int64 + source_id: + description: "The numeric ID of the data source, if the task executed with\ + \ this template is a runZero scan or third party data connection import." + example: 1 type: integer - last_seen: + updated_at: example: 1576300370 format: int64 type: integer - detected_by: - example: icmp - type: string type: - example: Server - type: string - os: - example: Ubuntu Linux + example: scan type: string - os_version: - example: "18.04" + status: + example: processed type: string - hw: - example: Dell PowerEdge 2500 + error: + example: agent unavailable type: string - addresses: - items: - example: 192.168.0.1 - type: string - type: array - addresses_extra: - items: - example: 192.168.100.1 - type: string - type: array - macs: - items: - example: 11:22:33:44:55:66 - format: mac - type: string - type: array - mac_vendors: - items: - example: Dell - type: string - type: array - names: - items: - example: www - type: string - type: array - domains: - items: - example: www + params: + additionalProperties: type: string - type: array - service_count: - example: 10 - format: int64 - type: integer - service_count_tcp: - example: 7 - format: int64 - type: integer - service_count_udp: - example: 1 - format: int64 - type: integer - service_count_arp: - example: 1 - format: int64 - type: integer - service_count_icmp: - example: 1 + type: object + stats: + additionalProperties: true + type: object + hidden: + example: false + type: boolean + parent_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + recur: + example: false + type: boolean + recur_frequency: + example: hourly + type: string + start_time: + example: 1576300370 format: int64 type: integer - lowest_ttl: - example: 0 + recur_last: + example: 1576300370 format: int64 type: integer - lowest_rtt: - example: 1 + recur_next: + example: 1576300370 format: int64 type: integer - last_agent_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid - type: string - last_task_id: + recur_last_task_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - newest_mac: - example: 11:22:33:44:55:66 - format: mac - type: string - newest_mac_vendor: - example: Intel Corporate - type: string - newest_mac_age: - example: 1304035200000000000 - format: int64 - type: integer - comments: - example: File Server - type: string - service_ports_tcp: - items: - example: "22" - format: port - type: string - type: array - service_ports_udp: - items: - example: "53" - format: port - type: string - type: array - service_ports_protocols: - items: - example: ssh - type: string - type: array - service_ports_products: - items: - example: bind - type: string - type: array - org_name: - example: Test Labs - type: string - site_name: - example: Primary - type: string - agent_name: - example: LAPTOP-F4P1R6 - type: string - tags: - additionalProperties: - type: string - type: object - services: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - rtts: - additionalProperties: true - type: object - credentials: - additionalProperties: - additionalProperties: - type: boolean - type: object - type: object - attributes: - additionalProperties: - type: string - type: object - required: - - id - - version type: object - Service: + Task: + allOf: + - $ref: "#/components/schemas/TaskBase" + description: A task object example: - addresses: - - 192.168.0.1 - - 192.168.0.1 - last_seen: 1576300370 - agent_name: LAPTOP-F4P1R6 - service_screenshot_link: service_screenshot_link - type: Server - last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - hw: Dell PowerEdge 2500 - lowest_rtt: 1 - service_ports_products: - - bind - - bind - service_protocol: http tls - service_data: - key: service_data + agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hidden: false + description: Scan the headquarters hourly + created_at: 1576300370 + type: scan + error: agent unavailable + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + cruncher_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + updated_at: 1576300370 + stats: + key: "" + recur: false id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_ports_protocols: - - ssh - - ssh - addresses_extra: - - 192.168.100.1 - - 192.168.100.1 - service_updated_at: 1576300370 - domains: - - CORPNET - - CORPNET - newest_mac_vendor: Intel Corporate - lowest_ttl: 0 - newest_mac: 11:22:33:44:55:66 - tags: - key: tags - site_name: Primary - service_count_icmp: 1 - service_link: http://192.168.0.1:80/ + recur_last: 1576300370 + custom_integration_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + recur_last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hosted_zone_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + params: + key: params + created_by: user@example.com + created_by_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + start_time: 1576300370 + recur_frequency: hourly + parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - macs: - - 11:22:33:44:55:66 - - 11:22:33:44:55:66 + name: Hourly Scan site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_asset_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_port: "80" - newest_mac_age: 1304035200000000000 - first_seen: 1576300370 - alive: true - credentials: - key: - key: true + template_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + source_id: 1 + recur_next: 1576300370 + status: processed + required: + - id + TaskOptions: + allOf: + - $ref: "#/components/schemas/TaskBase" + - description: Options which can be set to create or modify a task. + properties: + hosted_zone_name: + description: "The string 'auto' will use any available hosted zone. Otherwise,\ + \ provide the string name (hostedzone1) of the hosted zone." + example: auto + type: string + type: object + example: null + example: + hosted_zone_name: auto + agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hidden: false + description: Scan the headquarters hourly created_at: 1576300370 - service_count_udp: 1 - service_summary: Login Page - mac_vendors: - - Dell - - Dell - service_address: 192.168.0.1 - service_ports_udp: - - "53" - - "53" - service_created_at: 1576300370 + type: scan + error: agent unavailable + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + cruncher_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 updated_at: 1576300370 - detected_by: icmp - service_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - org_name: Test Labs - comments: File Server - os: Ubuntu Linux - last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - service_transport: tcp - os_version: "18.04" - service_count: 10 - service_count_tcp: 7 - service_count_arp: 1 - services: - key: - key: services - service_ports_tcp: - - "22" - - "22" - names: - - www - - www - rtts: - key: '{}' - attributes: - key: attributes - service_vhost: www + stats: + key: "" + recur: false + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + recur_last: 1576300370 + custom_integration_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + recur_last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + hosted_zone_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + params: + key: params + created_by: user@example.com + created_by_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + start_time: 1576300370 + recur_frequency: hourly + parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + name: Hourly Scan + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + template_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + source_id: 1 + recur_next: 1576300370 + status: processed + HostedZone: + description: | + A hosted service which performs scan tasks. Hosted zones are only available to + Enterprise customers. + example: + tasks_active: 0 + updated_at: 2023-03-06T18:14:50.52Z + explorers_total: 0 + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + name: zone1 + tasks_waiting: 0 + processor_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + explorers_concurrency: 0 + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + enabled: true properties: - service_id: + id: + description: The ID of the hosted zone example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - service_asset_id: + name: + example: zone1 + type: string + enabled: + description: Whether the hosted zone is enabled + example: true + type: boolean + updated_at: + description: The last modification time of the hosted zone + example: 2023-03-06T18:14:50.52Z + format: date-time + type: string + processor_id: + description: The processor ID assigned to the hosted zone example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - service_created_at: - example: 1576300370 + explorers_concurrency: + description: The number of concurrent explorer tasks that can be executed + example: 0 format: int64 type: integer - service_updated_at: - example: 1576300370 + explorers_total: + description: The number of explorers available in the zone + example: 0 format: int64 type: integer - service_address: - example: 192.168.0.1 - type: string - service_transport: - example: tcp - type: string - service_vhost: - example: www - type: string - service_port: - example: "80" - format: port - type: string - service_data: - additionalProperties: - type: string - type: object - service_protocol: - example: http tls - type: string - service_summary: - example: Login Page - type: string - service_screenshot_link: - type: string - service_link: - example: http://192.168.0.1:80/ + tasks_active: + description: The number of tasks executing in the zone + example: 0 + format: int64 + type: integer + tasks_waiting: + description: The number of tasks waiting to execute in the zone + example: 0 + format: int64 + type: integer + organization_id: + description: The ID of the organization the hosted zone is assigned to + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid type: string + required: + - id + type: object + License: + example: + via_reseller: false + sso_type: saml20 + sso_login_issuer_url: https://accounts.google.com/o/saml2?idpid=issuer + address_postal: "78700" + license_live_asset_count: 1000 + created_at: 1576300370 + subscription_canceled_at: 1576300370 + license_expiration: 1576300370 + updated_at: 1576300370 + address_region: Texas + sso_login_message: Hello + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + settings: + key: "" + license_type: platform + address_country: US + sso_login_login_url: https://accounts.google.com/o/saml2?idpid=login + subscription_period_end: 1576300370 + sso_login_logout_url: https://accounts.google.com/o/saml2?idpid=logout + address_city: Austin + activated_at: 1576300370 + license_max_assets: 1000000 + partner: runZero + phone: 512-555-5555 + subscription_period_start: 1576300370 + sso_domain: runzero.com + address_street: 1111 Main St + license_project_asset_count: 5000 + name: My Company + sso_mode: required + subscription_cancel_at: 1576300370 + sso_default_role: viewer + properties: id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid @@ -2190,195 +11340,334 @@ components: example: 1576300370 format: int64 type: integer - organization_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid - type: string - site_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + name: + example: My Company type: string - alive: - example: true - format: boolean - type: boolean - first_seen: + activated_at: example: 1576300370 format: int64 type: integer - last_seen: + license_type: + example: platform + type: string + license_expiration: example: 1576300370 format: int64 type: integer - detected_by: - example: icmp + license_max_assets: + example: 1000000 + format: int64 + type: integer + license_live_asset_count: + example: 1000 + format: int64 + type: integer + license_project_asset_count: + example: 5000 + format: int64 + type: integer + via_reseller: + example: false + type: boolean + phone: + example: 512-555-5555 type: string - type: - example: Server + address_street: + example: 1111 Main St type: string - os: - example: Ubuntu Linux + address_country: + example: US type: string - os_version: - example: "18.04" + address_city: + example: Austin type: string - hw: - example: Dell PowerEdge 2500 + address_region: + example: Texas type: string - addresses: - items: - example: 192.168.0.1 - type: string - type: array - addresses_extra: - items: - example: 192.168.100.1 - type: string - type: array - macs: - items: - example: 11:22:33:44:55:66 - format: mac - type: string - type: array - mac_vendors: - items: - example: Dell - type: string - type: array - names: - items: - example: www - type: string - type: array - domains: - items: - example: CORPNET - type: string - type: array - service_count: - example: 10 + address_postal: + example: "78700" + type: string + subscription_period_start: + example: 1576300370 format: int64 type: integer - service_count_tcp: - example: 7 + subscription_period_end: + example: 1576300370 format: int64 type: integer - service_count_udp: - example: 1 + subscription_cancel_at: + example: 1576300370 format: int64 type: integer - service_count_arp: - example: 1 + subscription_canceled_at: + example: 1576300370 format: int64 type: integer - service_count_icmp: - example: 1 + settings: + additionalProperties: true + type: object + sso_type: + example: saml20 + type: string + sso_domain: + example: runzero.com + type: string + sso_mode: + example: required + type: string + sso_login_message: + example: Hello + type: string + sso_login_issuer_url: + example: https://accounts.google.com/o/saml2?idpid=issuer + type: string + sso_login_login_url: + example: https://accounts.google.com/o/saml2?idpid=login + type: string + sso_login_logout_url: + example: https://accounts.google.com/o/saml2?idpid=logout + type: string + sso_default_role: + example: viewer + type: string + partner: + example: runZero + type: string + type: object + Event: + example: + target_name: SiteName + target_type: api + created_at: 1576300370 + source_type: api + target_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + success: true + organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + action: login + processor_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + processed_at: 0 + details: + key: "" + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + source_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + state: SiteName + source_name: SiteName + properties: + id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + created_at: + example: 1576300370 format: int64 type: integer - lowest_ttl: + client_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + organization_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + site_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + action: + example: login + type: string + source_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + source_name: + example: SiteName + type: string + source_type: + example: api + type: string + target_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + target_name: + example: SiteName + type: string + target_type: + example: api + type: string + success: + example: true + type: boolean + details: + additionalProperties: true + type: object + state: + example: SiteName + type: string + processor_id: + example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + format: uuid + type: string + processed_at: example: 0 format: int64 type: integer - lowest_rtt: - example: 1 - format: int64 - type: integer - last_agent_id: + type: object + User: + example: + org_default_role: admin + terms_agreed_as_of: 1576300370 + last_login_at: 1576300370 + last_action_at: 1576300370 + org_roles: + key: "" + created_at: 1576300370 + last_name: Smith + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + invite_token_expiration: 1576300370 + sso_only: false + updated_at: 1576300370 + last_login_ip: 192.168.0.1 + last_activity_at: 1576300370 + name: James Smith + login_failures: 0 + mfa_enabled: false + id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + reset_token_expiration: 1576300370 + last_login_ua: curl/1.0 + first_name: James + actions: 0 + email: jsmith@example.com + password_enabled_at: 1576300370 + client_admin: true + properties: + id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - last_task_id: + client_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - newest_mac: - example: 11:22:33:44:55:66 - format: mac - type: string - newest_mac_vendor: - example: Intel Corporate - type: string - newest_mac_age: - example: 1304035200000000000 + created_at: + example: 1576300370 format: int64 type: integer - comments: - example: File Server + updated_at: + example: 1576300370 + format: int64 + type: integer + name: + example: James Smith type: string - service_ports_tcp: - items: - example: "22" - format: port - type: string - type: array - service_ports_udp: - items: - example: "53" - format: port - type: string - type: array - service_ports_protocols: - items: - example: ssh - type: string - type: array - service_ports_products: - items: - example: bind - type: string - type: array - org_name: - example: Test Labs + first_name: + example: James type: string - site_name: - example: Primary + last_name: + example: Smith type: string - agent_name: - example: LAPTOP-F4P1R6 + email: + example: jsmith@example.com type: string - tags: - additionalProperties: - type: string - type: object - services: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - rtts: + client_admin: + example: true + type: boolean + org_default_role: + example: admin + type: string + org_roles: additionalProperties: true type: object - credentials: - additionalProperties: - additionalProperties: - type: boolean - type: object - type: object - attributes: - additionalProperties: - type: string - type: object + password_enabled_at: + example: 1576300370 + format: int64 + type: integer + invite_token_expiration: + example: 1576300370 + format: int64 + type: integer + reset_token_expiration: + example: 1576300370 + format: int64 + type: integer + terms_agreed_as_of: + example: 1576300370 + format: int64 + type: integer + last_login_ip: + example: 192.168.0.1 + nullable: true + type: string + last_login_at: + example: 1576300370 + format: int64 + type: integer + last_login_ua: + example: curl/1.0 + type: string + last_activity_at: + example: 1576300370 + format: int64 + type: integer + sso_only: + example: false + type: boolean + login_failures: + example: 0 + format: int64 + type: integer + actions: + example: 0 + format: int64 + type: integer + last_action_at: + example: 1576300370 + format: int64 + type: integer + mfa_enabled: + example: false + type: boolean required: - id - - service_id type: object - Site: + Group: example: - excludes: 192.168.0.5 + org_default_role: admin + expires_at: 1576300370 + user_count: 2 updated_at: 1576300370 - permanent: true - scope: 192.168.0.0/24 - name: Primary + name: Viewers + org_roles: + key: "" + description: Viewers Group created_at: 1576300370 - description: Headquarters id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + role_summary: all:viewer + created_by_email: jsmith@example.com properties: id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string + description: + example: Viewers Group + type: string + name: + example: Viewers + type: string + role_summary: + example: all:viewer + type: string + user_count: + example: 2 + format: int64 + type: integer + created_by_email: + example: jsmith@example.com + type: string created_at: example: 1576300370 format: int64 @@ -2387,191 +11676,310 @@ components: example: 1576300370 format: int64 type: integer - permanent: - example: true - type: boolean - name: - example: Primary + expires_at: + example: 1576300370 + format: int64 + type: integer + org_default_role: + example: admin type: string + org_roles: + additionalProperties: true + type: object + required: + - id + type: object + GroupPost: + example: + org_default_role: admin + expires_at: 1576300370 + name: Viewers + org_roles: + "1a5e612e-4d64-45fe-aa3e-afba5cf3b9bf": "viewer," + fd6d6662-732b-4c4b-8331-051178994384: admin + description: Viewers Group + properties: description: - example: Headquarters + example: Viewers Group type: string - scope: - example: 192.168.0.0/24 + name: + example: Viewers type: string - excludes: - example: 192.168.0.5 + expires_at: + example: 1576300370 + format: int64 + type: integer + org_default_role: + example: admin type: string - required: - - id - - name + org_roles: + additionalProperties: true + example: + "1a5e612e-4d64-45fe-aa3e-afba5cf3b9bf": "viewer," + fd6d6662-732b-4c4b-8331-051178994384: admin + type: object type: object - Wireless: + GroupPut: example: - last_seen: 1576300370 - last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - data: - key: data - agent_name: LAPTOP-F4P1R6 - essid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - bssid: 11:22:33:44:55:66 - created_at: 1576300370 - type: infrastructure - interface: wlan0 - last_agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - site_name: Primary - encryption: aes - channels: 11, 158+1 - vendor: Ubiquiti Networks - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + org_default_role: admin + expires_at: 1576300370 + name: Viewers + org_roles: + "1a5e612e-4d64-45fe-aa3e-afba5cf3b9bf": "viewer," + fd6d6662-732b-4c4b-8331-051178994384: admin + description: Viewers Group id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - family: "223344" - org_name: Test Labs - signal: 99 - authentication: wpa2-psk properties: id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string + description: + example: Viewers Group + type: string + name: + example: Viewers + type: string + expires_at: + example: 1576300370 + format: int64 + type: integer + org_default_role: + example: admin + type: string + org_roles: + additionalProperties: true + example: + "1a5e612e-4d64-45fe-aa3e-afba5cf3b9bf": "viewer," + fd6d6662-732b-4c4b-8331-051178994384: admin + type: object + type: object + GroupMapping: + example: + sso_value: basic-attribute-value + updated_at: 1576300370 + group_id: 2b096711-4d28-4417-8635-64af4f62c1ae + group_name: Viewers Group + sso_attribute: basic-attribute + description: Maps basic-attribute to Viewers Group + created_at: 1576300370 + id: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + created_by_email: jsmith@example.com + properties: + id: + example: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + format: uuid + type: string + group_id: + example: 2b096711-4d28-4417-8635-64af4f62c1ae + format: uuid + type: string + group_name: + example: Viewers Group + type: string + sso_attribute: + example: basic-attribute + type: string + sso_value: + example: basic-attribute-value + type: string + description: + example: Maps basic-attribute to Viewers Group + type: string + created_by_email: + example: jsmith@example.com + type: string created_at: example: 1576300370 format: int64 type: integer - last_seen: + updated_at: example: 1576300370 format: int64 type: integer - organization_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + required: + - group_id + - id + - sso_attribute + - sso_value + type: object + UserOptions: + example: + org_default_role: admin + org_roles: + key: "" + last_name: Smith + first_name: James + email: jsmith@example.com + client_admin: true + properties: + first_name: + example: James type: string - site_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + last_name: + example: Smith type: string - last_agent_id: + email: + example: jsmith@example.com + type: string + client_admin: + example: true + type: boolean + org_default_role: + example: admin + type: string + org_roles: + additionalProperties: true + type: object + type: object + UserInviteOptions: + example: + org_default_role: admin + subject: Welcome to runZero + org_roles: + key: "" + last_name: Smith + message: You have been invited to the runZero Network Discovery platform + first_name: James + email: jsmith@example.com + client_admin: true + properties: + first_name: + example: James + type: string + last_name: + example: Smith + type: string + email: + example: jsmith@example.com + type: string + client_admin: + example: true + type: boolean + org_default_role: + example: admin + type: string + org_roles: + additionalProperties: true + type: object + subject: + example: Welcome to runZero + type: string + message: + example: You have been invited to the runZero Network Discovery platform + type: string + type: object + AssetServiceNow: + example: + mac_manufacturer: Dell + hw_version: "2.0" + alive: true + service_count_udp: 1 + asset_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + mac_vendors: Dell + type: Server + last_discovered: 2006-01-02 15:04:05 + sys_class_name: cmdb_ci_iot + lowest_rtt: 1 + first_discovered: 2006-01-02 15:04:05 + detected_by: icmp + mac_address: 11:22:33:44:55:66 + addresses_scope: 192.168.100.1;192.168.100.2 + addresses_extra: 192.168.0.5;192.168.0.3 + os_vendor: Microsoft + last_updated: 2006-01-02 15:04:05 + comments: File Server + os_product: Windows 10 + os_version: "1903" + service_count: 10 + domains: runzero.com;runzero.local.lan + service_count_tcp: 7 + lowest_ttl: 0 + ip_address: 192.168.0.1 + service_count_arp: 1 + tags: owner=IT;location=Austin + site: Primary + service_count_icmp: 1 + organization: Headquarters + macs: 11:22:33:44:55:66 + name: www;server + hw_product: PowerEdge + hw_vendor: Dell + newest_mac_age: 2020-01-01 + properties: + asset_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - last_task_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + organization: + example: Headquarters type: string - essid: - format: uuid + site: + example: Primary type: string - bssid: - example: 11:22:33:44:55:66 - format: mac + detected_by: + example: icmp type: string type: - example: infrastructure + example: Server type: string - authentication: - example: wpa2-psk + sys_class_name: + example: cmdb_ci_iot type: string - encryption: - example: aes + os_vendor: + example: Microsoft type: string - signal: - example: 99 - maximum: 100 - minimum: 0 - type: integer - channels: - example: 11, 158+1 + os_product: + example: Windows 10 type: string - interface: - example: wlan0 + os_version: + example: "1903" type: string - vendor: - example: Ubiquiti Networks + hw_vendor: + example: Dell type: string - family: - example: "223344" + hw_product: + example: PowerEdge type: string - data: - additionalProperties: - type: string - type: object - org_name: - example: Test Labs + hw_version: + example: "2.0" type: string - site_name: - example: Primary + ip_address: + example: 192.168.0.1 + nullable: true type: string - agent_name: - example: LAPTOP-F4P1R6 + addresses_scope: + example: 192.168.100.1;192.168.100.2 type: string - required: - - id - type: object - Organization: - example: - export_token_last_used_at: 0 - download_token: DT11226D9EEEA2B035D42569585900 - deactivated_at: 0 - service_count: 10 - download_token_created_at: 1576300370 - export_token_created_at: 1576300370 - created_at: 1576300370 - description: All subdivisions of my company - service_count_tcp: 7 - service_count_udp: 1 - service_count_arp: 1 - export_token: ET11226D9EEEA2B035D42569585900 - client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - export_token_counter: 0 - asset_count: 100 - inactive: false - service_count_icmp: 1 - updated_at: 1576300370 - permanent: true - name: My Company - export_token_last_used_by: 127.0.0.1 - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - properties: - id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + addresses_extra: + example: 192.168.0.5;192.168.0.3 type: string - created_at: - example: 1576300370 - format: int64 - type: integer - updated_at: - example: 1576300370 - format: int64 - type: integer - client_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + mac_address: + example: 11:22:33:44:55:66 + format: mac type: string - download_token: - example: DT11226D9EEEA2B035D42569585900 + mac_manufacturer: + example: Dell + type: string + newest_mac_age: + example: 2020-01-01 + type: string + macs: + example: 11:22:33:44:55:66 + format: mac + type: string + mac_vendors: + example: Dell type: string - download_token_created_at: - example: 1576300370 - format: int64 - type: integer - permanent: - example: true - type: boolean name: - example: My Company + example: www;server type: string - description: - example: All subdivisions of my company + tags: + example: owner=IT;location=Austin + type: string + domains: + example: runzero.com;runzero.local.lan type: string - inactive: - example: false - type: boolean - deactivated_at: - example: 0 - format: int64 - type: integer service_count: example: 10 format: int64 @@ -2592,320 +12000,675 @@ components: example: 1 format: int64 type: integer - asset_count: - example: 100 + lowest_ttl: + example: 0 format: int64 type: integer - export_token: - example: ET11226D9EEEA2B035D42569585900 + lowest_rtt: + example: 1 + format: int64 + type: integer + alive: + example: true + type: boolean + first_discovered: + example: 2006-01-02 15:04:05 type: string - export_token_created_at: - example: 1576300370 + last_discovered: + example: 2006-01-02 15:04:05 + type: string + last_updated: + example: 2006-01-02 15:04:05 + type: string + comments: + example: File Server + type: string + required: + - asset_id + type: object + AssetOwnershipType: + example: + reference: 1 + hidden: true + name: Asset Owner + id: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + order: 1 + properties: + id: + example: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + format: uuid + type: string + name: + example: Asset Owner + type: string + reference: + example: 1 format: int64 type: integer - export_token_last_used_at: - example: 0 + order: + example: 1 format: int64 type: integer - export_token_last_used_by: - example: 127.0.0.1 + hidden: + example: true + type: boolean + required: + - id + - name + type: object + AssetOwnershipTypePost: + example: + reference: 1 + hidden: true + name: Asset Owner + order: 1 + properties: + name: + example: Asset Owner type: string - export_token_counter: - example: 0 + reference: + example: 1 + format: int64 + type: integer + order: + example: 1 format: int64 type: integer + hidden: + example: true + type: boolean required: - - id - name type: object - APIKey: + AssetOwnerships: example: - usage_limit: 10000 - created_at: 1576300370 - counter: 1 - created_by: user@example.com - client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - token: token - usage_today: 100 - last_used_at: 0 - inactive: false - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - last_used_ua: curl/7.44.1 - comment: API key used for Splunk integration - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - last_used_ip: 127.0.0.1 + ownerships: + - owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + - owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + properties: + ownerships: + items: + $ref: "#/components/schemas/AssetOwnership" + type: array + type: object + AssetOwnershipsWithSearch: + example: + search: alive:true and os:windows + ownerships: + - owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + - owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + properties: + search: + example: alive:true and os:windows + type: string + ownerships: + items: + $ref: "#/components/schemas/AssetOwnershipsWithSearch_ownerships_inner" + type: array + required: + - ownerships + - search + type: object + BaseResponse: + description: Minimal identifying information with lifecycle metadata properties: id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + description: The unique ID of the object + example: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b format: uuid type: string client_id: + description: The unique ID of the runZero client/customer account that owns + the object example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - organization_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + created_by_id: + description: The unique ID of the entity that created the object + example: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b format: uuid type: string created_at: - example: 1576300370 - format: int64 - type: integer - created_by: - example: user@example.com - format: email - type: string - comment: - example: API key used for Splunk integration - type: string - last_used_at: - example: 0 - format: int64 - type: integer - last_used_ip: - example: 127.0.0.1 + description: A timestamp indicating creation time of the object + example: 2023-03-06T18:14:50.52Z + format: date-time type: string - last_used_ua: - example: curl/7.44.1 + updated_at: + description: A timestamp indicating last modified time of the object + example: 2023-03-06T18:14:50.52Z + format: date-time type: string - counter: - example: 1 - format: int64 - type: integer - usage_today: - example: 100 - format: int64 - type: integer - usage_limit: - example: 10000 - format: int64 - type: integer - token: + destroyed_at: + description: A timestamp indicating deletion time of the object + example: 2023-03-06T18:14:50.52Z + format: date-time type: string - inactive: - example: false - type: boolean required: + - client_id + - created_at + - created_by_id - id + - updated_at type: object - Agent: + BaseCustomIntegration: example: - os: Windows - system_info: - key: '{}' - deactivated_at: 0 - created_at: 1576300370 - last_checkin: 1576300370 - version: 1.2.3 (build 20191219224016) [fc50c5eefdc3ff5c60533c3c345d14d336396272] - client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - host_id: 6f9e6fe52271da70962e007183c5c9c9 - internal_ip: 192.168.0.1 - connected: true - hub_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - inactive: false - updated_at: 1576300370 - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - name: RUMBLE-AGENT - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - arch: amd64 - external_ip: 1.1.1.1 + name: my-custom-integration + icon: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAomVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAJAAAAABAAAAkAAAAAEABJKGAAcAAAASAAAAkKABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAABBU0NJSQAAAFNjcmVlbnNob3TIMt7LAAAACXBIWXMAABYlAAAWJQFJUiTwAAADBWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4xNDQ8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjE0NDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CtVpwSkAAAVcSURBVFgJxVbZT1xlFP/NdmdhpgwMDBQQEISWNNKCMEJtrTFuTWN88MGqaVNNH/QPMK01NU2MtjbR2GhCNFZDYkwaY4021RcfGlPKYi2pAS0FOmWnUJYCs8+d8Zxv5sqFuUyhIeFk7vbds/zO75zz3dHFSbCBot/A2CK0cb0AMJFaZOr16XPUraYED+pcSY7tdTqd8rjkel8A6Yz5XVSWQaljfn4BCz4fZDkKH11nZu7B7c5FZUUFBWcVbRBpS6AYhSMR3L49gLHxcYzfmUDQ70cg4EdPnxcTk5PiuevmLdy83r4kO344+t77OHbkHTgcdm0QFERTZFkW6719/fEXX97Pk5LmsMVdxVvjVds98eq6nfG6xj3xbTUN8R31u4TNydOfJGLEYimxNEtAWqJmA4ODKC0pEVltrfbAYbcJOskPIsTKxOw8xmYXgLvTpHNP6KlPuaXbYCD6x70zxF4n8vPcKSykLcHZb5uFv9qGJ3GtywssDKn9A85SPFpRhMIn6lBWUoSC/DxYbTa4XC60d/yJpubzeKyqhAB0U4/Mrw6Akv0cGVz47XcY3WXo7BtCZXkhPj35FQo25xMLetgyMpDlzITFbIbBYIRZXBdHzm63o+nzz/BX+6AArVthHFdkIB6LYXxyGjkOG8b7u/D0/pewb+8LSxlQPXGxZbLhBIwGA2q2V6O1tQ2ZTickSUJp8UNCe/m+sCIA1jYZDQhFosKQA0SiUeGcWgk81Tzb3A8Gg148G1RZlj1cCj4UCckx+AIhWExGSORXkbQAYpSRWhg9B2Wi+crZcvAwOZ+YncO0PwCfP4hoOILROR+GqUlDgSCmaG0kGMG50SlceuUZ7KkqE8D1eh3SAlAHF/dMQ1KUXukaHMWJX1vw48hdEBKmiWsBkHMQOEIqri6LiQbFD2ZPLWsDkLRkJ0x3p3cYtWd+AGwSCq0Scq1mGCkewaBAQIgYXCDd4WgMAbb1h2mnXMrqAwHg4KGojBMXL4vgW+xW9ATDGJmmPYG7gX7ULICZspaM2O2wIo904gU5yKamFsI6JGsDQEZMINuOTc/iF6ppuc0sgu/OzMBbz3ngzrTDTRuWRTKJ0bQTK5ssZo4FPZVEaT89l4ZkbQA4uoKAqYzIsHGd5wM48FQNXttVK5yqTzJNDn83MmiDSiatfi0aeslC+gcFAWklvSlOJQZCwh8ultb2Drx+6DAOHn4bjtwd8A4MivXlk3VfBpQAYvySYyg8MRaV8FSwSCaqO8nA4BC+bz4LV1ElEOxHlJjQkrQAeE5j0YRjmZouQiPGdeSdbrnI3PYk3f/8i59+voCWK21wFm1BttOBqeFs8NbMwomoJcGbeiV5zwnp9QbMBsIw5ZWjpa0Drx58E2e+aFJpJ4LygsLAjZ5eHD92BN09/XikeDN6u67io1Pvim+IsneoHKzcA5JZQo4rC5HJeZTnu2gbDeL8ue/Qf8u7aL8Y//81m80q7h0ZFly9cgnIrcQbhw6ItWSVxL1ySmFA2WJtVis+OH6UdpQ7uHG9Q2w8bGQmYGpZuq1QuYMh8VpnlPDhqdMY+/sP+gznCYa4pMtFsweUOu19/lmqZSu+/PobtLRfE7YWSyJDMQUmA5y84dBhSvZFY4MH9C8KOTkuODMzhY0W9QoQTQDKSzbc2diAxz314g+FmAT69rPEuemoPJe5DGOz8CXHj//1gA/WIXumXStzoUCntAA4IM+tgbJz0nddLVyKj/fVoyBrE3kxwlOe+N4rc862iUNtlXqv+Z8wVW2xy/kdO14vScuAOohWUIVi1mNMWjpqH1r3q2ZAy3g91lLGcD2crsXHhgP4D/iMWRnl47GPAAAAAElFTkSuQmCC + description: My custom integration description. + properties: + name: + description: "The unique name of the custom integration, without spaces." + example: my-custom-integration + type: string + icon: + description: Base64 encoded png with maximum size 256x256 pixels + example: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAomVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAJAAAAABAAAAkAAAAAEABJKGAAcAAAASAAAAkKABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAABBU0NJSQAAAFNjcmVlbnNob3TIMt7LAAAACXBIWXMAABYlAAAWJQFJUiTwAAADBWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4xNDQ8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjE0NDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CtVpwSkAAAVcSURBVFgJxVbZT1xlFP/NdmdhpgwMDBQQEISWNNKCMEJtrTFuTWN88MGqaVNNH/QPMK01NU2MtjbR2GhCNFZDYkwaY4021RcfGlPKYi2pAS0FOmWnUJYCs8+d8Zxv5sqFuUyhIeFk7vbds/zO75zz3dHFSbCBot/A2CK0cb0AMJFaZOr16XPUraYED+pcSY7tdTqd8rjkel8A6Yz5XVSWQaljfn4BCz4fZDkKH11nZu7B7c5FZUUFBWcVbRBpS6AYhSMR3L49gLHxcYzfmUDQ70cg4EdPnxcTk5PiuevmLdy83r4kO344+t77OHbkHTgcdm0QFERTZFkW6719/fEXX97Pk5LmsMVdxVvjVds98eq6nfG6xj3xbTUN8R31u4TNydOfJGLEYimxNEtAWqJmA4ODKC0pEVltrfbAYbcJOskPIsTKxOw8xmYXgLvTpHNP6KlPuaXbYCD6x70zxF4n8vPcKSykLcHZb5uFv9qGJ3GtywssDKn9A85SPFpRhMIn6lBWUoSC/DxYbTa4XC60d/yJpubzeKyqhAB0U4/Mrw6Akv0cGVz47XcY3WXo7BtCZXkhPj35FQo25xMLetgyMpDlzITFbIbBYIRZXBdHzm63o+nzz/BX+6AArVthHFdkIB6LYXxyGjkOG8b7u/D0/pewb+8LSxlQPXGxZbLhBIwGA2q2V6O1tQ2ZTickSUJp8UNCe/m+sCIA1jYZDQhFosKQA0SiUeGcWgk81Tzb3A8Gg148G1RZlj1cCj4UCckx+AIhWExGSORXkbQAYpSRWhg9B2Wi+crZcvAwOZ+YncO0PwCfP4hoOILROR+GqUlDgSCmaG0kGMG50SlceuUZ7KkqE8D1eh3SAlAHF/dMQ1KUXukaHMWJX1vw48hdEBKmiWsBkHMQOEIqri6LiQbFD2ZPLWsDkLRkJ0x3p3cYtWd+AGwSCq0Scq1mGCkewaBAQIgYXCDd4WgMAbb1h2mnXMrqAwHg4KGojBMXL4vgW+xW9ATDGJmmPYG7gX7ULICZspaM2O2wIo904gU5yKamFsI6JGsDQEZMINuOTc/iF6ppuc0sgu/OzMBbz3ngzrTDTRuWRTKJ0bQTK5ssZo4FPZVEaT89l4ZkbQA4uoKAqYzIsHGd5wM48FQNXttVK5yqTzJNDn83MmiDSiatfi0aeslC+gcFAWklvSlOJQZCwh8ultb2Drx+6DAOHn4bjtwd8A4MivXlk3VfBpQAYvySYyg8MRaV8FSwSCaqO8nA4BC+bz4LV1ElEOxHlJjQkrQAeE5j0YRjmZouQiPGdeSdbrnI3PYk3f/8i59+voCWK21wFm1BttOBqeFs8NbMwomoJcGbeiV5zwnp9QbMBsIw5ZWjpa0Drx58E2e+aFJpJ4LygsLAjZ5eHD92BN09/XikeDN6u67io1Pvim+IsneoHKzcA5JZQo4rC5HJeZTnu2gbDeL8ue/Qf8u7aL8Y//81m80q7h0ZFly9cgnIrcQbhw6ItWSVxL1ySmFA2WJtVis+OH6UdpQ7uHG9Q2w8bGQmYGpZuq1QuYMh8VpnlPDhqdMY+/sP+gznCYa4pMtFsweUOu19/lmqZSu+/PobtLRfE7YWSyJDMQUmA5y84dBhSvZFY4MH9C8KOTkuODMzhY0W9QoQTQDKSzbc2diAxz314g+FmAT69rPEuemoPJe5DGOz8CXHj//1gA/WIXumXStzoUCntAA4IM+tgbJz0nddLVyKj/fVoyBrE3kxwlOe+N4rc862iUNtlXqv+Z8wVW2xy/kdO14vScuAOohWUIVi1mNMWjpqH1r3q2ZAy3g91lLGcD2crsXHhgP4D/iMWRnl47GPAAAAAElFTkSuQmCC + format: byte + type: string + description: + description: A text description of the custom integration + example: My custom integration description. + type: string + type: object + CustomIntegration: + allOf: + - $ref: "#/components/schemas/BaseCustomIntegration" + - $ref: "#/components/schemas/BaseResponse" + example: + updated_at: 2023-03-06T18:14:50.52Z + name: my-custom-integration + icon: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAomVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAJAAAAABAAAAkAAAAAEABJKGAAcAAAASAAAAkKABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAABBU0NJSQAAAFNjcmVlbnNob3TIMt7LAAAACXBIWXMAABYlAAAWJQFJUiTwAAADBWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4xNDQ8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjE0NDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CtVpwSkAAAVcSURBVFgJxVbZT1xlFP/NdmdhpgwMDBQQEISWNNKCMEJtrTFuTWN88MGqaVNNH/QPMK01NU2MtjbR2GhCNFZDYkwaY4021RcfGlPKYi2pAS0FOmWnUJYCs8+d8Zxv5sqFuUyhIeFk7vbds/zO75zz3dHFSbCBot/A2CK0cb0AMJFaZOr16XPUraYED+pcSY7tdTqd8rjkel8A6Yz5XVSWQaljfn4BCz4fZDkKH11nZu7B7c5FZUUFBWcVbRBpS6AYhSMR3L49gLHxcYzfmUDQ70cg4EdPnxcTk5PiuevmLdy83r4kO344+t77OHbkHTgcdm0QFERTZFkW6719/fEXX97Pk5LmsMVdxVvjVds98eq6nfG6xj3xbTUN8R31u4TNydOfJGLEYimxNEtAWqJmA4ODKC0pEVltrfbAYbcJOskPIsTKxOw8xmYXgLvTpHNP6KlPuaXbYCD6x70zxF4n8vPcKSykLcHZb5uFv9qGJ3GtywssDKn9A85SPFpRhMIn6lBWUoSC/DxYbTa4XC60d/yJpubzeKyqhAB0U4/Mrw6Akv0cGVz47XcY3WXo7BtCZXkhPj35FQo25xMLetgyMpDlzITFbIbBYIRZXBdHzm63o+nzz/BX+6AArVthHFdkIB6LYXxyGjkOG8b7u/D0/pewb+8LSxlQPXGxZbLhBIwGA2q2V6O1tQ2ZTickSUJp8UNCe/m+sCIA1jYZDQhFosKQA0SiUeGcWgk81Tzb3A8Gg148G1RZlj1cCj4UCckx+AIhWExGSORXkbQAYpSRWhg9B2Wi+crZcvAwOZ+YncO0PwCfP4hoOILROR+GqUlDgSCmaG0kGMG50SlceuUZ7KkqE8D1eh3SAlAHF/dMQ1KUXukaHMWJX1vw48hdEBKmiWsBkHMQOEIqri6LiQbFD2ZPLWsDkLRkJ0x3p3cYtWd+AGwSCq0Scq1mGCkewaBAQIgYXCDd4WgMAbb1h2mnXMrqAwHg4KGojBMXL4vgW+xW9ATDGJmmPYG7gX7ULICZspaM2O2wIo904gU5yKamFsI6JGsDQEZMINuOTc/iF6ppuc0sgu/OzMBbz3ngzrTDTRuWRTKJ0bQTK5ssZo4FPZVEaT89l4ZkbQA4uoKAqYzIsHGd5wM48FQNXttVK5yqTzJNDn83MmiDSiatfi0aeslC+gcFAWklvSlOJQZCwh8ultb2Drx+6DAOHn4bjtwd8A4MivXlk3VfBpQAYvySYyg8MRaV8FSwSCaqO8nA4BC+bz4LV1ElEOxHlJjQkrQAeE5j0YRjmZouQiPGdeSdbrnI3PYk3f/8i59+voCWK21wFm1BttOBqeFs8NbMwomoJcGbeiV5zwnp9QbMBsIw5ZWjpa0Drx58E2e+aFJpJ4LygsLAjZ5eHD92BN09/XikeDN6u67io1Pvim+IsneoHKzcA5JZQo4rC5HJeZTnu2gbDeL8ue/Qf8u7aL8Y//81m80q7h0ZFly9cgnIrcQbhw6ItWSVxL1ySmFA2WJtVis+OH6UdpQ7uHG9Q2w8bGQmYGpZuq1QuYMh8VpnlPDhqdMY+/sP+gznCYa4pMtFsweUOu19/lmqZSu+/PobtLRfE7YWSyJDMQUmA5y84dBhSvZFY4MH9C8KOTkuODMzhY0W9QoQTQDKSzbc2diAxz314g+FmAT69rPEuemoPJe5DGOz8CXHj//1gA/WIXumXStzoUCntAA4IM+tgbJz0nddLVyKj/fVoyBrE3kxwlOe+N4rc862iUNtlXqv+Z8wVW2xy/kdO14vScuAOohWUIVi1mNMWjpqH1r3q2ZAy3g91lLGcD2crsXHhgP4D/iMWRnl47GPAAAAAElFTkSuQmCC + destroyed_at: 2023-03-06T18:14:50.52Z + description: My custom integration description. + created_at: 2023-03-06T18:14:50.52Z + id: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + created_by_id: f6cfb91a-52ea-4a86-bf9a-5a891a26f52b + client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + required: + - name + CustomIntegrationCreate: + allOf: + - $ref: "#/components/schemas/BaseCustomIntegration" + description: Request body used to register a new custom integration. + example: + name: my-custom-integration + icon: iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAomVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAJAAAAABAAAAkAAAAAEABJKGAAcAAAASAAAAkKABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAABBU0NJSQAAAFNjcmVlbnNob3TIMt7LAAAACXBIWXMAABYlAAAWJQFJUiTwAAADBWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4xNDQ8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjE0NDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CtVpwSkAAAVcSURBVFgJxVbZT1xlFP/NdmdhpgwMDBQQEISWNNKCMEJtrTFuTWN88MGqaVNNH/QPMK01NU2MtjbR2GhCNFZDYkwaY4021RcfGlPKYi2pAS0FOmWnUJYCs8+d8Zxv5sqFuUyhIeFk7vbds/zO75zz3dHFSbCBot/A2CK0cb0AMJFaZOr16XPUraYED+pcSY7tdTqd8rjkel8A6Yz5XVSWQaljfn4BCz4fZDkKH11nZu7B7c5FZUUFBWcVbRBpS6AYhSMR3L49gLHxcYzfmUDQ70cg4EdPnxcTk5PiuevmLdy83r4kO344+t77OHbkHTgcdm0QFERTZFkW6719/fEXX97Pk5LmsMVdxVvjVds98eq6nfG6xj3xbTUN8R31u4TNydOfJGLEYimxNEtAWqJmA4ODKC0pEVltrfbAYbcJOskPIsTKxOw8xmYXgLvTpHNP6KlPuaXbYCD6x70zxF4n8vPcKSykLcHZb5uFv9qGJ3GtywssDKn9A85SPFpRhMIn6lBWUoSC/DxYbTa4XC60d/yJpubzeKyqhAB0U4/Mrw6Akv0cGVz47XcY3WXo7BtCZXkhPj35FQo25xMLetgyMpDlzITFbIbBYIRZXBdHzm63o+nzz/BX+6AArVthHFdkIB6LYXxyGjkOG8b7u/D0/pewb+8LSxlQPXGxZbLhBIwGA2q2V6O1tQ2ZTickSUJp8UNCe/m+sCIA1jYZDQhFosKQA0SiUeGcWgk81Tzb3A8Gg148G1RZlj1cCj4UCckx+AIhWExGSORXkbQAYpSRWhg9B2Wi+crZcvAwOZ+YncO0PwCfP4hoOILROR+GqUlDgSCmaG0kGMG50SlceuUZ7KkqE8D1eh3SAlAHF/dMQ1KUXukaHMWJX1vw48hdEBKmiWsBkHMQOEIqri6LiQbFD2ZPLWsDkLRkJ0x3p3cYtWd+AGwSCq0Scq1mGCkewaBAQIgYXCDd4WgMAbb1h2mnXMrqAwHg4KGojBMXL4vgW+xW9ATDGJmmPYG7gX7ULICZspaM2O2wIo904gU5yKamFsI6JGsDQEZMINuOTc/iF6ppuc0sgu/OzMBbz3ngzrTDTRuWRTKJ0bQTK5ssZo4FPZVEaT89l4ZkbQA4uoKAqYzIsHGd5wM48FQNXttVK5yqTzJNDn83MmiDSiatfi0aeslC+gcFAWklvSlOJQZCwh8ultb2Drx+6DAOHn4bjtwd8A4MivXlk3VfBpQAYvySYyg8MRaV8FSwSCaqO8nA4BC+bz4LV1ElEOxHlJjQkrQAeE5j0YRjmZouQiPGdeSdbrnI3PYk3f/8i59+voCWK21wFm1BttOBqeFs8NbMwomoJcGbeiV5zwnp9QbMBsIw5ZWjpa0Drx58E2e+aFJpJ4LygsLAjZ5eHD92BN09/XikeDN6u67io1Pvim+IsneoHKzcA5JZQo4rC5HJeZTnu2gbDeL8ue/Qf8u7aL8Y//81m80q7h0ZFly9cgnIrcQbhw6ItWSVxL1ySmFA2WJtVis+OH6UdpQ7uHG9Q2w8bGQmYGpZuq1QuYMh8VpnlPDhqdMY+/sP+gznCYa4pMtFsweUOu19/lmqZSu+/PobtLRfE7YWSyJDMQUmA5y84dBhSvZFY4MH9C8KOTkuODMzhY0W9QoQTQDKSzbc2diAxz314g+FmAT69rPEuemoPJe5DGOz8CXHj//1gA/WIXumXStzoUCntAA4IM+tgbJz0nddLVyKj/fVoyBrE3kxwlOe+N4rc862iUNtlXqv+Z8wVW2xy/kdO14vScuAOohWUIVi1mNMWjpqH1r3q2ZAy3g91lLGcD2crsXHhgP4D/iMWRnl47GPAAAAAElFTkSuQmCC + description: My custom integration description. + required: + - name + NewAssetImport: + description: | + Represents a request to import asset data described by the specified custom integration into the specified site. + + Assets will be created new or merged according to merge rules defined by the version of the platform + you are uploading the asset data file to. Typically, this involves matching network and other unique + single or grouped properties. + + There is a maximum of 256 custom asset properties that can be applied to any asset. This means + that, aside from the per-import asset property limit set on ImportAsset, if a new import sets + different custom properties on the same asset, the new properties are combined with the + pre-existing ones. properties: - id: + siteId: + description: The ID of the site assets are to be imported into. example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - client_id: + customIntegrationId: + description: The unique ID of the registered custom integration which produced + the asset data. Uniqueness is not checked/enforced. See /account/custom-integrations + api. example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - organization_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + importTask: + $ref: "#/components/schemas/ImportTask" + assetData: + description: | + A gzip (not .tar.gz) compressed file containing ImportAsset objects. The file data may be a JSON array of + ImportAsset objects, e.g. [{},{},...] or JSONL format, with a single JSON representation of an ImportAsset + object on each new line, e.g. {}\n{}\n... + format: binary type: string - created_at: - example: 1576300370 - format: int64 - type: integer - updated_at: - example: 1576300370 - format: int64 - type: integer - host_id: - example: 6f9e6fe52271da70962e007183c5c9c9 + required: + - assetData + - customIntegrationId + - importTask + - siteId + type: object + ImportAsset: + description: Represents a custom asset to be created or merged after import. + properties: + id: + description: Any value which can uniquely identify the asset within the + custom integration. + maxLength: 1024 type: string - hub_id: + runZeroID: + description: The unique identifier of the runZero asset to merge into. example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - name: - example: RUMBLE-AGENT - format: hostname - type: string - site_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + networkInterfaces: + description: The asset's networking configuration. + items: + $ref: "#/components/schemas/NetworkInterface" + maxItems: 256 + title: NetworkInterfaces + type: array + hostnames: + description: "Represents hostnames the asset is assigned or reachable at.\ + \ These can be fully-qualified hostnames with the domain name, or a short\ + \ hostname." + items: + example: host.domain.com + maxLength: 260 + type: string + maxItems: 100 + type: array + domain: + description: Represents a single domain name which could be applied to all + non-fqdns in the hostnames field. + example: domain.com + maxLength: 260 + type: string + firstSeenTS: + description: "Represents the earliest time the asset was seen by the custom\ + \ integration reporting it, using a date string as defined by RFC 3339,\ + \ section 5.6." + example: 2023-03-06T18:14:50.52Z + format: date-time type: string - last_checkin: - example: 1576300370 - format: int64 - type: integer os: - example: Windows - type: string - arch: - example: amd64 - type: string - version: - example: 1.2.3 (build 20191219224016) [fc50c5eefdc3ff5c60533c3c345d14d336396272] - type: string - external_ip: - example: 1.1.1.1 + description: The name of the asset's operating system. It is advisable to + keep the data clean by normalizing to existing values when possible. + example: Ubuntu Linux 22.04 + maxLength: 1024 + type: string + osVersion: + description: The version of the asset's operating system. It is advisable + to keep the data clean by normalizing to existing values when possible. + example: "22.04" + maxLength: 1024 + type: string + manufacturer: + description: The manufacturer of the operating system of the asset. It is + advisable to keep the data clean by normalizing to existing values when + possible. + example: Apple Inc. + maxLength: 1024 + type: string + model: + description: The hardware model of the asset. It is advisable to keep the + data clean by normalizing to existing values when possible. + example: Macbook Air + maxLength: 1024 type: string - internal_ip: - example: 192.168.0.1 + tags: + description: Arbitrary string tags applied to the asset. + example: + - foo + - key=value + items: + maxLength: 1024 + type: string + maxItems: 100 + type: array + deviceType: + example: Desktop + maxLength: 1024 type: string - system_info: - additionalProperties: true + customAttributes: + additionalProperties: + $ref: "#/components/schemas/CustomAttributes_value" + description: "Flat map of arbitrary string key/value pairs representing\ + \ custom attribute data not described in properties above. Note the maximum\ + \ number of keys and length of values. Additionally, property names may\ + \ only be 256 characters long." + maxProperties: 1024 + title: CustomAttributes type: object - connected: - example: true - type: boolean - inactive: - example: false - type: boolean - deactivated_at: - example: 0 - format: int64 - type: integer required: - id type: object - Task: + AccessToken: example: - agent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - hidden: false - description: Scan the headquarters hourly - created_at: 1576300370 - type: scan - error: agent unavailable - client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - cruncher_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - updated_at: 1576300370 - stats: - key: '{}' - recur: false - id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - recur_last: 1576300370 - recur_last_task_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - params: - key: params - created_by: user@example.com - created_by_user_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - start_time: 1576300370 - recur_frequency: hour - parent_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - organization_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - name: Hourly Scan - site_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - recur_next: 1576300370 - status: processed + access_token: access_token + token_type: token_type + expires_in: 0 properties: - id: + access_token: + type: string + token_type: + type: string + expires_in: + type: integer + type: object + APIClientCredentials: + description: Newly-issued OAuth client credentials returned when creating an + API client. + example: + api_client_id: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + api_client_secret: api_client_secret + properties: + api_client_id: example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 format: uuid type: string - name: - example: Hourly Scan + api_client_secret: type: string - description: - example: Scan the headquarters hourly + type: object + ClientIDForm: + properties: + grant_type: + example: client_credential type: string client_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid type: string - organization_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + client_secret: type: string - agent_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + required: + - client_id + - client_secret + - grant_type + type: object + AssetPage: + description: A page of assets returned from a paginated export. + properties: + assets: + items: + $ref: "#/components/schemas/Asset" + type: array + next_key: + description: The key to use for the next page of results type: string - site_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + type: object + AssetExportResponse: + description: | + Response body for the asset export endpoint. When `page_size` is omitted the response is a bare array of assets; + when `page_size` is set the response is a paged `AssetPage` object. + oneOf: + - items: + $ref: "#/components/schemas/Asset" + type: array + - $ref: "#/components/schemas/AssetPage" + ServicePage: + description: A page of services returned from a paginated export. + properties: + services: + items: + $ref: "#/components/schemas/Service" + type: array + next_key: + description: The key to use for the next page of results type: string - cruncher_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + type: object + ServiceExportResponse: + description: Response body for the service export endpoint. Bare array unless + `page_size` is provided. + oneOf: + - items: + $ref: "#/components/schemas/Service" + type: array + - $ref: "#/components/schemas/ServicePage" + WirelessPage: + description: A page of wireless devices returned from a paginated export. + properties: + wireless: + items: + $ref: "#/components/schemas/Wireless" + type: array + next_key: + description: The key to use for the next page of results type: string - created_at: - example: 1576300370 - format: int64 - type: integer - created_by: - example: user@example.com - format: email + type: object + WirelessExportResponse: + description: Response body for the wireless export endpoint. Bare array unless + `page_size` is provided. + oneOf: + - items: + $ref: "#/components/schemas/Wireless" + type: array + - $ref: "#/components/schemas/WirelessPage" + SoftwarePage: + description: A page of software inventory entries returned from a paginated + export. + properties: + software: + items: + $ref: "#/components/schemas/Software" + type: array + next_key: + description: The key to use for the next page of results type: string - created_by_user_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 + type: object + SoftwareExportResponse: + description: Response body for the software export endpoint. Bare array unless + `page_size` is provided. + oneOf: + - items: + $ref: "#/components/schemas/Software" + type: array + - $ref: "#/components/schemas/SoftwarePage" + VulnerabilityPage: + description: A page of vulnerabilities returned from a paginated export. + properties: + vulnerabilities: + items: + $ref: "#/components/schemas/Vulnerability" + type: array + next_key: + description: The key to use for the next page of results + type: string + type: object + VulnerabilityExportResponse: + description: Response body for the vulnerability export endpoint. Bare array + unless `page_size` is provided. + oneOf: + - items: + $ref: "#/components/schemas/Vulnerability" + type: array + - $ref: "#/components/schemas/VulnerabilityPage" + EventPage: + description: A page of events returned from a paginated export. + properties: + events: + items: + $ref: "#/components/schemas/Event" + type: array + next_key: + description: The key to use for the next page of results + type: string + type: object + EventExportResponse: + description: Response body for the event export endpoint. Bare array unless + `page_size` is provided. + oneOf: + - items: + $ref: "#/components/schemas/Event" + type: array + - $ref: "#/components/schemas/EventPage" + AssetMetric: + description: "Asset metric summary for a single asset, keyed by asset ID in\ + \ the parent map." + properties: + site_id: format: uuid type: string - updated_at: - example: 1576300370 - format: int64 + metrics: + additionalProperties: true + description: Free-form metric values keyed by metric name. + type: object + type: object + BulkAssetUpdateResult: + description: Result of a bulk asset update operation. + example: + updated_asset_count: 10 + properties: + updated_asset_count: + example: 10 type: integer - type: - example: scan + type: object + FindingLink: + description: A title and URL pointing to additional finding context. + example: + title: title + url: url + properties: + title: type: string - status: - example: processed + url: type: string - error: - example: agent unavailable + type: object + FindingLinks: + description: Groups of related URLs that provide additional context for a finding. + example: + urls: + - title: title + url: url + - title: title + url: url + rz_blog: + - title: title + url: url + - title: title + url: url + cves: + - title: title + url: url + - title: title + url: url + properties: + cves: + description: URLs of relevant CVE records. + items: + $ref: "#/components/schemas/FindingLink" + type: array + rz_blog: + description: URLs of relevant runZero blog postings. + items: + $ref: "#/components/schemas/FindingLink" + type: array + urls: + description: Additional relevant URLs. + items: + $ref: "#/components/schemas/FindingLink" + type: array + type: object + AssetOwnership: + description: A single ownership assignment on an asset. + example: + owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + properties: + ownership_type_id: + example: 2318e078-4164-4e1b-92a5-11e353093f4b type: string - params: - additionalProperties: + owner: + example: it@runzero.com + type: string + type: object + NetworkInterface: + description: A network interface attached to a custom-integration asset. + properties: + ipv4Addresses: + description: Represents IPV4 addresses. Addresses are ordered from most + to least likely to uniquely identify the asset. + items: + format: ipv4 type: string - type: object - stats: - additionalProperties: true - type: object - hidden: - example: false - type: boolean - parent_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + maxItems: 256 + type: array + ipv6Addresses: + description: Represents the IPV6 addresses. Addresses are ordered from most + to least likely to uniquely identify the asset. + items: + format: ipv6 + type: string + maxItems: 100 + type: array + macAddress: + description: | + Represents a MAC address in IEEE 802 MAC/EUI-48, or EUI-64 form in one of the following formats: + 01:23:45:67:89:AB + 01:23:45:67:89:ab:cd:ef + 01-23-45-67-89-ab + 01-23-45-67-89-ab-cd-ef + 0123.4567.89ab + 0123.4567.89ab.cdef + 0123 4567 89ab cdEF + example: 01:23:45:67:89:0A + maxLength: 23 type: string - recur: - example: false - type: boolean - recur_frequency: - example: hour + type: object + ImportTask: + description: Information which describes the task created when asset data is + imported. + properties: + name: + example: my import task + maxLength: 100 type: string - start_time: - example: 1576300370 - format: int64 - type: integer - recur_last: - example: 1576300370 - format: int64 - type: integer - recur_next: - example: 1576300370 + description: + example: importing assets from custom integration A + maxLength: 1024 + type: string + excludeUnknown: + default: false + description: Instructs the data ingestion process whether to skip assets + which do not merge into an existing asset in the asset inventory + example: true + type: boolean + tags: + description: Arbitrary string tag values which are applied to the asset + data import task created. + example: + - tag1 + - tag2 + items: + maxLength: 1024 + type: string + maxItems: 100 + type: array + required: + - name + type: object + AgentPatchedSettings_settings: + example: + max_concurrent_scans: 5 + properties: + max_concurrent_scans: + example: 5 format: int64 type: integer - recur_last_task_id: - example: e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8 - format: uuid + type: object + AssetOwnershipsWithSearch_ownerships_inner: + example: + owner: it@runzero.com + ownership_type_id: 2318e078-4164-4e1b-92a5-11e353093f4b + properties: + ownership_type_id: + example: 2318e078-4164-4e1b-92a5-11e353093f4b + type: string + owner: + example: it@runzero.com type: string - required: - - id type: object + CustomAttributes_value: + anyOf: + - maxLength: 1024 + type: string securitySchemes: bearerAuth: scheme: bearer type: http + oauthDefaults: + flows: + clientCredentials: + scopes: {} + tokenUrl: https://console.runzero.com/api/v1.0/account/api/token + type: oauth2 diff --git a/go/api_account.go b/go/api_account.go new file mode 100644 index 0000000..c3ad972 --- /dev/null +++ b/go/api_account.go @@ -0,0 +1,8189 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// AccountAPIService AccountAPI service +type AccountAPIService service + +type ApiCreateAccountAssetOwnershipTypesRequest struct { + ctx context.Context + ApiService *AccountAPIService + assetOwnershipTypePost *[]AssetOwnershipTypePost +} + +// array of asset ownership types +func (r ApiCreateAccountAssetOwnershipTypesRequest) AssetOwnershipTypePost(assetOwnershipTypePost []AssetOwnershipTypePost) ApiCreateAccountAssetOwnershipTypesRequest { + r.assetOwnershipTypePost = &assetOwnershipTypePost + return r +} + +func (r ApiCreateAccountAssetOwnershipTypesRequest) Execute() ([]AssetOwnershipType, *http.Response, error) { + return r.ApiService.CreateAccountAssetOwnershipTypesExecute(r) +} + +/* +CreateAccountAssetOwnershipTypes Create new asset ownership types + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountAssetOwnershipTypesRequest +*/ +func (a *AccountAPIService) CreateAccountAssetOwnershipTypes(ctx context.Context) ApiCreateAccountAssetOwnershipTypesRequest { + return ApiCreateAccountAssetOwnershipTypesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetOwnershipType +func (a *AccountAPIService) CreateAccountAssetOwnershipTypesExecute(r ApiCreateAccountAssetOwnershipTypesRequest) ([]AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountAssetOwnershipTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetOwnershipTypePost == nil { + return localVarReturnValue, nil, reportError("assetOwnershipTypePost is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetOwnershipTypePost + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountCredentialRequest struct { + ctx context.Context + ApiService *AccountAPIService + credentialOptions *CredentialOptions +} + +// credential parameters +func (r ApiCreateAccountCredentialRequest) CredentialOptions(credentialOptions CredentialOptions) ApiCreateAccountCredentialRequest { + r.credentialOptions = &credentialOptions + return r +} + +func (r ApiCreateAccountCredentialRequest) Execute() (*Credential, *http.Response, error) { + return r.ApiService.CreateAccountCredentialExecute(r) +} + +/* +CreateAccountCredential Create a new credential + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountCredentialRequest +*/ +func (a *AccountAPIService) CreateAccountCredential(ctx context.Context) ApiCreateAccountCredentialRequest { + return ApiCreateAccountCredentialRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Credential +func (a *AccountAPIService) CreateAccountCredentialExecute(r ApiCreateAccountCredentialRequest) (*Credential, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Credential + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountCredential") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/credentials" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.credentialOptions == nil { + return localVarReturnValue, nil, reportError("credentialOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.credentialOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountCustomIntegrationRequest struct { + ctx context.Context + ApiService *AccountAPIService + customIntegrationCreate *CustomIntegrationCreate +} + +// The description of the custom integration +func (r ApiCreateAccountCustomIntegrationRequest) CustomIntegrationCreate(customIntegrationCreate CustomIntegrationCreate) ApiCreateAccountCustomIntegrationRequest { + r.customIntegrationCreate = &customIntegrationCreate + return r +} + +func (r ApiCreateAccountCustomIntegrationRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.CreateAccountCustomIntegrationExecute(r) +} + +/* +CreateAccountCustomIntegration Create a new custom integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountCustomIntegrationRequest +*/ +func (a *AccountAPIService) CreateAccountCustomIntegration(ctx context.Context) ApiCreateAccountCustomIntegrationRequest { + return ApiCreateAccountCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) CreateAccountCustomIntegrationExecute(r ApiCreateAccountCustomIntegrationRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountCustomIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.customIntegrationCreate == nil { + return localVarReturnValue, nil, reportError("customIntegrationCreate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.customIntegrationCreate + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountCustomIntegrationAndIDRequest struct { + ctx context.Context + ApiService *AccountAPIService + customIntegrationId string + customIntegrationCreate *CustomIntegrationCreate +} + +// single custom integration type +func (r ApiCreateAccountCustomIntegrationAndIDRequest) CustomIntegrationCreate(customIntegrationCreate CustomIntegrationCreate) ApiCreateAccountCustomIntegrationAndIDRequest { + r.customIntegrationCreate = &customIntegrationCreate + return r +} + +func (r ApiCreateAccountCustomIntegrationAndIDRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.CreateAccountCustomIntegrationAndIDExecute(r) +} + +/* +CreateAccountCustomIntegrationAndID Replace custom integration at provided ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiCreateAccountCustomIntegrationAndIDRequest +*/ +func (a *AccountAPIService) CreateAccountCustomIntegrationAndID(ctx context.Context, customIntegrationId string) ApiCreateAccountCustomIntegrationAndIDRequest { + return ApiCreateAccountCustomIntegrationAndIDRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) CreateAccountCustomIntegrationAndIDExecute(r ApiCreateAccountCustomIntegrationAndIDRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountCustomIntegrationAndID") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations/{customIntegrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"customIntegrationId"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.customIntegrationCreate == nil { + return localVarReturnValue, nil, reportError("customIntegrationCreate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.customIntegrationCreate + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountGroupRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupPost *GroupPost +} + +func (r ApiCreateAccountGroupRequest) GroupPost(groupPost GroupPost) ApiCreateAccountGroupRequest { + r.groupPost = &groupPost + return r +} + +func (r ApiCreateAccountGroupRequest) Execute() (*Group, *http.Response, error) { + return r.ApiService.CreateAccountGroupExecute(r) +} + +/* +CreateAccountGroup Create a new group + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountGroupRequest +*/ +func (a *AccountAPIService) CreateAccountGroup(ctx context.Context) ApiCreateAccountGroupRequest { + return ApiCreateAccountGroupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Group +func (a *AccountAPIService) CreateAccountGroupExecute(r ApiCreateAccountGroupRequest) (*Group, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Group + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupPost == nil { + return localVarReturnValue, nil, reportError("groupPost is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupPost + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountGroupMappingRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupMapping *GroupMapping +} + +func (r ApiCreateAccountGroupMappingRequest) GroupMapping(groupMapping GroupMapping) ApiCreateAccountGroupMappingRequest { + r.groupMapping = &groupMapping + return r +} + +func (r ApiCreateAccountGroupMappingRequest) Execute() (*GroupMapping, *http.Response, error) { + return r.ApiService.CreateAccountGroupMappingExecute(r) +} + +/* +CreateAccountGroupMapping Create a new SSO group mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountGroupMappingRequest +*/ +func (a *AccountAPIService) CreateAccountGroupMapping(ctx context.Context) ApiCreateAccountGroupMappingRequest { + return ApiCreateAccountGroupMappingRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GroupMapping +func (a *AccountAPIService) CreateAccountGroupMappingExecute(r ApiCreateAccountGroupMappingRequest) (*GroupMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountGroupMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sso/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupMapping == nil { + return localVarReturnValue, nil, reportError("groupMapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupMapping + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountKeyRequest struct { + ctx context.Context + ApiService *AccountAPIService + aPIKeyOptions *APIKeyOptions +} + +// key parameters +func (r ApiCreateAccountKeyRequest) APIKeyOptions(aPIKeyOptions APIKeyOptions) ApiCreateAccountKeyRequest { + r.aPIKeyOptions = &aPIKeyOptions + return r +} + +func (r ApiCreateAccountKeyRequest) Execute() (*OrganizationAPIKey, *http.Response, error) { + return r.ApiService.CreateAccountKeyExecute(r) +} + +/* +CreateAccountKey Create a new key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountKeyRequest +*/ +func (a *AccountAPIService) CreateAccountKey(ctx context.Context) ApiCreateAccountKeyRequest { + return ApiCreateAccountKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OrganizationAPIKey +func (a *AccountAPIService) CreateAccountKeyExecute(r ApiCreateAccountKeyRequest) (*OrganizationAPIKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationAPIKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/keys" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.aPIKeyOptions == nil { + return localVarReturnValue, nil, reportError("aPIKeyOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.aPIKeyOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountOrganizationRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgOptions *OrgOptions +} + +// organization definition +func (r ApiCreateAccountOrganizationRequest) OrgOptions(orgOptions OrgOptions) ApiCreateAccountOrganizationRequest { + r.orgOptions = &orgOptions + return r +} + +func (r ApiCreateAccountOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.CreateAccountOrganizationExecute(r) +} + +/* +CreateAccountOrganization Create a new organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountOrganizationRequest +*/ +func (a *AccountAPIService) CreateAccountOrganization(ctx context.Context) ApiCreateAccountOrganizationRequest { + return ApiCreateAccountOrganizationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Organization +func (a *AccountAPIService) CreateAccountOrganizationExecute(r ApiCreateAccountOrganizationRequest) (*Organization, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountOrganization") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.orgOptions == nil { + return localVarReturnValue, nil, reportError("orgOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.orgOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountOrganizationExportTokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string + exportTokenOptions *ExportTokenOptions +} + +// export token parameters +func (r ApiCreateAccountOrganizationExportTokenRequest) ExportTokenOptions(exportTokenOptions ExportTokenOptions) ApiCreateAccountOrganizationExportTokenRequest { + r.exportTokenOptions = &exportTokenOptions + return r +} + +func (r ApiCreateAccountOrganizationExportTokenRequest) Execute() (*ExportToken, *http.Response, error) { + return r.ApiService.CreateAccountOrganizationExportTokenExecute(r) +} + +/* +CreateAccountOrganizationExportToken Create a new export token for an organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to create an export token for + @return ApiCreateAccountOrganizationExportTokenRequest +*/ +func (a *AccountAPIService) CreateAccountOrganizationExportToken(ctx context.Context, orgId string) ApiCreateAccountOrganizationExportTokenRequest { + return ApiCreateAccountOrganizationExportTokenRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// @return ExportToken +func (a *AccountAPIService) CreateAccountOrganizationExportTokenExecute(r ApiCreateAccountOrganizationExportTokenRequest) (*ExportToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountOrganizationExportToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportTokens" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.exportTokenOptions == nil { + return localVarReturnValue, nil, reportError("exportTokenOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.exportTokenOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountScanTemplateRequest struct { + ctx context.Context + ApiService *AccountAPIService + scanTemplateOptions *ScanTemplateOptions +} + +func (r ApiCreateAccountScanTemplateRequest) ScanTemplateOptions(scanTemplateOptions ScanTemplateOptions) ApiCreateAccountScanTemplateRequest { + r.scanTemplateOptions = &scanTemplateOptions + return r +} + +func (r ApiCreateAccountScanTemplateRequest) Execute() (*ScanTemplate, *http.Response, error) { + return r.ApiService.CreateAccountScanTemplateExecute(r) +} + +/* +CreateAccountScanTemplate Create a new scan template + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountScanTemplateRequest +*/ +func (a *AccountAPIService) CreateAccountScanTemplate(ctx context.Context) ApiCreateAccountScanTemplateRequest { + return ApiCreateAccountScanTemplateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ScanTemplate +func (a *AccountAPIService) CreateAccountScanTemplateExecute(r ApiCreateAccountScanTemplateRequest) (*ScanTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScanTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountScanTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks/templates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scanTemplateOptions == nil { + return localVarReturnValue, nil, reportError("scanTemplateOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scanTemplateOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountUserRequest struct { + ctx context.Context + ApiService *AccountAPIService + userOptions *UserOptions +} + +// user parameters +func (r ApiCreateAccountUserRequest) UserOptions(userOptions UserOptions) ApiCreateAccountUserRequest { + r.userOptions = &userOptions + return r +} + +func (r ApiCreateAccountUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateAccountUserExecute(r) +} + +/* +CreateAccountUser Create a new user account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountUserRequest +*/ +func (a *AccountAPIService) CreateAccountUser(ctx context.Context) ApiCreateAccountUserRequest { + return ApiCreateAccountUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) CreateAccountUserExecute(r ApiCreateAccountUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userOptions == nil { + return localVarReturnValue, nil, reportError("userOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAccountUserInviteRequest struct { + ctx context.Context + ApiService *AccountAPIService + userInviteOptions *UserInviteOptions +} + +// user invite parameters +func (r ApiCreateAccountUserInviteRequest) UserInviteOptions(userInviteOptions UserInviteOptions) ApiCreateAccountUserInviteRequest { + r.userInviteOptions = &userInviteOptions + return r +} + +func (r ApiCreateAccountUserInviteRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateAccountUserInviteExecute(r) +} + +/* +CreateAccountUserInvite Create a new user account and send an email invite + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAccountUserInviteRequest +*/ +func (a *AccountAPIService) CreateAccountUserInvite(ctx context.Context) ApiCreateAccountUserInviteRequest { + return ApiCreateAccountUserInviteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) CreateAccountUserInviteExecute(r ApiCreateAccountUserInviteRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.CreateAccountUserInvite") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/invite" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userInviteOptions == nil { + return localVarReturnValue, nil, reportError("userInviteOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userInviteOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAccountAssetOwnershipTypeRequest struct { + ctx context.Context + ApiService *AccountAPIService + ownershipTypeId string +} + +func (r ApiDeleteAccountAssetOwnershipTypeRequest) Execute() ([]AssetOwnershipType, *http.Response, error) { + return r.ApiService.DeleteAccountAssetOwnershipTypeExecute(r) +} + +/* +DeleteAccountAssetOwnershipType Delete a single asset ownership type + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ownershipTypeId UUID of the asset ownership type + @return ApiDeleteAccountAssetOwnershipTypeRequest +*/ +func (a *AccountAPIService) DeleteAccountAssetOwnershipType(ctx context.Context, ownershipTypeId string) ApiDeleteAccountAssetOwnershipTypeRequest { + return ApiDeleteAccountAssetOwnershipTypeRequest{ + ApiService: a, + ctx: ctx, + ownershipTypeId: ownershipTypeId, + } +} + +// Execute executes the request +// @return []AssetOwnershipType +func (a *AccountAPIService) DeleteAccountAssetOwnershipTypeExecute(r ApiDeleteAccountAssetOwnershipTypeRequest) ([]AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.DeleteAccountAssetOwnershipType") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types/{ownership_type_id}" + localVarPath = strings.Replace(localVarPath, "{"+"ownership_type_id"+"}", url.PathEscape(parameterValueToString(r.ownershipTypeId, "ownershipTypeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAccountAssetOwnershipTypesRequest struct { + ctx context.Context + ApiService *AccountAPIService + requestBody *[]string +} + +// Array of ids +func (r ApiDeleteAccountAssetOwnershipTypesRequest) RequestBody(requestBody []string) ApiDeleteAccountAssetOwnershipTypesRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiDeleteAccountAssetOwnershipTypesRequest) Execute() ([]AssetOwnershipType, *http.Response, error) { + return r.ApiService.DeleteAccountAssetOwnershipTypesExecute(r) +} + +/* +DeleteAccountAssetOwnershipTypes Delete asset ownership types + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDeleteAccountAssetOwnershipTypesRequest +*/ +func (a *AccountAPIService) DeleteAccountAssetOwnershipTypes(ctx context.Context) ApiDeleteAccountAssetOwnershipTypesRequest { + return ApiDeleteAccountAssetOwnershipTypesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetOwnershipType +func (a *AccountAPIService) DeleteAccountAssetOwnershipTypesExecute(r ApiDeleteAccountAssetOwnershipTypesRequest) ([]AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.DeleteAccountAssetOwnershipTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAccountCustomIntegrationRequest struct { + ctx context.Context + ApiService *AccountAPIService + customIntegrationId string +} + +func (r ApiDeleteAccountCustomIntegrationRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.DeleteAccountCustomIntegrationExecute(r) +} + +/* +DeleteAccountCustomIntegration Delete an custom integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiDeleteAccountCustomIntegrationRequest +*/ +func (a *AccountAPIService) DeleteAccountCustomIntegration(ctx context.Context, customIntegrationId string) ApiDeleteAccountCustomIntegrationRequest { + return ApiDeleteAccountCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) DeleteAccountCustomIntegrationExecute(r ApiDeleteAccountCustomIntegrationRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.DeleteAccountCustomIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations/{customIntegrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"customIntegrationId"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAccountOrganizationExportTokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string + keyId string +} + +func (r ApiDeleteAccountOrganizationExportTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAccountOrganizationExportTokenExecute(r) +} + +/* +DeleteAccountOrganizationExportToken Removes the export token from the specified organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @param keyId UUID of the export token ID to remove + @return ApiDeleteAccountOrganizationExportTokenRequest +*/ +func (a *AccountAPIService) DeleteAccountOrganizationExportToken(ctx context.Context, orgId string, keyId string) ApiDeleteAccountOrganizationExportTokenRequest { + return ApiDeleteAccountOrganizationExportTokenRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + keyId: keyId, + } +} + +// Execute executes the request +func (a *AccountAPIService) DeleteAccountOrganizationExportTokenExecute(r ApiDeleteAccountOrganizationExportTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.DeleteAccountOrganizationExportToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportTokens/{key_id}" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAccountOrganizationExportTokenDeprecatedRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string +} + +func (r ApiDeleteAccountOrganizationExportTokenDeprecatedRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAccountOrganizationExportTokenDeprecatedExecute(r) +} + +/* +DeleteAccountOrganizationExportTokenDeprecated Removes the export token from the specified organization + +This API has been deprecated. Please use `DELETE /account/orgs/{org_id}/exportTokens/{key_id}` instead. This API will fail if more than one export tokens exist for the given organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @return ApiDeleteAccountOrganizationExportTokenDeprecatedRequest + +Deprecated +*/ +func (a *AccountAPIService) DeleteAccountOrganizationExportTokenDeprecated(ctx context.Context, orgId string) ApiDeleteAccountOrganizationExportTokenDeprecatedRequest { + return ApiDeleteAccountOrganizationExportTokenDeprecatedRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// Deprecated +func (a *AccountAPIService) DeleteAccountOrganizationExportTokenDeprecatedExecute(r ApiDeleteAccountOrganizationExportTokenDeprecatedRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.DeleteAccountOrganizationExportTokenDeprecated") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportToken" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiExportEventsJSONRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string + fields *string + pageSize *int32 + startKey *string +} + +// an optional search string for filtering results +func (r ApiExportEventsJSONRequest) Search(search string) ApiExportEventsJSONRequest { + r.search = &search + return r +} + +// an optional list of fields to export, comma-separated +func (r ApiExportEventsJSONRequest) Fields(fields string) ApiExportEventsJSONRequest { + r.fields = &fields + return r +} + +// The number of results to return per request. +func (r ApiExportEventsJSONRequest) PageSize(pageSize int32) ApiExportEventsJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportEventsJSONRequest) StartKey(startKey string) ApiExportEventsJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportEventsJSONRequest) Execute() (*EventExportResponse, *http.Response, error) { + return r.ApiService.ExportEventsJSONExecute(r) +} + +/* +ExportEventsJSON System event log as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportEventsJSONRequest +*/ +func (a *AccountAPIService) ExportEventsJSON(ctx context.Context) ApiExportEventsJSONRequest { + return ApiExportEventsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return EventExportResponse +func (a *AccountAPIService) ExportEventsJSONExecute(r ApiExportEventsJSONRequest) (*EventExportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EventExportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.ExportEventsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/events.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportEventsJSONLRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string + fields *string +} + +// an optional search string for filtering results +func (r ApiExportEventsJSONLRequest) Search(search string) ApiExportEventsJSONLRequest { + r.search = &search + return r +} + +// an optional list of fields to export, comma-separated +func (r ApiExportEventsJSONLRequest) Fields(fields string) ApiExportEventsJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportEventsJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportEventsJSONLExecute(r) +} + +/* +ExportEventsJSONL System event log as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportEventsJSONLRequest +*/ +func (a *AccountAPIService) ExportEventsJSONL(ctx context.Context) ApiExportEventsJSONLRequest { + return ApiExportEventsJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *AccountAPIService) ExportEventsJSONLExecute(r ApiExportEventsJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.ExportEventsJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/events.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAPITokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + grantType *string + clientId *string + clientSecret *string +} + +func (r ApiGetAPITokenRequest) GrantType(grantType string) ApiGetAPITokenRequest { + r.grantType = &grantType + return r +} + +func (r ApiGetAPITokenRequest) ClientId(clientId string) ApiGetAPITokenRequest { + r.clientId = &clientId + return r +} + +func (r ApiGetAPITokenRequest) ClientSecret(clientSecret string) ApiGetAPITokenRequest { + r.clientSecret = &clientSecret + return r +} + +func (r ApiGetAPITokenRequest) Execute() (*AccessToken, *http.Response, error) { + return r.ApiService.GetAPITokenExecute(r) +} + +/* +GetAPIToken Generate an access token using an API client + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAPITokenRequest +*/ +func (a *AccountAPIService) GetAPIToken(ctx context.Context) ApiGetAPITokenRequest { + return ApiGetAPITokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AccessToken +func (a *AccountAPIService) GetAPITokenExecute(r ApiGetAPITokenRequest) (*AccessToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAPIToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/api/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantType == nil { + return localVarReturnValue, nil, reportError("grantType is required and must be specified") + } + if r.clientId == nil { + return localVarReturnValue, nil, reportError("clientId is required and must be specified") + } + if r.clientSecret == nil { + return localVarReturnValue, nil, reportError("clientSecret is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_secret", r.clientSecret, "", "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountAgentsRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountAgentsRequest) Search(search string) ApiGetAccountAgentsRequest { + r.search = &search + return r +} + +func (r ApiGetAccountAgentsRequest) Execute() ([]Agent, *http.Response, error) { + return r.ApiService.GetAccountAgentsExecute(r) +} + +/* +GetAccountAgents Get all agents across all organizations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountAgentsRequest +*/ +func (a *AccountAPIService) GetAccountAgents(ctx context.Context) ApiGetAccountAgentsRequest { + return ApiGetAccountAgentsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Agent +func (a *AccountAPIService) GetAccountAgentsExecute(r ApiGetAccountAgentsRequest) ([]Agent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Agent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountAgents") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/agents" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountAssetOwnershipTypesRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountAssetOwnershipTypesRequest) Execute() ([]AssetOwnershipType, *http.Response, error) { + return r.ApiService.GetAccountAssetOwnershipTypesExecute(r) +} + +/* +GetAccountAssetOwnershipTypes Get all asset ownership types + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountAssetOwnershipTypesRequest +*/ +func (a *AccountAPIService) GetAccountAssetOwnershipTypes(ctx context.Context) ApiGetAccountAssetOwnershipTypesRequest { + return ApiGetAccountAssetOwnershipTypesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetOwnershipType +func (a *AccountAPIService) GetAccountAssetOwnershipTypesExecute(r ApiGetAccountAssetOwnershipTypesRequest) ([]AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountAssetOwnershipTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountCredentialRequest struct { + ctx context.Context + ApiService *AccountAPIService + credentialId string +} + +func (r ApiGetAccountCredentialRequest) Execute() (*Credential, *http.Response, error) { + return r.ApiService.GetAccountCredentialExecute(r) +} + +/* +GetAccountCredential Get credential details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param credentialId UUID of the credential to retrieve + @return ApiGetAccountCredentialRequest +*/ +func (a *AccountAPIService) GetAccountCredential(ctx context.Context, credentialId string) ApiGetAccountCredentialRequest { + return ApiGetAccountCredentialRequest{ + ApiService: a, + ctx: ctx, + credentialId: credentialId, + } +} + +// Execute executes the request +// @return Credential +func (a *AccountAPIService) GetAccountCredentialExecute(r ApiGetAccountCredentialRequest) (*Credential, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Credential + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountCredential") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/credentials/{credential_id}" + localVarPath = strings.Replace(localVarPath, "{"+"credential_id"+"}", url.PathEscape(parameterValueToString(r.credentialId, "credentialId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountCredentialsRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountCredentialsRequest) Search(search string) ApiGetAccountCredentialsRequest { + r.search = &search + return r +} + +func (r ApiGetAccountCredentialsRequest) Execute() ([]Credential, *http.Response, error) { + return r.ApiService.GetAccountCredentialsExecute(r) +} + +/* +GetAccountCredentials Get all account credentials + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountCredentialsRequest +*/ +func (a *AccountAPIService) GetAccountCredentials(ctx context.Context) ApiGetAccountCredentialsRequest { + return ApiGetAccountCredentialsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Credential +func (a *AccountAPIService) GetAccountCredentialsExecute(r ApiGetAccountCredentialsRequest) ([]Credential, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Credential + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountCredentials") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/credentials" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountCustomIntegrationRequest struct { + ctx context.Context + ApiService *AccountAPIService + customIntegrationId string +} + +func (r ApiGetAccountCustomIntegrationRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.GetAccountCustomIntegrationExecute(r) +} + +/* +GetAccountCustomIntegration Get single custom integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiGetAccountCustomIntegrationRequest +*/ +func (a *AccountAPIService) GetAccountCustomIntegration(ctx context.Context, customIntegrationId string) ApiGetAccountCustomIntegrationRequest { + return ApiGetAccountCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) GetAccountCustomIntegrationExecute(r ApiGetAccountCustomIntegrationRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountCustomIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations/{customIntegrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"customIntegrationId"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountCustomIntegrationsRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountCustomIntegrationsRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.GetAccountCustomIntegrationsExecute(r) +} + +/* +GetAccountCustomIntegrations Get all custom integrations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountCustomIntegrationsRequest +*/ +func (a *AccountAPIService) GetAccountCustomIntegrations(ctx context.Context) ApiGetAccountCustomIntegrationsRequest { + return ApiGetAccountCustomIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) GetAccountCustomIntegrationsExecute(r ApiGetAccountCustomIntegrationsRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountCustomIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountGroupRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupId string +} + +func (r ApiGetAccountGroupRequest) Execute() (*Group, *http.Response, error) { + return r.ApiService.GetAccountGroupExecute(r) +} + +/* +GetAccountGroup Get group details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId UUID of the group + @return ApiGetAccountGroupRequest +*/ +func (a *AccountAPIService) GetAccountGroup(ctx context.Context, groupId string) ApiGetAccountGroupRequest { + return ApiGetAccountGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return Group +func (a *AccountAPIService) GetAccountGroupExecute(r ApiGetAccountGroupRequest) (*Group, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Group + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountGroupMappingRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupMappingId string +} + +func (r ApiGetAccountGroupMappingRequest) Execute() (*GroupMapping, *http.Response, error) { + return r.ApiService.GetAccountGroupMappingExecute(r) +} + +/* +GetAccountGroupMapping Get SSO group mapping details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupMappingId UUID of the SSO group mapping + @return ApiGetAccountGroupMappingRequest +*/ +func (a *AccountAPIService) GetAccountGroupMapping(ctx context.Context, groupMappingId string) ApiGetAccountGroupMappingRequest { + return ApiGetAccountGroupMappingRequest{ + ApiService: a, + ctx: ctx, + groupMappingId: groupMappingId, + } +} + +// Execute executes the request +// @return GroupMapping +func (a *AccountAPIService) GetAccountGroupMappingExecute(r ApiGetAccountGroupMappingRequest) (*GroupMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountGroupMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sso/groups/{group_mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_mapping_id"+"}", url.PathEscape(parameterValueToString(r.groupMappingId, "groupMappingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountGroupMappingsRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountGroupMappingsRequest) Execute() (*GroupMapping, *http.Response, error) { + return r.ApiService.GetAccountGroupMappingsExecute(r) +} + +/* +GetAccountGroupMappings Get all SSO group mappings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountGroupMappingsRequest +*/ +func (a *AccountAPIService) GetAccountGroupMappings(ctx context.Context) ApiGetAccountGroupMappingsRequest { + return ApiGetAccountGroupMappingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GroupMapping +func (a *AccountAPIService) GetAccountGroupMappingsExecute(r ApiGetAccountGroupMappingsRequest) (*GroupMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountGroupMappings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sso/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountGroupsRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountGroupsRequest) Execute() (*Group, *http.Response, error) { + return r.ApiService.GetAccountGroupsExecute(r) +} + +/* +GetAccountGroups Get all groups + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountGroupsRequest +*/ +func (a *AccountAPIService) GetAccountGroups(ctx context.Context) ApiGetAccountGroupsRequest { + return ApiGetAccountGroupsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Group +func (a *AccountAPIService) GetAccountGroupsExecute(r ApiGetAccountGroupsRequest) (*Group, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Group + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountGroups") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountKeyRequest struct { + ctx context.Context + ApiService *AccountAPIService + keyId string +} + +func (r ApiGetAccountKeyRequest) Execute() (*OrganizationAPIKey, *http.Response, error) { + return r.ApiService.GetAccountKeyExecute(r) +} + +/* +GetAccountKey Get key details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param keyId UUID of the key to retrieve + @return ApiGetAccountKeyRequest +*/ +func (a *AccountAPIService) GetAccountKey(ctx context.Context, keyId string) ApiGetAccountKeyRequest { + return ApiGetAccountKeyRequest{ + ApiService: a, + ctx: ctx, + keyId: keyId, + } +} + +// Execute executes the request +// @return OrganizationAPIKey +func (a *AccountAPIService) GetAccountKeyExecute(r ApiGetAccountKeyRequest) (*OrganizationAPIKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationAPIKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/keys/{key_id}" + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountKeysRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountKeysRequest) Execute() ([]OrganizationAPIKey, *http.Response, error) { + return r.ApiService.GetAccountKeysExecute(r) +} + +/* +GetAccountKeys Get all active API keys + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountKeysRequest +*/ +func (a *AccountAPIService) GetAccountKeys(ctx context.Context) ApiGetAccountKeysRequest { + return ApiGetAccountKeysRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []OrganizationAPIKey +func (a *AccountAPIService) GetAccountKeysExecute(r ApiGetAccountKeysRequest) ([]OrganizationAPIKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []OrganizationAPIKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountKeys") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/keys" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountLicenseRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountLicenseRequest) Execute() (*License, *http.Response, error) { + return r.ApiService.GetAccountLicenseExecute(r) +} + +/* +GetAccountLicense Get license details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountLicenseRequest +*/ +func (a *AccountAPIService) GetAccountLicense(ctx context.Context) ApiGetAccountLicenseRequest { + return ApiGetAccountLicenseRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return License +func (a *AccountAPIService) GetAccountLicenseExecute(r ApiGetAccountLicenseRequest) (*License, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *License + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountLicense") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/license" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountOrganizationRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string +} + +func (r ApiGetAccountOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.GetAccountOrganizationExecute(r) +} + +/* +GetAccountOrganization Get organization details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @return ApiGetAccountOrganizationRequest +*/ +func (a *AccountAPIService) GetAccountOrganization(ctx context.Context, orgId string) ApiGetAccountOrganizationRequest { + return ApiGetAccountOrganizationRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// @return Organization +func (a *AccountAPIService) GetAccountOrganizationExecute(r ApiGetAccountOrganizationRequest) (*Organization, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountOrganization") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountOrganizationExportTokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string + keyId string +} + +func (r ApiGetAccountOrganizationExportTokenRequest) Execute() (*ExportToken, *http.Response, error) { + return r.ApiService.GetAccountOrganizationExportTokenExecute(r) +} + +/* +GetAccountOrganizationExportToken Get export token details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @param keyId UUID of the export token ID to retrieve + @return ApiGetAccountOrganizationExportTokenRequest +*/ +func (a *AccountAPIService) GetAccountOrganizationExportToken(ctx context.Context, orgId string, keyId string) ApiGetAccountOrganizationExportTokenRequest { + return ApiGetAccountOrganizationExportTokenRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + keyId: keyId, + } +} + +// Execute executes the request +// @return ExportToken +func (a *AccountAPIService) GetAccountOrganizationExportTokenExecute(r ApiGetAccountOrganizationExportTokenRequest) (*ExportToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountOrganizationExportToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportTokens/{key_id}" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountOrganizationExportTokensRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string +} + +func (r ApiGetAccountOrganizationExportTokensRequest) Execute() ([]ExportToken, *http.Response, error) { + return r.ApiService.GetAccountOrganizationExportTokensExecute(r) +} + +/* +GetAccountOrganizationExportTokens Get all active export tokens for an organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve export tokens for + @return ApiGetAccountOrganizationExportTokensRequest +*/ +func (a *AccountAPIService) GetAccountOrganizationExportTokens(ctx context.Context, orgId string) ApiGetAccountOrganizationExportTokensRequest { + return ApiGetAccountOrganizationExportTokensRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// @return []ExportToken +func (a *AccountAPIService) GetAccountOrganizationExportTokensExecute(r ApiGetAccountOrganizationExportTokensRequest) ([]ExportToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ExportToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountOrganizationExportTokens") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportTokens" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountOrganizationsRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountOrganizationsRequest) Search(search string) ApiGetAccountOrganizationsRequest { + r.search = &search + return r +} + +func (r ApiGetAccountOrganizationsRequest) Execute() ([]Organization, *http.Response, error) { + return r.ApiService.GetAccountOrganizationsExecute(r) +} + +/* +GetAccountOrganizations Get all organization details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountOrganizationsRequest +*/ +func (a *AccountAPIService) GetAccountOrganizations(ctx context.Context) ApiGetAccountOrganizationsRequest { + return ApiGetAccountOrganizationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Organization +func (a *AccountAPIService) GetAccountOrganizationsExecute(r ApiGetAccountOrganizationsRequest) ([]Organization, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Organization + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountOrganizations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountScanTemplateRequest struct { + ctx context.Context + ApiService *AccountAPIService + scanTemplateId string +} + +func (r ApiGetAccountScanTemplateRequest) Execute() (*ScanTemplate, *http.Response, error) { + return r.ApiService.GetAccountScanTemplateExecute(r) +} + +/* +GetAccountScanTemplate Get scan template details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scanTemplateId UUID of the scan template to retrieve + @return ApiGetAccountScanTemplateRequest +*/ +func (a *AccountAPIService) GetAccountScanTemplate(ctx context.Context, scanTemplateId string) ApiGetAccountScanTemplateRequest { + return ApiGetAccountScanTemplateRequest{ + ApiService: a, + ctx: ctx, + scanTemplateId: scanTemplateId, + } +} + +// Execute executes the request +// @return ScanTemplate +func (a *AccountAPIService) GetAccountScanTemplateExecute(r ApiGetAccountScanTemplateRequest) (*ScanTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScanTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountScanTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks/templates/{scan_template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"scan_template_id"+"}", url.PathEscape(parameterValueToString(r.scanTemplateId, "scanTemplateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountScanTemplatesRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountScanTemplatesRequest) Search(search string) ApiGetAccountScanTemplatesRequest { + r.search = &search + return r +} + +func (r ApiGetAccountScanTemplatesRequest) Execute() ([]ScanTemplate, *http.Response, error) { + return r.ApiService.GetAccountScanTemplatesExecute(r) +} + +/* +GetAccountScanTemplates Get all scan templates across all organizations (up to 1000) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountScanTemplatesRequest +*/ +func (a *AccountAPIService) GetAccountScanTemplates(ctx context.Context) ApiGetAccountScanTemplatesRequest { + return ApiGetAccountScanTemplatesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ScanTemplate +func (a *AccountAPIService) GetAccountScanTemplatesExecute(r ApiGetAccountScanTemplatesRequest) ([]ScanTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ScanTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountScanTemplates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks/templates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountSitesRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountSitesRequest) Search(search string) ApiGetAccountSitesRequest { + r.search = &search + return r +} + +func (r ApiGetAccountSitesRequest) Execute() ([]Site, *http.Response, error) { + return r.ApiService.GetAccountSitesExecute(r) +} + +/* +GetAccountSites Get all sites details across all organizations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountSitesRequest +*/ +func (a *AccountAPIService) GetAccountSites(ctx context.Context) ApiGetAccountSitesRequest { + return ApiGetAccountSitesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Site +func (a *AccountAPIService) GetAccountSitesExecute(r ApiGetAccountSitesRequest) ([]Site, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Site + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountSites") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sites" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountTasksRequest struct { + ctx context.Context + ApiService *AccountAPIService + search *string +} + +// an optional search string for filtering results +func (r ApiGetAccountTasksRequest) Search(search string) ApiGetAccountTasksRequest { + r.search = &search + return r +} + +func (r ApiGetAccountTasksRequest) Execute() ([]Task, *http.Response, error) { + return r.ApiService.GetAccountTasksExecute(r) +} + +/* +GetAccountTasks Get all task details across all organizations (up to 1000) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountTasksRequest +*/ +func (a *AccountAPIService) GetAccountTasks(ctx context.Context) ApiGetAccountTasksRequest { + return ApiGetAccountTasksRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Task +func (a *AccountAPIService) GetAccountTasksExecute(r ApiGetAccountTasksRequest) ([]Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountTasks") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountUserRequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string +} + +func (r ApiGetAccountUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.GetAccountUserExecute(r) +} + +/* +GetAccountUser Get user details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to retrieve + @return ApiGetAccountUserRequest +*/ +func (a *AccountAPIService) GetAccountUser(ctx context.Context, userId string) ApiGetAccountUserRequest { + return ApiGetAccountUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) GetAccountUserExecute(r ApiGetAccountUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAccountUsersRequest struct { + ctx context.Context + ApiService *AccountAPIService +} + +func (r ApiGetAccountUsersRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.GetAccountUsersExecute(r) +} + +/* +GetAccountUsers Get all users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccountUsersRequest +*/ +func (a *AccountAPIService) GetAccountUsers(ctx context.Context) ApiGetAccountUsersRequest { + return ApiGetAccountUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []User +func (a *AccountAPIService) GetAccountUsersExecute(r ApiGetAccountUsersRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.GetAccountUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveAccountCredentialRequest struct { + ctx context.Context + ApiService *AccountAPIService + credentialId string +} + +func (r ApiRemoveAccountCredentialRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountCredentialExecute(r) +} + +/* +RemoveAccountCredential Remove this credential + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param credentialId UUID of the credential to delete + @return ApiRemoveAccountCredentialRequest +*/ +func (a *AccountAPIService) RemoveAccountCredential(ctx context.Context, credentialId string) ApiRemoveAccountCredentialRequest { + return ApiRemoveAccountCredentialRequest{ + ApiService: a, + ctx: ctx, + credentialId: credentialId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountCredentialExecute(r ApiRemoveAccountCredentialRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountCredential") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/credentials/{credential_id}" + localVarPath = strings.Replace(localVarPath, "{"+"credential_id"+"}", url.PathEscape(parameterValueToString(r.credentialId, "credentialId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAccountGroupRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupId string +} + +func (r ApiRemoveAccountGroupRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountGroupExecute(r) +} + +/* +RemoveAccountGroup Remove this group + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId UUID of the group + @return ApiRemoveAccountGroupRequest +*/ +func (a *AccountAPIService) RemoveAccountGroup(ctx context.Context, groupId string) ApiRemoveAccountGroupRequest { + return ApiRemoveAccountGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountGroupExecute(r ApiRemoveAccountGroupRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountGroup") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAccountGroupMappingRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupMappingId string +} + +func (r ApiRemoveAccountGroupMappingRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountGroupMappingExecute(r) +} + +/* +RemoveAccountGroupMapping Remove this SSO group mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupMappingId UUID of the SSO group mapping + @return ApiRemoveAccountGroupMappingRequest +*/ +func (a *AccountAPIService) RemoveAccountGroupMapping(ctx context.Context, groupMappingId string) ApiRemoveAccountGroupMappingRequest { + return ApiRemoveAccountGroupMappingRequest{ + ApiService: a, + ctx: ctx, + groupMappingId: groupMappingId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountGroupMappingExecute(r ApiRemoveAccountGroupMappingRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountGroupMapping") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sso/groups/{group_mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_mapping_id"+"}", url.PathEscape(parameterValueToString(r.groupMappingId, "groupMappingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAccountKeyRequest struct { + ctx context.Context + ApiService *AccountAPIService + keyId string +} + +func (r ApiRemoveAccountKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountKeyExecute(r) +} + +/* +RemoveAccountKey Remove this key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param keyId UUID of the key to retrieve + @return ApiRemoveAccountKeyRequest +*/ +func (a *AccountAPIService) RemoveAccountKey(ctx context.Context, keyId string) ApiRemoveAccountKeyRequest { + return ApiRemoveAccountKeyRequest{ + ApiService: a, + ctx: ctx, + keyId: keyId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountKeyExecute(r ApiRemoveAccountKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/keys/{key_id}" + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAccountOrganizationRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string +} + +func (r ApiRemoveAccountOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountOrganizationExecute(r) +} + +/* +RemoveAccountOrganization Remove this organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @return ApiRemoveAccountOrganizationRequest +*/ +func (a *AccountAPIService) RemoveAccountOrganization(ctx context.Context, orgId string) ApiRemoveAccountOrganizationRequest { + return ApiRemoveAccountOrganizationRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountOrganizationExecute(r ApiRemoveAccountOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAccountScanTemplateRequest struct { + ctx context.Context + ApiService *AccountAPIService + scanTemplateId string +} + +func (r ApiRemoveAccountScanTemplateRequest) Execute() (*ScanTemplate, *http.Response, error) { + return r.ApiService.RemoveAccountScanTemplateExecute(r) +} + +/* +RemoveAccountScanTemplate Remove scan template + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scanTemplateId UUID of the scan template to remove + @return ApiRemoveAccountScanTemplateRequest +*/ +func (a *AccountAPIService) RemoveAccountScanTemplate(ctx context.Context, scanTemplateId string) ApiRemoveAccountScanTemplateRequest { + return ApiRemoveAccountScanTemplateRequest{ + ApiService: a, + ctx: ctx, + scanTemplateId: scanTemplateId, + } +} + +// Execute executes the request +// @return ScanTemplate +func (a *AccountAPIService) RemoveAccountScanTemplateExecute(r ApiRemoveAccountScanTemplateRequest) (*ScanTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScanTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountScanTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks/templates/{scan_template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"scan_template_id"+"}", url.PathEscape(parameterValueToString(r.scanTemplateId, "scanTemplateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveAccountUserRequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string +} + +func (r ApiRemoveAccountUserRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAccountUserExecute(r) +} + +/* +RemoveAccountUser Remove this user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to delete + @return ApiRemoveAccountUserRequest +*/ +func (a *AccountAPIService) RemoveAccountUser(ctx context.Context, userId string) ApiRemoveAccountUserRequest { + return ApiRemoveAccountUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *AccountAPIService) RemoveAccountUserExecute(r ApiRemoveAccountUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RemoveAccountUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiResetAccountUserLockoutRequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string +} + +func (r ApiResetAccountUserLockoutRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ResetAccountUserLockoutExecute(r) +} + +/* +ResetAccountUserLockout Resets the user's lockout status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to retrieve + @return ApiResetAccountUserLockoutRequest +*/ +func (a *AccountAPIService) ResetAccountUserLockout(ctx context.Context, userId string) ApiResetAccountUserLockoutRequest { + return ApiResetAccountUserLockoutRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) ResetAccountUserLockoutExecute(r ApiResetAccountUserLockoutRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.ResetAccountUserLockout") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}/resetLockout" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResetAccountUserMFARequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string +} + +func (r ApiResetAccountUserMFARequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ResetAccountUserMFAExecute(r) +} + +/* +ResetAccountUserMFA Resets the user's MFA tokens + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to retrieve + @return ApiResetAccountUserMFARequest +*/ +func (a *AccountAPIService) ResetAccountUserMFA(ctx context.Context, userId string) ApiResetAccountUserMFARequest { + return ApiResetAccountUserMFARequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) ResetAccountUserMFAExecute(r ApiResetAccountUserMFARequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.ResetAccountUserMFA") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}/resetMFA" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResetAccountUserPasswordRequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string +} + +func (r ApiResetAccountUserPasswordRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.ResetAccountUserPasswordExecute(r) +} + +/* +ResetAccountUserPassword Sends the user a password reset email + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to retrieve + @return ApiResetAccountUserPasswordRequest +*/ +func (a *AccountAPIService) ResetAccountUserPassword(ctx context.Context, userId string) ApiResetAccountUserPasswordRequest { + return ApiResetAccountUserPasswordRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) ResetAccountUserPasswordExecute(r ApiResetAccountUserPasswordRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.ResetAccountUserPassword") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}/resetPassword" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRotateAPITokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + grantType *string + clientId *string + clientSecret *string +} + +func (r ApiRotateAPITokenRequest) GrantType(grantType string) ApiRotateAPITokenRequest { + r.grantType = &grantType + return r +} + +func (r ApiRotateAPITokenRequest) ClientId(clientId string) ApiRotateAPITokenRequest { + r.clientId = &clientId + return r +} + +func (r ApiRotateAPITokenRequest) ClientSecret(clientSecret string) ApiRotateAPITokenRequest { + r.clientSecret = &clientSecret + return r +} + +func (r ApiRotateAPITokenRequest) Execute() (*APIClientCredentials, *http.Response, error) { + return r.ApiService.RotateAPITokenExecute(r) +} + +/* +RotateAPIToken Rotate the API client secret + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRotateAPITokenRequest +*/ +func (a *AccountAPIService) RotateAPIToken(ctx context.Context) ApiRotateAPITokenRequest { + return ApiRotateAPITokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return APIClientCredentials +func (a *AccountAPIService) RotateAPITokenExecute(r ApiRotateAPITokenRequest) (*APIClientCredentials, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *APIClientCredentials + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RotateAPIToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/api/rotate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantType == nil { + return localVarReturnValue, nil, reportError("grantType is required and must be specified") + } + if r.clientId == nil { + return localVarReturnValue, nil, reportError("clientId is required and must be specified") + } + if r.clientSecret == nil { + return localVarReturnValue, nil, reportError("clientSecret is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_secret", r.clientSecret, "", "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRotateAccountKeyRequest struct { + ctx context.Context + ApiService *AccountAPIService + keyId string +} + +func (r ApiRotateAccountKeyRequest) Execute() (*OrganizationAPIKey, *http.Response, error) { + return r.ApiService.RotateAccountKeyExecute(r) +} + +/* +RotateAccountKey Rotates the key secret + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param keyId UUID of the key to retrieve + @return ApiRotateAccountKeyRequest +*/ +func (a *AccountAPIService) RotateAccountKey(ctx context.Context, keyId string) ApiRotateAccountKeyRequest { + return ApiRotateAccountKeyRequest{ + ApiService: a, + ctx: ctx, + keyId: keyId, + } +} + +// Execute executes the request +// @return OrganizationAPIKey +func (a *AccountAPIService) RotateAccountKeyExecute(r ApiRotateAccountKeyRequest) (*OrganizationAPIKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationAPIKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RotateAccountKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/keys/{key_id}/rotate" + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRotateAccountOrganizationExportTokenRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string + keyId string +} + +func (r ApiRotateAccountOrganizationExportTokenRequest) Execute() (*ExportToken, *http.Response, error) { + return r.ApiService.RotateAccountOrganizationExportTokenExecute(r) +} + +/* +RotateAccountOrganizationExportToken Rotates an organization export token and returns the updated token + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @param keyId UUID of the export token ID to rotate + @return ApiRotateAccountOrganizationExportTokenRequest +*/ +func (a *AccountAPIService) RotateAccountOrganizationExportToken(ctx context.Context, orgId string, keyId string) ApiRotateAccountOrganizationExportTokenRequest { + return ApiRotateAccountOrganizationExportTokenRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + keyId: keyId, + } +} + +// Execute executes the request +// @return ExportToken +func (a *AccountAPIService) RotateAccountOrganizationExportTokenExecute(r ApiRotateAccountOrganizationExportTokenRequest) (*ExportToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RotateAccountOrganizationExportToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportTokens/{key_id}/rotate" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRotateAccountOrganizationExportTokenDeprecatedRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string +} + +func (r ApiRotateAccountOrganizationExportTokenDeprecatedRequest) Execute() (*ExportToken, *http.Response, error) { + return r.ApiService.RotateAccountOrganizationExportTokenDeprecatedExecute(r) +} + +/* +RotateAccountOrganizationExportTokenDeprecated Rotates an organization export token and returns the updated token + +This API has been deprecated. Please use `PATCH /account/orgs/{org_id}/exportTokens/{key_id}/rotate` instead. This API will fail if more than one export tokens exist for the given organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @return ApiRotateAccountOrganizationExportTokenDeprecatedRequest + +Deprecated +*/ +func (a *AccountAPIService) RotateAccountOrganizationExportTokenDeprecated(ctx context.Context, orgId string) ApiRotateAccountOrganizationExportTokenDeprecatedRequest { + return ApiRotateAccountOrganizationExportTokenDeprecatedRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// @return ExportToken +// Deprecated +func (a *AccountAPIService) RotateAccountOrganizationExportTokenDeprecatedExecute(r ApiRotateAccountOrganizationExportTokenDeprecatedRequest) (*ExportToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExportToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.RotateAccountOrganizationExportTokenDeprecated") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}/exportToken/rotate" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountAssetOwnershipTypeRequest struct { + ctx context.Context + ApiService *AccountAPIService + ownershipTypeId string + assetOwnershipTypePost *AssetOwnershipTypePost +} + +func (r ApiUpdateAccountAssetOwnershipTypeRequest) AssetOwnershipTypePost(assetOwnershipTypePost AssetOwnershipTypePost) ApiUpdateAccountAssetOwnershipTypeRequest { + r.assetOwnershipTypePost = &assetOwnershipTypePost + return r +} + +func (r ApiUpdateAccountAssetOwnershipTypeRequest) Execute() (*AssetOwnershipType, *http.Response, error) { + return r.ApiService.UpdateAccountAssetOwnershipTypeExecute(r) +} + +/* +UpdateAccountAssetOwnershipType Update a single asset ownership type + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ownershipTypeId UUID of the asset ownership type + @return ApiUpdateAccountAssetOwnershipTypeRequest +*/ +func (a *AccountAPIService) UpdateAccountAssetOwnershipType(ctx context.Context, ownershipTypeId string) ApiUpdateAccountAssetOwnershipTypeRequest { + return ApiUpdateAccountAssetOwnershipTypeRequest{ + ApiService: a, + ctx: ctx, + ownershipTypeId: ownershipTypeId, + } +} + +// Execute executes the request +// @return AssetOwnershipType +func (a *AccountAPIService) UpdateAccountAssetOwnershipTypeExecute(r ApiUpdateAccountAssetOwnershipTypeRequest) (*AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountAssetOwnershipType") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types/{ownership_type_id}" + localVarPath = strings.Replace(localVarPath, "{"+"ownership_type_id"+"}", url.PathEscape(parameterValueToString(r.ownershipTypeId, "ownershipTypeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetOwnershipTypePost == nil { + return localVarReturnValue, nil, reportError("assetOwnershipTypePost is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetOwnershipTypePost + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountAssetOwnershipTypesRequest struct { + ctx context.Context + ApiService *AccountAPIService + assetOwnershipType *[]AssetOwnershipType +} + +// array of asset ownership types +func (r ApiUpdateAccountAssetOwnershipTypesRequest) AssetOwnershipType(assetOwnershipType []AssetOwnershipType) ApiUpdateAccountAssetOwnershipTypesRequest { + r.assetOwnershipType = &assetOwnershipType + return r +} + +func (r ApiUpdateAccountAssetOwnershipTypesRequest) Execute() ([]AssetOwnershipType, *http.Response, error) { + return r.ApiService.UpdateAccountAssetOwnershipTypesExecute(r) +} + +/* +UpdateAccountAssetOwnershipTypes Update asset ownership types + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateAccountAssetOwnershipTypesRequest +*/ +func (a *AccountAPIService) UpdateAccountAssetOwnershipTypes(ctx context.Context) ApiUpdateAccountAssetOwnershipTypesRequest { + return ApiUpdateAccountAssetOwnershipTypesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetOwnershipType +func (a *AccountAPIService) UpdateAccountAssetOwnershipTypesExecute(r ApiUpdateAccountAssetOwnershipTypesRequest) ([]AssetOwnershipType, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetOwnershipType + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountAssetOwnershipTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/assets/ownership-types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetOwnershipType == nil { + return localVarReturnValue, nil, reportError("assetOwnershipType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetOwnershipType + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountCustomIntegrationRequest struct { + ctx context.Context + ApiService *AccountAPIService + customIntegrationId string + baseCustomIntegration *BaseCustomIntegration +} + +func (r ApiUpdateAccountCustomIntegrationRequest) BaseCustomIntegration(baseCustomIntegration BaseCustomIntegration) ApiUpdateAccountCustomIntegrationRequest { + r.baseCustomIntegration = &baseCustomIntegration + return r +} + +func (r ApiUpdateAccountCustomIntegrationRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.UpdateAccountCustomIntegrationExecute(r) +} + +/* +UpdateAccountCustomIntegration Update a single custom integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiUpdateAccountCustomIntegrationRequest +*/ +func (a *AccountAPIService) UpdateAccountCustomIntegration(ctx context.Context, customIntegrationId string) ApiUpdateAccountCustomIntegrationRequest { + return ApiUpdateAccountCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *AccountAPIService) UpdateAccountCustomIntegrationExecute(r ApiUpdateAccountCustomIntegrationRequest) (*CustomIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountCustomIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/custom-integrations/{customIntegrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"customIntegrationId"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.baseCustomIntegration == nil { + return localVarReturnValue, nil, reportError("baseCustomIntegration is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.baseCustomIntegration + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountGroupRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupPut *GroupPut +} + +func (r ApiUpdateAccountGroupRequest) GroupPut(groupPut GroupPut) ApiUpdateAccountGroupRequest { + r.groupPut = &groupPut + return r +} + +func (r ApiUpdateAccountGroupRequest) Execute() (*Group, *http.Response, error) { + return r.ApiService.UpdateAccountGroupExecute(r) +} + +/* +UpdateAccountGroup Update an existing group + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateAccountGroupRequest +*/ +func (a *AccountAPIService) UpdateAccountGroup(ctx context.Context) ApiUpdateAccountGroupRequest { + return ApiUpdateAccountGroupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Group +func (a *AccountAPIService) UpdateAccountGroupExecute(r ApiUpdateAccountGroupRequest) (*Group, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Group + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupPut == nil { + return localVarReturnValue, nil, reportError("groupPut is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupPut + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountGroupMappingRequest struct { + ctx context.Context + ApiService *AccountAPIService + groupMapping *GroupMapping +} + +func (r ApiUpdateAccountGroupMappingRequest) GroupMapping(groupMapping GroupMapping) ApiUpdateAccountGroupMappingRequest { + r.groupMapping = &groupMapping + return r +} + +func (r ApiUpdateAccountGroupMappingRequest) Execute() (*GroupMapping, *http.Response, error) { + return r.ApiService.UpdateAccountGroupMappingExecute(r) +} + +/* +UpdateAccountGroupMapping Update an existing SSO group mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateAccountGroupMappingRequest +*/ +func (a *AccountAPIService) UpdateAccountGroupMapping(ctx context.Context) ApiUpdateAccountGroupMappingRequest { + return ApiUpdateAccountGroupMappingRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GroupMapping +func (a *AccountAPIService) UpdateAccountGroupMappingExecute(r ApiUpdateAccountGroupMappingRequest) (*GroupMapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupMapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountGroupMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/sso/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupMapping == nil { + return localVarReturnValue, nil, reportError("groupMapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupMapping + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountOrganizationRequest struct { + ctx context.Context + ApiService *AccountAPIService + orgId string + orgOptions *OrgOptions +} + +// organization options +func (r ApiUpdateAccountOrganizationRequest) OrgOptions(orgOptions OrgOptions) ApiUpdateAccountOrganizationRequest { + r.orgOptions = &orgOptions + return r +} + +func (r ApiUpdateAccountOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.UpdateAccountOrganizationExecute(r) +} + +/* +UpdateAccountOrganization Update organization details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgId UUID of the organization to retrieve + @return ApiUpdateAccountOrganizationRequest +*/ +func (a *AccountAPIService) UpdateAccountOrganization(ctx context.Context, orgId string) ApiUpdateAccountOrganizationRequest { + return ApiUpdateAccountOrganizationRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + } +} + +// Execute executes the request +// @return Organization +func (a *AccountAPIService) UpdateAccountOrganizationExecute(r ApiUpdateAccountOrganizationRequest) (*Organization, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountOrganization") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/orgs/{org_id}" + localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.orgOptions == nil { + return localVarReturnValue, nil, reportError("orgOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.orgOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountScanTemplateRequest struct { + ctx context.Context + ApiService *AccountAPIService + scanTemplate *ScanTemplate +} + +func (r ApiUpdateAccountScanTemplateRequest) ScanTemplate(scanTemplate ScanTemplate) ApiUpdateAccountScanTemplateRequest { + r.scanTemplate = &scanTemplate + return r +} + +func (r ApiUpdateAccountScanTemplateRequest) Execute() (*ScanTemplate, *http.Response, error) { + return r.ApiService.UpdateAccountScanTemplateExecute(r) +} + +/* +UpdateAccountScanTemplate Update scan template + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateAccountScanTemplateRequest +*/ +func (a *AccountAPIService) UpdateAccountScanTemplate(ctx context.Context) ApiUpdateAccountScanTemplateRequest { + return ApiUpdateAccountScanTemplateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ScanTemplate +func (a *AccountAPIService) UpdateAccountScanTemplateExecute(r ApiUpdateAccountScanTemplateRequest) (*ScanTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScanTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountScanTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/tasks/templates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scanTemplate == nil { + return localVarReturnValue, nil, reportError("scanTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scanTemplate + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountUserRequest struct { + ctx context.Context + ApiService *AccountAPIService + userId string + userOptions *UserOptions +} + +// user parameters +func (r ApiUpdateAccountUserRequest) UserOptions(userOptions UserOptions) ApiUpdateAccountUserRequest { + r.userOptions = &userOptions + return r +} + +func (r ApiUpdateAccountUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.UpdateAccountUserExecute(r) +} + +/* +UpdateAccountUser Update a user's details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId UUID of the user to retrieve + @return ApiUpdateAccountUserRequest +*/ +func (a *AccountAPIService) UpdateAccountUser(ctx context.Context, userId string) ApiUpdateAccountUserRequest { + return ApiUpdateAccountUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *AccountAPIService) UpdateAccountUserExecute(r ApiUpdateAccountUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountAPIService.UpdateAccountUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userOptions == nil { + return localVarReturnValue, nil, reportError("userOptions is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/api_cisco_sntc.go b/go/api_cisco_sntc.go new file mode 100644 index 0000000..d1542d7 --- /dev/null +++ b/go/api_cisco_sntc.go @@ -0,0 +1,152 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + + +// CiscoSNTCAPIService CiscoSNTCAPI service +type CiscoSNTCAPIService service + +type ApiExportAssetsCiscoCSVRequest struct { + ctx context.Context + ApiService *CiscoSNTCAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportAssetsCiscoCSVRequest) Oid(oid string) ApiExportAssetsCiscoCSVRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiExportAssetsCiscoCSVRequest) Search(search string) ApiExportAssetsCiscoCSVRequest { + r.search = &search + return r +} + +func (r ApiExportAssetsCiscoCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetsCiscoCSVExecute(r) +} + +/* +ExportAssetsCiscoCSV Cisco serial number and model name export for Cisco Smart Net Total Care Service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetsCiscoCSVRequest +*/ +func (a *CiscoSNTCAPIService) ExportAssetsCiscoCSV(ctx context.Context) ApiExportAssetsCiscoCSVRequest { + return ApiExportAssetsCiscoCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *CiscoSNTCAPIService) ExportAssetsCiscoCSVExecute(r ApiExportAssetsCiscoCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CiscoSNTCAPIService.ExportAssetsCiscoCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.cisco.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/api_export.go b/go/api_export.go index 2c7f09b..80eacd2 100644 --- a/go/api_export.go +++ b/go/api_export.go @@ -1,99 +1,3784 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi -import ( - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" - "os" -) +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + + +// ExportAPIService ExportAPI service +type ExportAPIService service + +type ApiExportAssetMetricsJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportAssetMetricsJSONRequest) Oid(oid string) ApiExportAssetMetricsJSONRequest { + r.oid = &oid + return r +} + +func (r ApiExportAssetMetricsJSONRequest) Execute() (*map[string]AssetMetric, *http.Response, error) { + return r.ApiService.ExportAssetMetricsJSONExecute(r) +} + +/* +ExportAssetMetricsJSON Export asset metrics + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetMetricsJSONRequest +*/ +func (a *ExportAPIService) ExportAssetMetricsJSON(ctx context.Context) ApiExportAssetMetricsJSONRequest { + return ApiExportAssetMetricsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]AssetMetric +func (a *ExportAPIService) ExportAssetMetricsJSONExecute(r ApiExportAssetMetricsJSONRequest) (*map[string]AssetMetric, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *map[string]AssetMetric + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetMetricsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/metrics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetTopHWCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportAssetTopHWCSVRequest) Oid(oid string) ApiExportAssetTopHWCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportAssetTopHWCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetTopHWCSVExecute(r) +} + +/* +ExportAssetTopHWCSV Top asset hardware products as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetTopHWCSVRequest +*/ +func (a *ExportAPIService) ExportAssetTopHWCSV(ctx context.Context) ApiExportAssetTopHWCSVRequest { + return ApiExportAssetTopHWCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetTopHWCSVExecute(r ApiExportAssetTopHWCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetTopHWCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/hw.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetTopOSCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportAssetTopOSCSVRequest) Oid(oid string) ApiExportAssetTopOSCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportAssetTopOSCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetTopOSCSVExecute(r) +} + +/* +ExportAssetTopOSCSV Top asset operating systems as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetTopOSCSVRequest +*/ +func (a *ExportAPIService) ExportAssetTopOSCSV(ctx context.Context) ApiExportAssetTopOSCSVRequest { + return ApiExportAssetTopOSCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetTopOSCSVExecute(r ApiExportAssetTopOSCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetTopOSCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/os.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetTopTagsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportAssetTopTagsCSVRequest) Oid(oid string) ApiExportAssetTopTagsCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportAssetTopTagsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetTopTagsCSVExecute(r) +} + +/* +ExportAssetTopTagsCSV Top asset tags as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetTopTagsCSVRequest +*/ +func (a *ExportAPIService) ExportAssetTopTagsCSV(ctx context.Context) ApiExportAssetTopTagsCSVRequest { + return ApiExportAssetTopTagsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetTopTagsCSVExecute(r ApiExportAssetTopTagsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetTopTagsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/tags.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetTopTypesCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportAssetTopTypesCSVRequest) Oid(oid string) ApiExportAssetTopTypesCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportAssetTopTypesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetTopTypesCSVExecute(r) +} + +/* +ExportAssetTopTypesCSV Top asset types as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetTopTypesCSVRequest +*/ +func (a *ExportAPIService) ExportAssetTopTypesCSV(ctx context.Context) ApiExportAssetTopTypesCSVRequest { + return ApiExportAssetTopTypesCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetTopTypesCSVExecute(r ApiExportAssetTopTypesCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetTopTypesCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/type.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportAssetsCSVRequest) Oid(oid string) ApiExportAssetsCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportAssetsCSVRequest) Search(search string) ApiExportAssetsCSVRequest { + r.search = &search + return r +} + +func (r ApiExportAssetsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetsCSVExecute(r) +} + +/* +ExportAssetsCSV Asset inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetsCSVRequest +*/ +func (a *ExportAPIService) ExportAssetsCSV(ctx context.Context) ApiExportAssetsCSVRequest { + return ApiExportAssetsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetsCSVExecute(r ApiExportAssetsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetsJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string + pageSize *int32 + startKey *string +} + +// The current Organization +func (r ApiExportAssetsJSONRequest) Oid(oid string) ApiExportAssetsJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportAssetsJSONRequest) Search(search string) ApiExportAssetsJSONRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportAssetsJSONRequest) Fields(fields string) ApiExportAssetsJSONRequest { + r.fields = &fields + return r +} + +// The number of results to return per request. +func (r ApiExportAssetsJSONRequest) PageSize(pageSize int32) ApiExportAssetsJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportAssetsJSONRequest) StartKey(startKey string) ApiExportAssetsJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportAssetsJSONRequest) Execute() (*AssetExportResponse, *http.Response, error) { + return r.ApiService.ExportAssetsJSONExecute(r) +} + +/* +ExportAssetsJSON Exports the asset inventory + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetsJSONRequest +*/ +func (a *ExportAPIService) ExportAssetsJSON(ctx context.Context) ApiExportAssetsJSONRequest { + return ApiExportAssetsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AssetExportResponse +func (a *ExportAPIService) ExportAssetsJSONExecute(r ApiExportAssetsJSONRequest) (*AssetExportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AssetExportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetsJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportAssetsJSONLRequest) Oid(oid string) ApiExportAssetsJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportAssetsJSONLRequest) Search(search string) ApiExportAssetsJSONLRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportAssetsJSONLRequest) Fields(fields string) ApiExportAssetsJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportAssetsJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetsJSONLExecute(r) +} + +/* +ExportAssetsJSONL Asset inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetsJSONLRequest +*/ +func (a *ExportAPIService) ExportAssetsJSONL(ctx context.Context) ApiExportAssetsJSONLRequest { + return ApiExportAssetsJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetsJSONLExecute(r ApiExportAssetsJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetsJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAssetsNmapXMLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportAssetsNmapXMLRequest) Oid(oid string) ApiExportAssetsNmapXMLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportAssetsNmapXMLRequest) Search(search string) ApiExportAssetsNmapXMLRequest { + r.search = &search + return r +} + +func (r ApiExportAssetsNmapXMLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportAssetsNmapXMLExecute(r) +} + +/* +ExportAssetsNmapXML Asset inventory as Nmap-style XML + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportAssetsNmapXMLRequest +*/ +func (a *ExportAPIService) ExportAssetsNmapXML(ctx context.Context) ApiExportAssetsNmapXMLRequest { + return ApiExportAssetsNmapXMLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportAssetsNmapXMLExecute(r ApiExportAssetsNmapXMLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportAssetsNmapXML") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.nmap.xml" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/xml", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportCertificatesCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportCertificatesCSVRequest) Oid(oid string) ApiExportCertificatesCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportCertificatesCSVRequest) Search(search string) ApiExportCertificatesCSVRequest { + r.search = &search + return r +} + +func (r ApiExportCertificatesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportCertificatesCSVExecute(r) +} + +/* +ExportCertificatesCSV Export the certificate inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportCertificatesCSVRequest +*/ +func (a *ExportAPIService) ExportCertificatesCSV(ctx context.Context) ApiExportCertificatesCSVRequest { + return ApiExportCertificatesCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportCertificatesCSVExecute(r ApiExportCertificatesCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportCertificatesCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/certificates.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportCertificatesJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportCertificatesJSONRequest) Oid(oid string) ApiExportCertificatesJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportCertificatesJSONRequest) Search(search string) ApiExportCertificatesJSONRequest { + r.search = &search + return r +} + +func (r ApiExportCertificatesJSONRequest) Execute() ([]Certificate, *http.Response, error) { + return r.ApiService.ExportCertificatesJSONExecute(r) +} + +/* +ExportCertificatesJSON Export the certificate inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportCertificatesJSONRequest +*/ +func (a *ExportAPIService) ExportCertificatesJSON(ctx context.Context) ApiExportCertificatesJSONRequest { + return ApiExportCertificatesJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Certificate +func (a *ExportAPIService) ExportCertificatesJSONExecute(r ApiExportCertificatesJSONRequest) ([]Certificate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Certificate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportCertificatesJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/certificates.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportCertificatesJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportCertificatesJSONLRequest) Oid(oid string) ApiExportCertificatesJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportCertificatesJSONLRequest) Search(search string) ApiExportCertificatesJSONLRequest { + r.search = &search + return r +} + +func (r ApiExportCertificatesJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportCertificatesJSONLExecute(r) +} + +/* +ExportCertificatesJSONL Export the certificate inventory as JSONL line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportCertificatesJSONLRequest +*/ +func (a *ExportAPIService) ExportCertificatesJSONL(ctx context.Context) ApiExportCertificatesJSONLRequest { + return ApiExportCertificatesJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportCertificatesJSONLExecute(r ApiExportCertificatesJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportCertificatesJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/certificates.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryGroupsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportDirectoryGroupsCSVRequest) Oid(oid string) ApiExportDirectoryGroupsCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryGroupsCSVRequest) Search(search string) ApiExportDirectoryGroupsCSVRequest { + r.search = &search + return r +} + +func (r ApiExportDirectoryGroupsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportDirectoryGroupsCSVExecute(r) +} + +/* +ExportDirectoryGroupsCSV Group inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryGroupsCSVRequest +*/ +func (a *ExportAPIService) ExportDirectoryGroupsCSV(ctx context.Context) ApiExportDirectoryGroupsCSVRequest { + return ApiExportDirectoryGroupsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportDirectoryGroupsCSVExecute(r ApiExportDirectoryGroupsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryGroupsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/groups.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryGroupsJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportDirectoryGroupsJSONRequest) Oid(oid string) ApiExportDirectoryGroupsJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryGroupsJSONRequest) Search(search string) ApiExportDirectoryGroupsJSONRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportDirectoryGroupsJSONRequest) Fields(fields string) ApiExportDirectoryGroupsJSONRequest { + r.fields = &fields + return r +} + +func (r ApiExportDirectoryGroupsJSONRequest) Execute() ([]DirectoryGroup, *http.Response, error) { + return r.ApiService.ExportDirectoryGroupsJSONExecute(r) +} + +/* +ExportDirectoryGroupsJSON Exports the group inventory + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryGroupsJSONRequest +*/ +func (a *ExportAPIService) ExportDirectoryGroupsJSON(ctx context.Context) ApiExportDirectoryGroupsJSONRequest { + return ApiExportDirectoryGroupsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []DirectoryGroup +func (a *ExportAPIService) ExportDirectoryGroupsJSONExecute(r ApiExportDirectoryGroupsJSONRequest) ([]DirectoryGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DirectoryGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryGroupsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/groups.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryGroupsJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportDirectoryGroupsJSONLRequest) Oid(oid string) ApiExportDirectoryGroupsJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryGroupsJSONLRequest) Search(search string) ApiExportDirectoryGroupsJSONLRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportDirectoryGroupsJSONLRequest) Fields(fields string) ApiExportDirectoryGroupsJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportDirectoryGroupsJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportDirectoryGroupsJSONLExecute(r) +} + +/* +ExportDirectoryGroupsJSONL Group inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryGroupsJSONLRequest +*/ +func (a *ExportAPIService) ExportDirectoryGroupsJSONL(ctx context.Context) ApiExportDirectoryGroupsJSONLRequest { + return ApiExportDirectoryGroupsJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportDirectoryGroupsJSONLExecute(r ApiExportDirectoryGroupsJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryGroupsJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/groups.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryUsersCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportDirectoryUsersCSVRequest) Oid(oid string) ApiExportDirectoryUsersCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryUsersCSVRequest) Search(search string) ApiExportDirectoryUsersCSVRequest { + r.search = &search + return r +} + +func (r ApiExportDirectoryUsersCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportDirectoryUsersCSVExecute(r) +} + +/* +ExportDirectoryUsersCSV User inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryUsersCSVRequest +*/ +func (a *ExportAPIService) ExportDirectoryUsersCSV(ctx context.Context) ApiExportDirectoryUsersCSVRequest { + return ApiExportDirectoryUsersCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportDirectoryUsersCSVExecute(r ApiExportDirectoryUsersCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryUsersCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/users.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryUsersJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportDirectoryUsersJSONRequest) Oid(oid string) ApiExportDirectoryUsersJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryUsersJSONRequest) Search(search string) ApiExportDirectoryUsersJSONRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportDirectoryUsersJSONRequest) Fields(fields string) ApiExportDirectoryUsersJSONRequest { + r.fields = &fields + return r +} + +func (r ApiExportDirectoryUsersJSONRequest) Execute() ([]DirectoryUser, *http.Response, error) { + return r.ApiService.ExportDirectoryUsersJSONExecute(r) +} + +/* +ExportDirectoryUsersJSON Exports the user inventory + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryUsersJSONRequest +*/ +func (a *ExportAPIService) ExportDirectoryUsersJSON(ctx context.Context) ApiExportDirectoryUsersJSONRequest { + return ApiExportDirectoryUsersJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []DirectoryUser +func (a *ExportAPIService) ExportDirectoryUsersJSONExecute(r ApiExportDirectoryUsersJSONRequest) ([]DirectoryUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DirectoryUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryUsersJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/users.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportDirectoryUsersJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportDirectoryUsersJSONLRequest) Oid(oid string) ApiExportDirectoryUsersJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportDirectoryUsersJSONLRequest) Search(search string) ApiExportDirectoryUsersJSONLRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportDirectoryUsersJSONLRequest) Fields(fields string) ApiExportDirectoryUsersJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportDirectoryUsersJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportDirectoryUsersJSONLExecute(r) +} + +/* +ExportDirectoryUsersJSONL User inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportDirectoryUsersJSONLRequest +*/ +func (a *ExportAPIService) ExportDirectoryUsersJSONL(ctx context.Context) ApiExportDirectoryUsersJSONLRequest { + return ApiExportDirectoryUsersJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportDirectoryUsersJSONLExecute(r ApiExportDirectoryUsersJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportDirectoryUsersJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/users.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportFindingsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportFindingsCSVRequest) Oid(oid string) ApiExportFindingsCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportFindingsCSVRequest) Search(search string) ApiExportFindingsCSVRequest { + r.search = &search + return r +} + +func (r ApiExportFindingsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportFindingsCSVExecute(r) +} + +/* +ExportFindingsCSV Export findings as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportFindingsCSVRequest +*/ +func (a *ExportAPIService) ExportFindingsCSV(ctx context.Context) ApiExportFindingsCSVRequest { + return ApiExportFindingsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportFindingsCSVExecute(r ApiExportFindingsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportFindingsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/findings.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportFindingsJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportFindingsJSONRequest) Oid(oid string) ApiExportFindingsJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportFindingsJSONRequest) Search(search string) ApiExportFindingsJSONRequest { + r.search = &search + return r +} + +func (r ApiExportFindingsJSONRequest) Execute() ([]Finding, *http.Response, error) { + return r.ApiService.ExportFindingsJSONExecute(r) +} + +/* +ExportFindingsJSON Export findings as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportFindingsJSONRequest +*/ +func (a *ExportAPIService) ExportFindingsJSON(ctx context.Context) ApiExportFindingsJSONRequest { + return ApiExportFindingsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Finding +func (a *ExportAPIService) ExportFindingsJSONExecute(r ApiExportFindingsJSONRequest) ([]Finding, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Finding + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportFindingsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/findings.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportFindingsJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportFindingsJSONLRequest) Oid(oid string) ApiExportFindingsJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportFindingsJSONLRequest) Search(search string) ApiExportFindingsJSONLRequest { + r.search = &search + return r +} + +func (r ApiExportFindingsJSONLRequest) Execute() ([]Finding, *http.Response, error) { + return r.ApiService.ExportFindingsJSONLExecute(r) +} + +/* +ExportFindingsJSONL Export findings as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportFindingsJSONLRequest +*/ +func (a *ExportAPIService) ExportFindingsJSONL(ctx context.Context) ApiExportFindingsJSONLRequest { + return ApiExportFindingsJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Finding +func (a *ExportAPIService) ExportFindingsJSONLExecute(r ApiExportFindingsJSONLRequest) ([]Finding, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Finding + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportFindingsJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/findings.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportSNMPARPCacheCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportSNMPARPCacheCSVRequest) Oid(oid string) ApiExportSNMPARPCacheCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportSNMPARPCacheCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSNMPARPCacheCSVExecute(r) +} + +/* +ExportSNMPARPCacheCSV SNMP ARP cache data as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSNMPARPCacheCSVRequest +*/ +func (a *ExportAPIService) ExportSNMPARPCacheCSV(ctx context.Context) ApiExportSNMPARPCacheCSVRequest { + return ApiExportSNMPARPCacheCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSNMPARPCacheCSVExecute(r ApiExportSNMPARPCacheCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSNMPARPCacheCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/snmp.arpcache.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportServicesCSVRequest) Oid(oid string) ApiExportServicesCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportServicesCSVRequest) Search(search string) ApiExportServicesCSVRequest { + r.search = &search + return r +} + +func (r ApiExportServicesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesCSVExecute(r) +} + +/* +ExportServicesCSV Service inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesCSVRequest +*/ +func (a *ExportAPIService) ExportServicesCSV(ctx context.Context) ApiExportServicesCSVRequest { + return ApiExportServicesCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesCSVExecute(r ApiExportServicesCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/services.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string + pageSize *int32 + startKey *string +} + +// The current Organization +func (r ApiExportServicesJSONRequest) Oid(oid string) ApiExportServicesJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportServicesJSONRequest) Search(search string) ApiExportServicesJSONRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportServicesJSONRequest) Fields(fields string) ApiExportServicesJSONRequest { + r.fields = &fields + return r +} + +// The number of results to return per request. +func (r ApiExportServicesJSONRequest) PageSize(pageSize int32) ApiExportServicesJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportServicesJSONRequest) StartKey(startKey string) ApiExportServicesJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportServicesJSONRequest) Execute() (*ServiceExportResponse, *http.Response, error) { + return r.ApiService.ExportServicesJSONExecute(r) +} + +/* +ExportServicesJSON Service inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesJSONRequest +*/ +func (a *ExportAPIService) ExportServicesJSON(ctx context.Context) ApiExportServicesJSONRequest { + return ApiExportServicesJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ServiceExportResponse +func (a *ExportAPIService) ExportServicesJSONExecute(r ApiExportServicesJSONRequest) (*ServiceExportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceExportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/services.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportServicesJSONLRequest) Oid(oid string) ApiExportServicesJSONLRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportServicesJSONLRequest) Search(search string) ApiExportServicesJSONLRequest { + r.search = &search + return r +} + +// A list of fields to export, comma-separated +func (r ApiExportServicesJSONLRequest) Fields(fields string) ApiExportServicesJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportServicesJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesJSONLExecute(r) +} + +/* +ExportServicesJSONL Service inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesJSONLRequest +*/ +func (a *ExportAPIService) ExportServicesJSONL(ctx context.Context) ApiExportServicesJSONLRequest { + return ApiExportServicesJSONLRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesJSONLExecute(r ApiExportServicesJSONLRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesJSONL") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/services.jsonl" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesTopProductsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportServicesTopProductsCSVRequest) Oid(oid string) ApiExportServicesTopProductsCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportServicesTopProductsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesTopProductsCSVExecute(r) +} + +/* +ExportServicesTopProductsCSV Top service products as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesTopProductsCSVRequest +*/ +func (a *ExportAPIService) ExportServicesTopProductsCSV(ctx context.Context) ApiExportServicesTopProductsCSVRequest { + return ApiExportServicesTopProductsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesTopProductsCSVExecute(r ApiExportServicesTopProductsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesTopProductsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/services/products.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesTopProtocolsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportServicesTopProtocolsCSVRequest) Oid(oid string) ApiExportServicesTopProtocolsCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportServicesTopProtocolsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesTopProtocolsCSVExecute(r) +} + +/* +ExportServicesTopProtocolsCSV Top service protocols as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesTopProtocolsCSVRequest +*/ +func (a *ExportAPIService) ExportServicesTopProtocolsCSV(ctx context.Context) ApiExportServicesTopProtocolsCSVRequest { + return ApiExportServicesTopProtocolsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesTopProtocolsCSVExecute(r ApiExportServicesTopProtocolsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesTopProtocolsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/services/protocols.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesTopTCPCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportServicesTopTCPCSVRequest) Oid(oid string) ApiExportServicesTopTCPCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportServicesTopTCPCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesTopTCPCSVExecute(r) +} + +/* +ExportServicesTopTCPCSV Top TCP services as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesTopTCPCSVRequest +*/ +func (a *ExportAPIService) ExportServicesTopTCPCSV(ctx context.Context) ApiExportServicesTopTCPCSVRequest { + return ApiExportServicesTopTCPCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesTopTCPCSVExecute(r ApiExportServicesTopTCPCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesTopTCPCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/services/tcp.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportServicesTopUDPCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string +} + +// The current Organization +func (r ApiExportServicesTopUDPCSVRequest) Oid(oid string) ApiExportServicesTopUDPCSVRequest { + r.oid = &oid + return r +} + +func (r ApiExportServicesTopUDPCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportServicesTopUDPCSVExecute(r) +} + +/* +ExportServicesTopUDPCSV Top UDP services as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportServicesTopUDPCSVRequest +*/ +func (a *ExportAPIService) ExportServicesTopUDPCSV(ctx context.Context) ApiExportServicesTopUDPCSVRequest { + return ApiExportServicesTopUDPCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportServicesTopUDPCSVExecute(r ApiExportServicesTopUDPCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportServicesTopUDPCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/services/udp.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } -// Linger please -var ( - _ _context.Context -) + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } -// ExportApiService ExportApi service -type ExportApiService service + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } -type apiExportAssetSyncCreatedJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string - since *int64 + return localVarReturnValue, localVarHTTPResponse, nil } -func (r apiExportAssetSyncCreatedJSONRequest) Search(search string) apiExportAssetSyncCreatedJSONRequest { - r.search = &search - return r +type ApiExportSitesCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string } -func (r apiExportAssetSyncCreatedJSONRequest) Fields(fields string) apiExportAssetSyncCreatedJSONRequest { - r.fields = &fields +// The current Organization +func (r ApiExportSitesCSVRequest) Oid(oid string) ApiExportSitesCSVRequest { + r.oid = &oid return r } -func (r apiExportAssetSyncCreatedJSONRequest) Since(since int64) apiExportAssetSyncCreatedJSONRequest { - r.since = &since - return r +func (r ApiExportSitesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSitesCSVExecute(r) } /* -ExportAssetSyncCreatedJSON Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetSyncCreatedJSONRequest +ExportSitesCSV Site list as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSitesCSVRequest */ -func (a *ExportApiService) ExportAssetSyncCreatedJSON(ctx _context.Context) apiExportAssetSyncCreatedJSONRequest { - return apiExportAssetSyncCreatedJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSitesCSV(ctx context.Context) ApiExportSitesCSVRequest { + return ApiExportSitesCSVRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return AssetsWithCheckpoint -*/ -func (r apiExportAssetSyncCreatedJSONRequest) Execute() (AssetsWithCheckpoint, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSitesCSVExecute(r ApiExportSitesCSVRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue AssetsWithCheckpoint + formFiles []formFile + localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetSyncCreatedJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSitesCSV") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets/sync/created/assets.json" + localVarPath := localBasePath + "/export/org/sites.csv" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) - } - if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) - } - if r.since != nil { - localVarQueryParams.Add("since", parameterToString(*r.since, "")) + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -105,40 +3790,51 @@ func (r apiExportAssetSyncCreatedJSONRequest) Execute() (AssetsWithCheckpoint, * } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -148,74 +3844,78 @@ func (r apiExportAssetSyncCreatedJSONRequest) Execute() (AssetsWithCheckpoint, * return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportAssetSyncUpdatedJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string - since *int64 +type ApiExportSitesJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportSitesJSONRequest) Oid(oid string) ApiExportSitesJSONRequest { + r.oid = &oid + return r } -func (r apiExportAssetSyncUpdatedJSONRequest) Search(search string) apiExportAssetSyncUpdatedJSONRequest { +// A search query in runZero search query syntax +func (r ApiExportSitesJSONRequest) Search(search string) ApiExportSitesJSONRequest { r.search = &search return r } -func (r apiExportAssetSyncUpdatedJSONRequest) Fields(fields string) apiExportAssetSyncUpdatedJSONRequest { +// A list of fields to export, comma-separated +func (r ApiExportSitesJSONRequest) Fields(fields string) ApiExportSitesJSONRequest { r.fields = &fields return r } -func (r apiExportAssetSyncUpdatedJSONRequest) Since(since int64) apiExportAssetSyncUpdatedJSONRequest { - r.since = &since - return r +func (r ApiExportSitesJSONRequest) Execute() ([]Site, *http.Response, error) { + return r.ApiService.ExportSitesJSONExecute(r) } /* -ExportAssetSyncUpdatedJSON Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetSyncUpdatedJSONRequest +ExportSitesJSON Export all sites + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSitesJSONRequest */ -func (a *ExportApiService) ExportAssetSyncUpdatedJSON(ctx _context.Context) apiExportAssetSyncUpdatedJSONRequest { - return apiExportAssetSyncUpdatedJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSitesJSON(ctx context.Context) ApiExportSitesJSONRequest { + return ApiExportSitesJSONRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return AssetsWithCheckpoint -*/ -func (r apiExportAssetSyncUpdatedJSONRequest) Execute() (AssetsWithCheckpoint, *_nethttp.Response, error) { +// Execute executes the request +// @return []Site +func (a *ExportAPIService) ExportSitesJSONExecute(r ApiExportSitesJSONRequest) ([]Site, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue AssetsWithCheckpoint + formFiles []formFile + localVarReturnValue []Site ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetSyncUpdatedJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSitesJSON") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets/sync/updated/assets.json" + localVarPath := localBasePath + "/export/org/sites.json" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) - } - if r.since != nil { - localVarQueryParams.Add("since", parameterToString(*r.since, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -234,33 +3934,44 @@ func (r apiExportAssetSyncUpdatedJSONRequest) Execute() (AssetsWithCheckpoint, * if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -270,56 +3981,78 @@ func (r apiExportAssetSyncUpdatedJSONRequest) Execute() (AssetsWithCheckpoint, * return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportAssetsCSVRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string +type ApiExportSitesJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportSitesJSONLRequest) Oid(oid string) ApiExportSitesJSONLRequest { + r.oid = &oid + return r } -func (r apiExportAssetsCSVRequest) Search(search string) apiExportAssetsCSVRequest { +// A search query in runZero search query syntax +func (r ApiExportSitesJSONLRequest) Search(search string) ApiExportSitesJSONLRequest { r.search = &search return r } +// A list of fields to export, comma-separated +func (r ApiExportSitesJSONLRequest) Fields(fields string) ApiExportSitesJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportSitesJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSitesJSONLExecute(r) +} + /* -ExportAssetsCSV Asset inventory as CSV. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetsCSVRequest +ExportSitesJSONL Site list as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSitesJSONLRequest */ -func (a *ExportApiService) ExportAssetsCSV(ctx _context.Context) apiExportAssetsCSVRequest { - return apiExportAssetsCSVRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSitesJSONL(ctx context.Context) ApiExportSitesJSONLRequest { + return ApiExportSitesJSONLRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportAssetsCSVRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSitesJSONLExecute(r ApiExportSitesJSONLRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetsCSV") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSitesJSONL") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets.csv" + localVarPath := localBasePath + "/export/org/sites.jsonl" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -331,40 +4064,51 @@ func (r apiExportAssetsCSVRequest) Execute() (*os.File, *_nethttp.Response, erro } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -374,65 +4118,68 @@ func (r apiExportAssetsCSVRequest) Execute() (*os.File, *_nethttp.Response, erro return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportAssetsJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportSoftwareCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string } -func (r apiExportAssetsJSONRequest) Search(search string) apiExportAssetsJSONRequest { - r.search = &search +// The current Organization +func (r ApiExportSoftwareCSVRequest) Oid(oid string) ApiExportSoftwareCSVRequest { + r.oid = &oid return r } -func (r apiExportAssetsJSONRequest) Fields(fields string) apiExportAssetsJSONRequest { - r.fields = &fields +// A search query in runZero search query syntax +func (r ApiExportSoftwareCSVRequest) Search(search string) ApiExportSoftwareCSVRequest { + r.search = &search return r } +func (r ApiExportSoftwareCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSoftwareCSVExecute(r) +} + /* -ExportAssetsJSON Exports the asset inventory. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetsJSONRequest +ExportSoftwareCSV Software inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSoftwareCSVRequest */ -func (a *ExportApiService) ExportAssetsJSON(ctx _context.Context) apiExportAssetsJSONRequest { - return apiExportAssetsJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSoftwareCSV(ctx context.Context) ApiExportSoftwareCSVRequest { + return ApiExportSoftwareCSVRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Asset -*/ -func (r apiExportAssetsJSONRequest) Execute() ([]Asset, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSoftwareCSVExecute(r ApiExportSoftwareCSVRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Asset + formFiles []formFile + localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetsJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSoftwareCSV") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets.json" + localVarPath := localBasePath + "/export/org/software.csv" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") } - if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -444,40 +4191,51 @@ func (r apiExportAssetsJSONRequest) Execute() ([]Asset, *_nethttp.Response, erro } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -487,65 +4245,98 @@ func (r apiExportAssetsJSONRequest) Execute() ([]Asset, *_nethttp.Response, erro return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportAssetsJSONLRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportSoftwareJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string + pageSize *int32 + startKey *string +} + +// The current Organization +func (r ApiExportSoftwareJSONRequest) Oid(oid string) ApiExportSoftwareJSONRequest { + r.oid = &oid + return r } -func (r apiExportAssetsJSONLRequest) Search(search string) apiExportAssetsJSONLRequest { +// A search query in runZero search query syntax +func (r ApiExportSoftwareJSONRequest) Search(search string) ApiExportSoftwareJSONRequest { r.search = &search return r } -func (r apiExportAssetsJSONLRequest) Fields(fields string) apiExportAssetsJSONLRequest { +// A list of fields to export, comma-separated +func (r ApiExportSoftwareJSONRequest) Fields(fields string) ApiExportSoftwareJSONRequest { r.fields = &fields return r } +// The number of results to return per request. +func (r ApiExportSoftwareJSONRequest) PageSize(pageSize int32) ApiExportSoftwareJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportSoftwareJSONRequest) StartKey(startKey string) ApiExportSoftwareJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportSoftwareJSONRequest) Execute() (*SoftwareExportResponse, *http.Response, error) { + return r.ApiService.ExportSoftwareJSONExecute(r) +} + /* -ExportAssetsJSONL Asset inventory as JSON line-delimited. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetsJSONLRequest +ExportSoftwareJSON Exports the software inventory + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSoftwareJSONRequest */ -func (a *ExportApiService) ExportAssetsJSONL(ctx _context.Context) apiExportAssetsJSONLRequest { - return apiExportAssetsJSONLRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSoftwareJSON(ctx context.Context) ApiExportSoftwareJSONRequest { + return ApiExportSoftwareJSONRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportAssetsJSONLRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return SoftwareExportResponse +func (a *ExportAPIService) ExportSoftwareJSONExecute(r ApiExportSoftwareJSONRequest) (*SoftwareExportResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *os.File + formFiles []formFile + localVarReturnValue *SoftwareExportResponse ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetsJSONL") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSoftwareJSON") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets.jsonl" + localVarPath := localBasePath + "/export/org/software.json" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -564,33 +4355,44 @@ func (r apiExportAssetsJSONLRequest) Execute() (*os.File, *_nethttp.Response, er if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -600,56 +4402,78 @@ func (r apiExportAssetsJSONLRequest) Execute() (*os.File, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportAssetsNmapXMLRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string +type ApiExportSoftwareJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportSoftwareJSONLRequest) Oid(oid string) ApiExportSoftwareJSONLRequest { + r.oid = &oid + return r } -func (r apiExportAssetsNmapXMLRequest) Search(search string) apiExportAssetsNmapXMLRequest { +// A search query in runZero search query syntax +func (r ApiExportSoftwareJSONLRequest) Search(search string) ApiExportSoftwareJSONLRequest { r.search = &search return r } +// A list of fields to export, comma-separated +func (r ApiExportSoftwareJSONLRequest) Fields(fields string) ApiExportSoftwareJSONLRequest { + r.fields = &fields + return r +} + +func (r ApiExportSoftwareJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSoftwareJSONLExecute(r) +} + /* -ExportAssetsNmapXML Asset inventory as Nmap-style XML. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportAssetsNmapXMLRequest +ExportSoftwareJSONL Software inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSoftwareJSONLRequest */ -func (a *ExportApiService) ExportAssetsNmapXML(ctx _context.Context) apiExportAssetsNmapXMLRequest { - return apiExportAssetsNmapXMLRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSoftwareJSONL(ctx context.Context) ApiExportSoftwareJSONLRequest { + return ApiExportSoftwareJSONLRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportAssetsNmapXMLRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSoftwareJSONLExecute(r ApiExportSoftwareJSONLRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportAssetsNmapXML") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSoftwareJSONL") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/assets.nmap.xml" + localVarPath := localBasePath + "/export/org/software.jsonl" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -661,40 +4485,51 @@ func (r apiExportAssetsNmapXMLRequest) Execute() (*os.File, *_nethttp.Response, } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/xml"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -704,56 +4539,68 @@ func (r apiExportAssetsNmapXMLRequest) Execute() (*os.File, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportServicesCSVRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string +type ApiExportSubnetUtilizationStatsCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + mask *string } -func (r apiExportServicesCSVRequest) Search(search string) apiExportServicesCSVRequest { - r.search = &search +// The current Organization +func (r ApiExportSubnetUtilizationStatsCSVRequest) Oid(oid string) ApiExportSubnetUtilizationStatsCSVRequest { + r.oid = &oid return r } +// an optional subnet mask size (ex:24) +func (r ApiExportSubnetUtilizationStatsCSVRequest) Mask(mask string) ApiExportSubnetUtilizationStatsCSVRequest { + r.mask = &mask + return r +} + +func (r ApiExportSubnetUtilizationStatsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportSubnetUtilizationStatsCSVExecute(r) +} + /* -ExportServicesCSV Service inventory as CSV. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportServicesCSVRequest +ExportSubnetUtilizationStatsCSV Subnet utilization statistics as as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportSubnetUtilizationStatsCSVRequest */ -func (a *ExportApiService) ExportServicesCSV(ctx _context.Context) apiExportServicesCSVRequest { - return apiExportServicesCSVRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportSubnetUtilizationStatsCSV(ctx context.Context) ApiExportSubnetUtilizationStatsCSVRequest { + return ApiExportSubnetUtilizationStatsCSVRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportServicesCSVRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportSubnetUtilizationStatsCSVExecute(r ApiExportSubnetUtilizationStatsCSVRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportServicesCSV") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportSubnetUtilizationStatsCSV") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/services.csv" + localVarPath := localBasePath + "/export/org/subnet.stats.csv" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.mask != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mask", r.mask, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -765,40 +4612,51 @@ func (r apiExportServicesCSVRequest) Execute() (*os.File, *_nethttp.Response, er } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/csv"} + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -808,65 +4666,78 @@ func (r apiExportServicesCSVRequest) Execute() (*os.File, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportServicesJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportTasksJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string } -func (r apiExportServicesJSONRequest) Search(search string) apiExportServicesJSONRequest { +// The current Organization +func (r ApiExportTasksJSONRequest) Oid(oid string) ApiExportTasksJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportTasksJSONRequest) Search(search string) ApiExportTasksJSONRequest { r.search = &search return r } -func (r apiExportServicesJSONRequest) Fields(fields string) apiExportServicesJSONRequest { +// A list of fields to export, comma-separated +func (r ApiExportTasksJSONRequest) Fields(fields string) ApiExportTasksJSONRequest { r.fields = &fields return r } +func (r ApiExportTasksJSONRequest) Execute() ([]Task, *http.Response, error) { + return r.ApiService.ExportTasksJSONExecute(r) +} + /* -ExportServicesJSON Service inventory as JSON. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportServicesJSONRequest +ExportTasksJSON Exports organization tasks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportTasksJSONRequest */ -func (a *ExportApiService) ExportServicesJSON(ctx _context.Context) apiExportServicesJSONRequest { - return apiExportServicesJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportTasksJSON(ctx context.Context) ApiExportTasksJSONRequest { + return ApiExportTasksJSONRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Service -*/ -func (r apiExportServicesJSONRequest) Execute() ([]Service, *_nethttp.Response, error) { +// Execute executes the request +// @return []Task +func (a *ExportAPIService) ExportTasksJSONExecute(r ApiExportTasksJSONRequest) ([]Task, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Service + formFiles []formFile + localVarReturnValue []Task ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportServicesJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportTasksJSON") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/services.json" + localVarPath := localBasePath + "/export/org/tasks.json" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -885,33 +4756,44 @@ func (r apiExportServicesJSONRequest) Execute() ([]Service, *_nethttp.Response, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -921,65 +4803,78 @@ func (r apiExportServicesJSONRequest) Execute() ([]Service, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportServicesJSONLRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportTasksJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportTasksJSONLRequest) Oid(oid string) ApiExportTasksJSONLRequest { + r.oid = &oid + return r } -func (r apiExportServicesJSONLRequest) Search(search string) apiExportServicesJSONLRequest { +// A search query in runZero search query syntax +func (r ApiExportTasksJSONLRequest) Search(search string) ApiExportTasksJSONLRequest { r.search = &search return r } -func (r apiExportServicesJSONLRequest) Fields(fields string) apiExportServicesJSONLRequest { +// A list of fields to export, comma-separated +func (r ApiExportTasksJSONLRequest) Fields(fields string) ApiExportTasksJSONLRequest { r.fields = &fields return r } +func (r ApiExportTasksJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportTasksJSONLExecute(r) +} + /* -ExportServicesJSONL Service inventory as JSON line-delimited. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportServicesJSONLRequest +ExportTasksJSONL Organization tasks as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportTasksJSONLRequest */ -func (a *ExportApiService) ExportServicesJSONL(ctx _context.Context) apiExportServicesJSONLRequest { - return apiExportServicesJSONLRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportTasksJSONL(ctx context.Context) ApiExportTasksJSONLRequest { + return ApiExportTasksJSONLRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportServicesJSONLRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportTasksJSONLExecute(r ApiExportTasksJSONLRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportServicesJSONL") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportTasksJSONL") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/services.jsonl" + localVarPath := localBasePath + "/export/org/tasks.jsonl" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -998,33 +4893,44 @@ func (r apiExportServicesJSONLRequest) Execute() (*os.File, *_nethttp.Response, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1034,48 +4940,69 @@ func (r apiExportServicesJSONLRequest) Execute() (*os.File, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportSitesCSVRequest struct { - ctx _context.Context - apiService *ExportApiService +type ApiExportVulnerabilitiesCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportVulnerabilitiesCSVRequest) Oid(oid string) ApiExportVulnerabilitiesCSVRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportVulnerabilitiesCSVRequest) Search(search string) ApiExportVulnerabilitiesCSVRequest { + r.search = &search + return r +} + +func (r ApiExportVulnerabilitiesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportVulnerabilitiesCSVExecute(r) } /* -ExportSitesCSV Site list as CSV. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportSitesCSVRequest +ExportVulnerabilitiesCSV Export the vulnerability inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportVulnerabilitiesCSVRequest */ -func (a *ExportApiService) ExportSitesCSV(ctx _context.Context) apiExportSitesCSVRequest { - return apiExportSitesCSVRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportVulnerabilitiesCSV(ctx context.Context) ApiExportVulnerabilitiesCSVRequest { + return ApiExportVulnerabilitiesCSVRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportSitesCSVRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportVulnerabilitiesCSVExecute(r ApiExportVulnerabilitiesCSVRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportSitesCSV") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportVulnerabilitiesCSV") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/sites.csv" + localVarPath := localBasePath + "/export/org/vulnerabilities.csv" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1086,40 +5013,51 @@ func (r apiExportSitesCSVRequest) Execute() (*os.File, *_nethttp.Response, error } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/csv"} + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1129,65 +5067,98 @@ func (r apiExportSitesCSVRequest) Execute() (*os.File, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportSitesJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportVulnerabilitiesJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string + pageSize *int32 + startKey *string +} + +// The current Organization +func (r ApiExportVulnerabilitiesJSONRequest) Oid(oid string) ApiExportVulnerabilitiesJSONRequest { + r.oid = &oid + return r } -func (r apiExportSitesJSONRequest) Search(search string) apiExportSitesJSONRequest { +// A search query in runZero search query syntax +func (r ApiExportVulnerabilitiesJSONRequest) Search(search string) ApiExportVulnerabilitiesJSONRequest { r.search = &search return r } -func (r apiExportSitesJSONRequest) Fields(fields string) apiExportSitesJSONRequest { +// A list of fields to export, comma-separated +func (r ApiExportVulnerabilitiesJSONRequest) Fields(fields string) ApiExportVulnerabilitiesJSONRequest { r.fields = &fields return r } +// The number of results to return per request. +func (r ApiExportVulnerabilitiesJSONRequest) PageSize(pageSize int32) ApiExportVulnerabilitiesJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportVulnerabilitiesJSONRequest) StartKey(startKey string) ApiExportVulnerabilitiesJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportVulnerabilitiesJSONRequest) Execute() (*VulnerabilityExportResponse, *http.Response, error) { + return r.ApiService.ExportVulnerabilitiesJSONExecute(r) +} + /* -ExportSitesJSON Export all sites. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportSitesJSONRequest +ExportVulnerabilitiesJSON Export the vulnerability inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportVulnerabilitiesJSONRequest */ -func (a *ExportApiService) ExportSitesJSON(ctx _context.Context) apiExportSitesJSONRequest { - return apiExportSitesJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportVulnerabilitiesJSON(ctx context.Context) ApiExportVulnerabilitiesJSONRequest { + return ApiExportVulnerabilitiesJSONRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Site -*/ -func (r apiExportSitesJSONRequest) Execute() ([]Site, *_nethttp.Response, error) { +// Execute executes the request +// @return VulnerabilityExportResponse +func (a *ExportAPIService) ExportVulnerabilitiesJSONExecute(r ApiExportVulnerabilitiesJSONRequest) (*VulnerabilityExportResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Site + formFiles []formFile + localVarReturnValue *VulnerabilityExportResponse ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportSitesJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportVulnerabilitiesJSON") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/sites.json" + localVarPath := localBasePath + "/export/org/vulnerabilities.json" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1206,33 +5177,44 @@ func (r apiExportSitesJSONRequest) Execute() ([]Site, *_nethttp.Response, error) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1242,65 +5224,78 @@ func (r apiExportSitesJSONRequest) Execute() ([]Site, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportSitesJSONLRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportVulnerabilitiesJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportVulnerabilitiesJSONLRequest) Oid(oid string) ApiExportVulnerabilitiesJSONLRequest { + r.oid = &oid + return r } -func (r apiExportSitesJSONLRequest) Search(search string) apiExportSitesJSONLRequest { +// A search query in runZero search query syntax +func (r ApiExportVulnerabilitiesJSONLRequest) Search(search string) ApiExportVulnerabilitiesJSONLRequest { r.search = &search return r } -func (r apiExportSitesJSONLRequest) Fields(fields string) apiExportSitesJSONLRequest { +// A list of fields to export, comma-separated +func (r ApiExportVulnerabilitiesJSONLRequest) Fields(fields string) ApiExportVulnerabilitiesJSONLRequest { r.fields = &fields return r } +func (r ApiExportVulnerabilitiesJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportVulnerabilitiesJSONLExecute(r) +} + /* -ExportSitesJSONL Site list as JSON line-delimited. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportSitesJSONLRequest +ExportVulnerabilitiesJSONL Export the vulnerability inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportVulnerabilitiesJSONLRequest */ -func (a *ExportApiService) ExportSitesJSONL(ctx _context.Context) apiExportSitesJSONLRequest { - return apiExportSitesJSONLRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportVulnerabilitiesJSONL(ctx context.Context) ApiExportVulnerabilitiesJSONLRequest { + return ApiExportVulnerabilitiesJSONLRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportSitesJSONLRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportVulnerabilitiesJSONLExecute(r ApiExportVulnerabilitiesJSONLRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportSitesJSONL") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportVulnerabilitiesJSONL") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/export/org/sites.jsonl" + localVarPath := localBasePath + "/export/org/vulnerabilities.jsonl" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1319,33 +5314,44 @@ func (r apiExportSitesJSONLRequest) Execute() (*os.File, *_nethttp.Response, err if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1355,56 +5361,68 @@ func (r apiExportSitesJSONLRequest) Execute() (*os.File, *_nethttp.Response, err return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportWirelessCSVRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string +type ApiExportWirelessCSVRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiExportWirelessCSVRequest) Oid(oid string) ApiExportWirelessCSVRequest { + r.oid = &oid + return r } -func (r apiExportWirelessCSVRequest) Search(search string) apiExportWirelessCSVRequest { +// A search query in runZero search query syntax +func (r ApiExportWirelessCSVRequest) Search(search string) ApiExportWirelessCSVRequest { r.search = &search return r } +func (r ApiExportWirelessCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportWirelessCSVExecute(r) +} + /* -ExportWirelessCSV Wireless inventory as CSV. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportWirelessCSVRequest +ExportWirelessCSV Wireless inventory as CSV + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportWirelessCSVRequest */ -func (a *ExportApiService) ExportWirelessCSV(ctx _context.Context) apiExportWirelessCSVRequest { - return apiExportWirelessCSVRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportWirelessCSV(ctx context.Context) ApiExportWirelessCSVRequest { + return ApiExportWirelessCSVRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportWirelessCSVRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportWirelessCSVExecute(r ApiExportWirelessCSVRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportWirelessCSV") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportWirelessCSV") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/export/org/wireless.csv" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1416,40 +5434,51 @@ func (r apiExportWirelessCSVRequest) Execute() (*os.File, *_nethttp.Response, er } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/csv"} + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1459,65 +5488,98 @@ func (r apiExportWirelessCSVRequest) Execute() (*os.File, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportWirelessJSONRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportWirelessJSONRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string + pageSize *int32 + startKey *string } -func (r apiExportWirelessJSONRequest) Search(search string) apiExportWirelessJSONRequest { +// The current Organization +func (r ApiExportWirelessJSONRequest) Oid(oid string) ApiExportWirelessJSONRequest { + r.oid = &oid + return r +} + +// A search query in runZero search query syntax +func (r ApiExportWirelessJSONRequest) Search(search string) ApiExportWirelessJSONRequest { r.search = &search return r } -func (r apiExportWirelessJSONRequest) Fields(fields string) apiExportWirelessJSONRequest { +// A list of fields to export, comma-separated +func (r ApiExportWirelessJSONRequest) Fields(fields string) ApiExportWirelessJSONRequest { r.fields = &fields return r } +// The number of results to return per request. +func (r ApiExportWirelessJSONRequest) PageSize(pageSize int32) ApiExportWirelessJSONRequest { + r.pageSize = &pageSize + return r +} + +// The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. +func (r ApiExportWirelessJSONRequest) StartKey(startKey string) ApiExportWirelessJSONRequest { + r.startKey = &startKey + return r +} + +func (r ApiExportWirelessJSONRequest) Execute() (*WirelessExportResponse, *http.Response, error) { + return r.ApiService.ExportWirelessJSONExecute(r) +} + /* -ExportWirelessJSON Wireless inventory as JSON. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportWirelessJSONRequest +ExportWirelessJSON Wireless inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportWirelessJSONRequest */ -func (a *ExportApiService) ExportWirelessJSON(ctx _context.Context) apiExportWirelessJSONRequest { - return apiExportWirelessJSONRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportWirelessJSON(ctx context.Context) ApiExportWirelessJSONRequest { + return ApiExportWirelessJSONRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Wireless -*/ -func (r apiExportWirelessJSONRequest) Execute() ([]Wireless, *_nethttp.Response, error) { +// Execute executes the request +// @return WirelessExportResponse +func (a *ExportAPIService) ExportWirelessJSONExecute(r ApiExportWirelessJSONRequest) (*WirelessExportResponse, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Wireless + formFiles []formFile + localVarReturnValue *WirelessExportResponse ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportWirelessJSON") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportWirelessJSON") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/export/org/wireless.json" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.startKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start_key", r.startKey, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1536,33 +5598,44 @@ func (r apiExportWirelessJSONRequest) Execute() ([]Wireless, *_nethttp.Response, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1572,65 +5645,78 @@ func (r apiExportWirelessJSONRequest) Execute() ([]Wireless, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportWirelessJSONLRequest struct { - ctx _context.Context - apiService *ExportApiService - search *string - fields *string +type ApiExportWirelessJSONLRequest struct { + ctx context.Context + ApiService *ExportAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiExportWirelessJSONLRequest) Oid(oid string) ApiExportWirelessJSONLRequest { + r.oid = &oid + return r } -func (r apiExportWirelessJSONLRequest) Search(search string) apiExportWirelessJSONLRequest { +// A search query in runZero search query syntax +func (r ApiExportWirelessJSONLRequest) Search(search string) ApiExportWirelessJSONLRequest { r.search = &search return r } -func (r apiExportWirelessJSONLRequest) Fields(fields string) apiExportWirelessJSONLRequest { +// A list of fields to export, comma-separated +func (r ApiExportWirelessJSONLRequest) Fields(fields string) ApiExportWirelessJSONLRequest { r.fields = &fields return r } +func (r ApiExportWirelessJSONLRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ExportWirelessJSONLExecute(r) +} + /* -ExportWirelessJSONL Wireless inventory as JSON line-delimited. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiExportWirelessJSONLRequest +ExportWirelessJSONL Wireless inventory as JSON line-delimited + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportWirelessJSONLRequest */ -func (a *ExportApiService) ExportWirelessJSONL(ctx _context.Context) apiExportWirelessJSONLRequest { - return apiExportWirelessJSONLRequest{ - apiService: a, - ctx: ctx, +func (a *ExportAPIService) ExportWirelessJSONL(ctx context.Context) ApiExportWirelessJSONLRequest { + return ApiExportWirelessJSONLRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return *os.File -*/ -func (r apiExportWirelessJSONLRequest) Execute() (*os.File, *_nethttp.Response, error) { +// Execute executes the request +// @return *os.File +func (a *ExportAPIService) ExportWirelessJSONLExecute(r ApiExportWirelessJSONLRequest) (*os.File, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile localVarReturnValue *os.File ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ExportApiService.ExportWirelessJSONL") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportAPIService.ExportWirelessJSONL") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/export/org/wireless.jsonl" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") } if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1649,33 +5735,44 @@ func (r apiExportWirelessJSONLRequest) Execute() (*os.File, *_nethttp.Response, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/go/api_import.go b/go/api_import.go new file mode 100644 index 0000000..ee51f05 --- /dev/null +++ b/go/api_import.go @@ -0,0 +1,253 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// ImportAPIService ImportAPI service +type ImportAPIService service + +type ApiImportCustomIntegrationAssetsRequest struct { + ctx context.Context + ApiService *ImportAPIService + orgID string + siteId *string + customIntegrationId *string + importTask *ImportTask + assetData *os.File +} + +// The ID of the site assets are to be imported into. +func (r ApiImportCustomIntegrationAssetsRequest) SiteId(siteId string) ApiImportCustomIntegrationAssetsRequest { + r.siteId = &siteId + return r +} + +// The unique ID of the registered custom integration which produced the asset data. Uniqueness is not checked/enforced. See /account/custom-integrations api. +func (r ApiImportCustomIntegrationAssetsRequest) CustomIntegrationId(customIntegrationId string) ApiImportCustomIntegrationAssetsRequest { + r.customIntegrationId = &customIntegrationId + return r +} + +func (r ApiImportCustomIntegrationAssetsRequest) ImportTask(importTask ImportTask) ApiImportCustomIntegrationAssetsRequest { + r.importTask = &importTask + return r +} + +// A gzip (not .tar.gz) compressed file containing ImportAsset objects. The file data may be a JSON array of ImportAsset objects, e.g. [{},{},...] or JSONL format, with a single JSON representation of an ImportAsset object on each new line, e.g. {}\\\\n{}\\\\n... +func (r ApiImportCustomIntegrationAssetsRequest) AssetData(assetData *os.File) ApiImportCustomIntegrationAssetsRequest { + r.assetData = assetData + return r +} + +func (r ApiImportCustomIntegrationAssetsRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.ImportCustomIntegrationAssetsExecute(r) +} + +/* +ImportCustomIntegrationAssets Import assets described by a registered custom integration + +Assets can be discovered, imported, and merged by runZero scan tasks, first-party integrations, and third-party +defined custom integrations. See [/account/custom-integrations](#/account/getAccountCustomIntegrations). Currently only assets for custom integrations are importable here. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgID The ID of the organization to import the assets into + @return ApiImportCustomIntegrationAssetsRequest +*/ +func (a *ImportAPIService) ImportCustomIntegrationAssets(ctx context.Context, orgID string) ApiImportCustomIntegrationAssetsRequest { + return ApiImportCustomIntegrationAssetsRequest{ + ApiService: a, + ctx: ctx, + orgID: orgID, + } +} + +// Execute executes the request +// @return Task +func (a *ImportAPIService) ImportCustomIntegrationAssetsExecute(r ApiImportCustomIntegrationAssetsRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportAPIService.ImportCustomIntegrationAssets") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/import/org/{orgID}/assets" + localVarPath = strings.Replace(localVarPath, "{"+"orgID"+"}", url.PathEscape(parameterValueToString(r.orgID, "orgID")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.siteId == nil { + return localVarReturnValue, nil, reportError("siteId is required and must be specified") + } + if r.customIntegrationId == nil { + return localVarReturnValue, nil, reportError("customIntegrationId is required and must be specified") + } + if r.importTask == nil { + return localVarReturnValue, nil, reportError("importTask is required and must be specified") + } + if r.assetData == nil { + return localVarReturnValue, nil, reportError("assetData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarFormParams, "siteId", r.siteId, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "customIntegrationId", r.customIntegrationId, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "importTask", r.importTask, "", "") + var assetDataLocalVarFormFileName string + var assetDataLocalVarFileName string + var assetDataLocalVarFileBytes []byte + + assetDataLocalVarFormFileName = "assetData" + assetDataLocalVarFile := r.assetData + + if assetDataLocalVarFile != nil { + fbs, _ := io.ReadAll(assetDataLocalVarFile) + + assetDataLocalVarFileBytes = fbs + assetDataLocalVarFileName = assetDataLocalVarFile.Name() + assetDataLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: assetDataLocalVarFileBytes, fileName: assetDataLocalVarFileName, formFileName: assetDataLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/api_organization.go b/go/api_organization.go index d9cd741..e9ccc47 100644 --- a/go/api_organization.go +++ b/go/api_organization.go @@ -1,86 +1,87 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( - _context "context" + "bytes" + "context" "io" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "net/http" + "net/url" "strings" + "os" ) -// Linger please -var ( - _ _context.Context -) -// OrganizationApiService OrganizationApi service -type OrganizationApiService service +// OrganizationAPIService OrganizationAPI service +type OrganizationAPIService service -type apiCreateScanRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteId string - scanOptions *ScanOptions +type ApiBulkRemoveCustomIntegrationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + customIntegrationId string + assetIDs *AssetIDs } -func (r apiCreateScanRequest) ScanOptions(scanOptions ScanOptions) apiCreateScanRequest { - r.scanOptions = &scanOptions +// list of asset IDs to remove +func (r ApiBulkRemoveCustomIntegrationRequest) AssetIDs(assetIDs AssetIDs) ApiBulkRemoveCustomIntegrationRequest { + r.assetIDs = &assetIDs return r } +func (r ApiBulkRemoveCustomIntegrationRequest) Execute() (*http.Response, error) { + return r.ApiService.BulkRemoveCustomIntegrationExecute(r) +} + /* -CreateScan Create a scan task for a given site. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param siteId UUID or name of the site to scan -@return apiCreateScanRequest +BulkRemoveCustomIntegration Remove custom integration from a list of assets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiBulkRemoveCustomIntegrationRequest */ -func (a *OrganizationApiService) CreateScan(ctx _context.Context, siteId string) apiCreateScanRequest { - return apiCreateScanRequest{ - apiService: a, - ctx: ctx, - siteId: siteId, +func (a *OrganizationAPIService) BulkRemoveCustomIntegration(ctx context.Context, customIntegrationId string) ApiBulkRemoveCustomIntegrationRequest { + return ApiBulkRemoveCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, } } -/* -Execute executes the request - @return Task -*/ -func (r apiCreateScanRequest) Execute() (Task, *_nethttp.Response, error) { +// Execute executes the request +func (a *OrganizationAPIService) BulkRemoveCustomIntegrationExecute(r ApiBulkRemoveCustomIntegrationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Task + formFiles []formFile ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.CreateScan") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.BulkRemoveCustomIntegration") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites/{site_id}/scan" - localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", _neturl.QueryEscape(parameterToString(r.siteId, "")), -1) + localVarPath := localBasePath + "/org/custom-integrations/{custom_integration_id}/bulk/remove" + localVarPath = strings.Replace(localVarPath, "{"+"custom_integration_id"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetIDs == nil { + return nil, reportError("assetIDs is required and must be specified") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"text/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -97,95 +98,152 @@ func (r apiCreateScanRequest) Execute() (Task, *_nethttp.Response, error) { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.scanOptions - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.assetIDs + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, nil, err + return nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiCreateSiteRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteOptions *SiteOptions +type ApiClearBulkAssetOwnersRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + searchQuery *SearchQuery + oid *string } -func (r apiCreateSiteRequest) SiteOptions(siteOptions SiteOptions) apiCreateSiteRequest { - r.siteOptions = &siteOptions +// search query to filter +func (r ApiClearBulkAssetOwnersRequest) SearchQuery(searchQuery SearchQuery) ApiClearBulkAssetOwnersRequest { + r.searchQuery = &searchQuery + return r +} + +// The current Organization +func (r ApiClearBulkAssetOwnersRequest) Oid(oid string) ApiClearBulkAssetOwnersRequest { + r.oid = &oid return r } +func (r ApiClearBulkAssetOwnersRequest) Execute() (*BulkAssetUpdateResult, *http.Response, error) { + return r.ApiService.ClearBulkAssetOwnersExecute(r) +} + /* -CreateSite Create a new site. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiCreateSiteRequest +ClearBulkAssetOwners Clear all owners across multiple assets based on a search query + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiClearBulkAssetOwnersRequest */ -func (a *OrganizationApiService) CreateSite(ctx _context.Context) apiCreateSiteRequest { - return apiCreateSiteRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) ClearBulkAssetOwners(ctx context.Context) ApiClearBulkAssetOwnersRequest { + return ApiClearBulkAssetOwnersRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Site -*/ -func (r apiCreateSiteRequest) Execute() (Site, *_nethttp.Response, error) { +// Execute executes the request +// @return BulkAssetUpdateResult +func (a *OrganizationAPIService) ClearBulkAssetOwnersExecute(r ApiClearBulkAssetOwnersRequest) (*BulkAssetUpdateResult, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Site + formFiles []formFile + localVarReturnValue *BulkAssetUpdateResult ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.CreateSite") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ClearBulkAssetOwners") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites" + localVarPath := localBasePath + "/org/assets/bulk/clearOwners" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.siteOptions == nil { - return localVarReturnValue, nil, reportError("siteOptions is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.searchQuery == nil { + return localVarReturnValue, nil, reportError("searchQuery is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -204,34 +262,56 @@ func (r apiCreateSiteRequest) Execute() (Site, *_nethttp.Response, error) { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.siteOptions - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.searchQuery + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -241,54 +321,71 @@ func (r apiCreateSiteRequest) Execute() (Site, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAgentRequest struct { - ctx _context.Context - apiService *OrganizationApiService - agentId string +type ApiClearBulkAssetTagsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + searchQuery *SearchQuery + oid *string +} + +// search query to filter +func (r ApiClearBulkAssetTagsRequest) SearchQuery(searchQuery SearchQuery) ApiClearBulkAssetTagsRequest { + r.searchQuery = &searchQuery + return r +} + +// The current Organization +func (r ApiClearBulkAssetTagsRequest) Oid(oid string) ApiClearBulkAssetTagsRequest { + r.oid = &oid + return r +} + +func (r ApiClearBulkAssetTagsRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.ClearBulkAssetTagsExecute(r) } /* -GetAgent Get details for a single agent. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param agentId UUID of the agent -@return apiGetAgentRequest +ClearBulkAssetTags Clear all tags across multiple assets based on a search query + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiClearBulkAssetTagsRequest */ -func (a *OrganizationApiService) GetAgent(ctx _context.Context, agentId string) apiGetAgentRequest { - return apiGetAgentRequest{ - apiService: a, - ctx: ctx, - agentId: agentId, +func (a *OrganizationAPIService) ClearBulkAssetTags(ctx context.Context) ApiClearBulkAssetTagsRequest { + return ApiClearBulkAssetTagsRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Agent -*/ -func (r apiGetAgentRequest) Execute() (Agent, *_nethttp.Response, error) { +// Execute executes the request +// @return map[string]interface{} +func (a *OrganizationAPIService) ClearBulkAssetTagsExecute(r ApiClearBulkAssetTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Agent + formFiles []formFile + localVarReturnValue map[string]interface{} ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetAgent") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ClearBulkAssetTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/agents/{agent_id}" - localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", _neturl.QueryEscape(parameterToString(r.agentId, "")), -1) + localVarPath := localBasePath + "/org/assets/bulk/clearTags" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.searchQuery == nil { + return localVarReturnValue, nil, reportError("searchQuery is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -304,33 +401,57 @@ func (r apiGetAgentRequest) Execute() (Agent, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.searchQuery + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -340,50 +461,74 @@ func (r apiGetAgentRequest) Execute() (Agent, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAgentsRequest struct { - ctx _context.Context - apiService *OrganizationApiService +type ApiCreateSampleRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + sampleOptions *SampleOptions + oid *string +} + +func (r ApiCreateSampleRequest) SampleOptions(sampleOptions SampleOptions) ApiCreateSampleRequest { + r.sampleOptions = &sampleOptions + return r +} + +// The current Organization +func (r ApiCreateSampleRequest) Oid(oid string) ApiCreateSampleRequest { + r.oid = &oid + return r +} + +func (r ApiCreateSampleRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.CreateSampleExecute(r) } /* -GetAgents Get all agents. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetAgentsRequest +CreateSample Create a traffic sampling task for a given site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to scan + @return ApiCreateSampleRequest */ -func (a *OrganizationApiService) GetAgents(ctx _context.Context) apiGetAgentsRequest { - return apiGetAgentsRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) CreateSample(ctx context.Context, siteId string) ApiCreateSampleRequest { + return ApiCreateSampleRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, } } -/* -Execute executes the request - @return []Agent -*/ -func (r apiGetAgentsRequest) Execute() ([]Agent, *_nethttp.Response, error) { +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) CreateSampleExecute(r ApiCreateSampleRequest) (*Task, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Agent + formFiles []formFile + localVarReturnValue *Task ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetAgents") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.CreateSample") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/agents" + localVarPath := localBasePath + "/org/sites/{site_id}/sample" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sampleOptions == nil { + return localVarReturnValue, nil, reportError("sampleOptions is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -399,33 +544,79 @@ func (r apiGetAgentsRequest) Execute() ([]Agent, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.sampleOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -435,54 +626,74 @@ func (r apiGetAgentsRequest) Execute() ([]Agent, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAssetRequest struct { - ctx _context.Context - apiService *OrganizationApiService - assetId string +type ApiCreateScanRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + scanOptions *ScanOptions + oid *string +} + +func (r ApiCreateScanRequest) ScanOptions(scanOptions ScanOptions) ApiCreateScanRequest { + r.scanOptions = &scanOptions + return r +} + +// The current Organization +func (r ApiCreateScanRequest) Oid(oid string) ApiCreateScanRequest { + r.oid = &oid + return r +} + +func (r ApiCreateScanRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.CreateScanExecute(r) } /* -GetAsset Get asset details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param assetId UUID of the asset to retrieve -@return apiGetAssetRequest +CreateScan Create a scan task for a given site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to scan + @return ApiCreateScanRequest */ -func (a *OrganizationApiService) GetAsset(ctx _context.Context, assetId string) apiGetAssetRequest { - return apiGetAssetRequest{ - apiService: a, - ctx: ctx, - assetId: assetId, +func (a *OrganizationAPIService) CreateScan(ctx context.Context, siteId string) ApiCreateScanRequest { + return ApiCreateScanRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, } } -/* -Execute executes the request - @return Asset -*/ -func (r apiGetAssetRequest) Execute() (Asset, *_nethttp.Response, error) { +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) CreateScanExecute(r ApiCreateScanRequest) (*Task, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Asset + formFiles []formFile + localVarReturnValue *Task ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetAsset") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.CreateScan") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/assets/{asset_id}" - localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", _neturl.QueryEscape(parameterToString(r.assetId, "")), -1) + localVarPath := localBasePath + "/org/sites/{site_id}/scan" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scanOptions == nil { + return localVarReturnValue, nil, reportError("scanOptions is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -498,33 +709,79 @@ func (r apiGetAssetRequest) Execute() (Asset, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.scanOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -534,59 +791,71 @@ func (r apiGetAssetRequest) Execute() (Asset, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAssetsRequest struct { - ctx _context.Context - apiService *OrganizationApiService - search *string +type ApiCreateSiteRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteOptions *SiteOptions + oid *string } -func (r apiGetAssetsRequest) Search(search string) apiGetAssetsRequest { - r.search = &search +// site definition +func (r ApiCreateSiteRequest) SiteOptions(siteOptions SiteOptions) ApiCreateSiteRequest { + r.siteOptions = &siteOptions + return r +} + +// The current Organization +func (r ApiCreateSiteRequest) Oid(oid string) ApiCreateSiteRequest { + r.oid = &oid return r } +func (r ApiCreateSiteRequest) Execute() (*Site, *http.Response, error) { + return r.ApiService.CreateSiteExecute(r) +} + /* -GetAssets Get all assets. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetAssetsRequest +CreateSite Create a new site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateSiteRequest */ -func (a *OrganizationApiService) GetAssets(ctx _context.Context) apiGetAssetsRequest { - return apiGetAssetsRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) CreateSite(ctx context.Context) ApiCreateSiteRequest { + return ApiCreateSiteRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Asset -*/ -func (r apiGetAssetsRequest) Execute() ([]Asset, *_nethttp.Response, error) { +// Execute executes the request +// @return Site +func (a *OrganizationAPIService) CreateSiteExecute(r ApiCreateSiteRequest) (*Site, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Asset + formFiles []formFile + localVarReturnValue *Site ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetAssets") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.CreateSite") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/assets" + localVarPath := localBasePath + "/org/sites" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.siteOptions == nil { + return localVarReturnValue, nil, reportError("siteOptions is required and must be specified") + } - if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -602,33 +871,57 @@ func (r apiGetAssetsRequest) Execute() ([]Asset, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.siteOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -638,48 +931,63 @@ func (r apiGetAssetsRequest) Execute() ([]Asset, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetKeyRequest struct { - ctx _context.Context - apiService *OrganizationApiService +type ApiGetAgentRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + agentId string + oid *string +} + +// The current Organization +func (r ApiGetAgentRequest) Oid(oid string) ApiGetAgentRequest { + r.oid = &oid + return r +} + +func (r ApiGetAgentRequest) Execute() (*Agent, *http.Response, error) { + return r.ApiService.GetAgentExecute(r) } /* -GetKey Get API key details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetKeyRequest +GetAgent Get details for a single agent. Legacy path for /org/explorers/{explorer_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId UUID of the agent + @return ApiGetAgentRequest */ -func (a *OrganizationApiService) GetKey(ctx _context.Context) apiGetKeyRequest { - return apiGetKeyRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetAgent(ctx context.Context, agentId string) ApiGetAgentRequest { + return ApiGetAgentRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, } } -/* -Execute executes the request - @return APIKey -*/ -func (r apiGetKeyRequest) Execute() (APIKey, *_nethttp.Response, error) { +// Execute executes the request +// @return Agent +func (a *OrganizationAPIService) GetAgentExecute(r ApiGetAgentRequest) (*Agent, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue APIKey + formFiles []formFile + localVarReturnValue *Agent ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetAgent") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/key" + localVarPath := localBasePath + "/org/agents/{agent_id}" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -697,33 +1005,55 @@ func (r apiGetKeyRequest) Execute() (APIKey, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -733,48 +1063,59 @@ func (r apiGetKeyRequest) Execute() (APIKey, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetOrganizationRequest struct { - ctx _context.Context - apiService *OrganizationApiService +type ApiGetAgentsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string +} + +// The current Organization +func (r ApiGetAgentsRequest) Oid(oid string) ApiGetAgentsRequest { + r.oid = &oid + return r +} + +func (r ApiGetAgentsRequest) Execute() ([]Agent, *http.Response, error) { + return r.ApiService.GetAgentsExecute(r) } /* -GetOrganization Get organization details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetOrganizationRequest +GetAgents Get all agents. Legacy path for /org/explorers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAgentsRequest */ -func (a *OrganizationApiService) GetOrganization(ctx _context.Context) apiGetOrganizationRequest { - return apiGetOrganizationRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetAgents(ctx context.Context) ApiGetAgentsRequest { + return ApiGetAgentsRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Organization -*/ -func (r apiGetOrganizationRequest) Execute() (Organization, *_nethttp.Response, error) { +// Execute executes the request +// @return []Agent +func (a *OrganizationAPIService) GetAgentsExecute(r ApiGetAgentsRequest) ([]Agent, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Organization + formFiles []formFile + localVarReturnValue []Agent ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetOrganization") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetAgents") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org" + localVarPath := localBasePath + "/org/agents" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -792,33 +1133,44 @@ func (r apiGetOrganizationRequest) Execute() (Organization, *_nethttp.Response, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -828,52 +1180,63 @@ func (r apiGetOrganizationRequest) Execute() (Organization, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetServiceRequest struct { - ctx _context.Context - apiService *OrganizationApiService - serviceId string +type ApiGetAssetRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + oid *string +} + +// The current Organization +func (r ApiGetAssetRequest) Oid(oid string) ApiGetAssetRequest { + r.oid = &oid + return r +} + +func (r ApiGetAssetRequest) Execute() (*Asset, *http.Response, error) { + return r.ApiService.GetAssetExecute(r) } /* -GetService Get service details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param serviceId UUID of the service to retrieve -@return apiGetServiceRequest +GetAsset Get asset details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to retrieve + @return ApiGetAssetRequest */ -func (a *OrganizationApiService) GetService(ctx _context.Context, serviceId string) apiGetServiceRequest { - return apiGetServiceRequest{ - apiService: a, - ctx: ctx, - serviceId: serviceId, +func (a *OrganizationAPIService) GetAsset(ctx context.Context, assetId string) ApiGetAssetRequest { + return ApiGetAssetRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, } } -/* -Execute executes the request - @return Service -*/ -func (r apiGetServiceRequest) Execute() (Service, *_nethttp.Response, error) { +// Execute executes the request +// @return Asset +func (a *OrganizationAPIService) GetAssetExecute(r ApiGetAssetRequest) (*Asset, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Service + formFiles []formFile + localVarReturnValue *Asset ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetService") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetAsset") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/services/{service_id}" - localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", _neturl.QueryEscape(parameterToString(r.serviceId, "")), -1) + localVarPath := localBasePath + "/org/assets/{asset_id}" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -891,33 +1254,55 @@ func (r apiGetServiceRequest) Execute() (Service, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -927,56 +1312,78 @@ func (r apiGetServiceRequest) Execute() (Service, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetServicesRequest struct { - ctx _context.Context - apiService *OrganizationApiService - search *string +type ApiGetAssetsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string + search *string + fields *string +} + +// The current Organization +func (r ApiGetAssetsRequest) Oid(oid string) ApiGetAssetsRequest { + r.oid = &oid + return r } -func (r apiGetServicesRequest) Search(search string) apiGetServicesRequest { +// A search query in runZero search query syntax +func (r ApiGetAssetsRequest) Search(search string) ApiGetAssetsRequest { r.search = &search return r } +// A list of fields to export, comma-separated +func (r ApiGetAssetsRequest) Fields(fields string) ApiGetAssetsRequest { + r.fields = &fields + return r +} + +func (r ApiGetAssetsRequest) Execute() ([]Asset, *http.Response, error) { + return r.ApiService.GetAssetsExecute(r) +} + /* -GetServices Get all services. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetServicesRequest +GetAssets Get all assets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAssetsRequest */ -func (a *OrganizationApiService) GetServices(ctx _context.Context) apiGetServicesRequest { - return apiGetServicesRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetAssets(ctx context.Context) ApiGetAssetsRequest { + return ApiGetAssetsRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Service -*/ -func (r apiGetServicesRequest) Execute() ([]Service, *_nethttp.Response, error) { +// Execute executes the request +// @return []Asset +func (a *OrganizationAPIService) GetAssetsExecute(r ApiGetAssetsRequest) ([]Asset, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Service + formFiles []formFile + localVarReturnValue []Asset ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetServices") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetAssets") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/services" + localVarPath := localBasePath + "/org/assets" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -995,33 +1402,44 @@ func (r apiGetServicesRequest) Execute() ([]Service, *_nethttp.Response, error) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1031,52 +1449,65 @@ func (r apiGetServicesRequest) Execute() ([]Service, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetSiteRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteId string +type ApiGetExplorerRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + explorerId string + oid *string +} + +// The current Organization +func (r ApiGetExplorerRequest) Oid(oid string) ApiGetExplorerRequest { + r.oid = &oid + return r +} + +func (r ApiGetExplorerRequest) Execute() (*Agent, *http.Response, error) { + return r.ApiService.GetExplorerExecute(r) } /* -GetSite Get site details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param siteId UUID or name of the site -@return apiGetSiteRequest +GetExplorer Get details for a single explorer. + +Get details for a single explorer. This is the same call as legacy path /org/agents/{agent_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param explorerId UUID of the explorer + @return ApiGetExplorerRequest */ -func (a *OrganizationApiService) GetSite(ctx _context.Context, siteId string) apiGetSiteRequest { - return apiGetSiteRequest{ - apiService: a, - ctx: ctx, - siteId: siteId, +func (a *OrganizationAPIService) GetExplorer(ctx context.Context, explorerId string) ApiGetExplorerRequest { + return ApiGetExplorerRequest{ + ApiService: a, + ctx: ctx, + explorerId: explorerId, } } -/* -Execute executes the request - @return Site -*/ -func (r apiGetSiteRequest) Execute() (Site, *_nethttp.Response, error) { +// Execute executes the request +// @return Agent +func (a *OrganizationAPIService) GetExplorerExecute(r ApiGetExplorerRequest) (*Agent, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Site + formFiles []formFile + localVarReturnValue *Agent ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetSite") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetExplorer") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites/{site_id}" - localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", _neturl.QueryEscape(parameterToString(r.siteId, "")), -1) + localVarPath := localBasePath + "/org/explorers/{explorer_id}" + localVarPath = strings.Replace(localVarPath, "{"+"explorer_id"+"}", url.PathEscape(parameterValueToString(r.explorerId, "explorerId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1094,33 +1525,55 @@ func (r apiGetSiteRequest) Execute() (Site, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1130,48 +1583,61 @@ func (r apiGetSiteRequest) Execute() (Site, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetSitesRequest struct { - ctx _context.Context - apiService *OrganizationApiService +type ApiGetExplorersRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string +} + +// The current Organization +func (r ApiGetExplorersRequest) Oid(oid string) ApiGetExplorersRequest { + r.oid = &oid + return r +} + +func (r ApiGetExplorersRequest) Execute() ([]Agent, *http.Response, error) { + return r.ApiService.GetExplorersExecute(r) } /* -GetSites Get all sites. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetSitesRequest +GetExplorers Get all explorers + +Get all explorers. This is the same call as legacy path /org/agents + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetExplorersRequest */ -func (a *OrganizationApiService) GetSites(ctx _context.Context) apiGetSitesRequest { - return apiGetSitesRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetExplorers(ctx context.Context) ApiGetExplorersRequest { + return ApiGetExplorersRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Site -*/ -func (r apiGetSitesRequest) Execute() ([]Site, *_nethttp.Response, error) { +// Execute executes the request +// @return []Agent +func (a *OrganizationAPIService) GetExplorersExecute(r ApiGetExplorersRequest) ([]Agent, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Site + formFiles []formFile + localVarReturnValue []Agent ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetSites") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetExplorers") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites" + localVarPath := localBasePath + "/org/explorers" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1189,33 +1655,44 @@ func (r apiGetSitesRequest) Execute() ([]Site, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1225,52 +1702,65 @@ func (r apiGetSitesRequest) Execute() ([]Site, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTaskRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiGetHostedZoneRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + hostedZoneId string + oid *string +} + +// The current Organization +func (r ApiGetHostedZoneRequest) Oid(oid string) ApiGetHostedZoneRequest { + r.oid = &oid + return r +} + +func (r ApiGetHostedZoneRequest) Execute() (*HostedZone, *http.Response, error) { + return r.ApiService.GetHostedZoneExecute(r) } /* -GetTask Get task details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task to retrieve -@return apiGetTaskRequest +GetHostedZone Get details for a single hosted zone. + +Get details for a single Hosted Zone. Hosted Zones are only available to Enterprise licensed customers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hostedZoneId UUID of the hosted zone + @return ApiGetHostedZoneRequest */ -func (a *OrganizationApiService) GetTask(ctx _context.Context, taskId string) apiGetTaskRequest { - return apiGetTaskRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, +func (a *OrganizationAPIService) GetHostedZone(ctx context.Context, hostedZoneId string) ApiGetHostedZoneRequest { + return ApiGetHostedZoneRequest{ + ApiService: a, + ctx: ctx, + hostedZoneId: hostedZoneId, } } -/* -Execute executes the request - @return Task -*/ -func (r apiGetTaskRequest) Execute() (Task, *_nethttp.Response, error) { +// Execute executes the request +// @return HostedZone +func (a *OrganizationAPIService) GetHostedZoneExecute(r ApiGetHostedZoneRequest) (*HostedZone, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Task + formFiles []formFile + localVarReturnValue *HostedZone ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetTask") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetHostedZone") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/hosted-zones/{hosted_zone_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hosted_zone_id"+"}", url.PathEscape(parameterValueToString(r.hostedZoneId, "hostedZoneId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1288,33 +1778,55 @@ func (r apiGetTaskRequest) Execute() (Task, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1324,51 +1836,61 @@ func (r apiGetTaskRequest) Execute() (Task, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTaskChangeReportRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiGetHostedZonesRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string } -/* -GetTaskChangeReport Returns a temporary task change report data url. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task -@return apiGetTaskChangeReportRequest -*/ -func (a *OrganizationApiService) GetTaskChangeReport(ctx _context.Context, taskId string) apiGetTaskChangeReportRequest { - return apiGetTaskChangeReportRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, - } +// The current Organization +func (r ApiGetHostedZonesRequest) Oid(oid string) ApiGetHostedZonesRequest { + r.oid = &oid + return r +} + +func (r ApiGetHostedZonesRequest) Execute() ([]HostedZone, *http.Response, error) { + return r.ApiService.GetHostedZonesExecute(r) } /* -Execute executes the request +GetHostedZones Get all hosted zones + +Get all hosted zones. Hosted Zones are only available to Enterprise licensed customers. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHostedZonesRequest */ -func (r apiGetTaskChangeReportRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetHostedZones(ctx context.Context) ApiGetHostedZonesRequest { + return ApiGetHostedZonesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []HostedZone +func (a *OrganizationAPIService) GetHostedZonesExecute(r ApiGetHostedZonesRequest) ([]HostedZone, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue []HostedZone ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetTaskChangeReport") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetHostedZones") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}/changes" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/hosted-zones" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1379,85 +1901,113 @@ func (r apiGetTaskChangeReportRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTaskScanDataRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiGetKeyRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string } -/* -GetTaskScanData Returns a temporary task scan data url. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task -@return apiGetTaskScanDataRequest -*/ -func (a *OrganizationApiService) GetTaskScanData(ctx _context.Context, taskId string) apiGetTaskScanDataRequest { - return apiGetTaskScanDataRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, - } +// The current Organization +func (r ApiGetKeyRequest) Oid(oid string) ApiGetKeyRequest { + r.oid = &oid + return r +} + +func (r ApiGetKeyRequest) Execute() (*OrganizationAPIKey, *http.Response, error) { + return r.ApiService.GetKeyExecute(r) } /* -Execute executes the request +GetKey Get API key details + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetKeyRequest */ -func (r apiGetTaskScanDataRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetKey(ctx context.Context) ApiGetKeyRequest { + return ApiGetKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OrganizationAPIKey +func (a *OrganizationAPIService) GetKeyExecute(r ApiGetKeyRequest) (*OrganizationAPIKey, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *OrganizationAPIKey ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetTaskScanData") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetKey") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}/data" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/key" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1468,84 +2018,106 @@ func (r apiGetTaskScanDataRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTaskLogDataRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiGetOrgCustomIntegrationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + customIntegrationId string } -/* -GetTaskLog Returns a temporary task log data url. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task -@return apiGetTaskLogDataRequest -*/ -func (a *OrganizationApiService) GetTaskLog(ctx _context.Context, taskId string) apiGetTaskLogDataRequest { - return apiGetTaskLogDataRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, - } +func (r ApiGetOrgCustomIntegrationRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.GetOrgCustomIntegrationExecute(r) } /* -Execute executes the request +GetOrgCustomIntegration Get single custom integration + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customIntegrationId UUID of the custom integration + @return ApiGetOrgCustomIntegrationRequest */ -func (r apiGetTaskLogDataRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetOrgCustomIntegration(ctx context.Context, customIntegrationId string) ApiGetOrgCustomIntegrationRequest { + return ApiGetOrgCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +// @return CustomIntegration +func (a *OrganizationAPIService) GetOrgCustomIntegrationExecute(r ApiGetOrgCustomIntegrationRequest) (*CustomIntegration, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *CustomIntegration ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetTaskLog") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrgCustomIntegration") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}/log" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/custom-integrations/{customIntegrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"customIntegrationId"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1557,91 +2129,136 @@ func (r apiGetTaskLogDataRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTasksRequest struct { - ctx _context.Context - apiService *OrganizationApiService - status *string +type ApiGetOrgCustomIntegrationsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService } -func (r apiGetTasksRequest) Status(status string) apiGetTasksRequest { - r.status = &status - return r +func (r ApiGetOrgCustomIntegrationsRequest) Execute() (*CustomIntegration, *http.Response, error) { + return r.ApiService.GetOrgCustomIntegrationsExecute(r) } /* -GetTasks Get all tasks (last 1000). - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetTasksRequest +GetOrgCustomIntegrations Get all custom integrations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetOrgCustomIntegrationsRequest */ -func (a *OrganizationApiService) GetTasks(ctx _context.Context) apiGetTasksRequest { - return apiGetTasksRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetOrgCustomIntegrations(ctx context.Context) ApiGetOrgCustomIntegrationsRequest { + return ApiGetOrgCustomIntegrationsRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return []Task -*/ -func (r apiGetTasksRequest) Execute() ([]Task, *_nethttp.Response, error) { +// Execute executes the request +// @return CustomIntegration +func (a *OrganizationAPIService) GetOrgCustomIntegrationsExecute(r ApiGetOrgCustomIntegrationsRequest) (*CustomIntegration, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Task + formFiles []formFile + localVarReturnValue *CustomIntegration ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetTasks") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrgCustomIntegrations") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks" + localVarPath := localBasePath + "/org/custom-integrations" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.status != nil { - localVarQueryParams.Add("status", parameterToString(*r.status, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1659,33 +2276,77 @@ func (r apiGetTasksRequest) Execute() ([]Task, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1695,52 +2356,59 @@ func (r apiGetTasksRequest) Execute() ([]Task, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWirelessLANRequest struct { - ctx _context.Context - apiService *OrganizationApiService - wirelessId string +type ApiGetOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string +} + +// The current Organization +func (r ApiGetOrganizationRequest) Oid(oid string) ApiGetOrganizationRequest { + r.oid = &oid + return r +} + +func (r ApiGetOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.GetOrganizationExecute(r) } /* -GetWirelessLAN Get wireless LAN details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param wirelessId UUID of the wireless LAN to retrieve -@return apiGetWirelessLANRequest +GetOrganization Get organization details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetOrganizationRequest */ -func (a *OrganizationApiService) GetWirelessLAN(ctx _context.Context, wirelessId string) apiGetWirelessLANRequest { - return apiGetWirelessLANRequest{ - apiService: a, - ctx: ctx, - wirelessId: wirelessId, +func (a *OrganizationAPIService) GetOrganization(ctx context.Context) ApiGetOrganizationRequest { + return ApiGetOrganizationRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Wireless -*/ -func (r apiGetWirelessLANRequest) Execute() (Wireless, *_nethttp.Response, error) { +// Execute executes the request +// @return Organization +func (a *OrganizationAPIService) GetOrganizationExecute(r ApiGetOrganizationRequest) (*Organization, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Wireless + formFiles []formFile + localVarReturnValue *Organization ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetWirelessLAN") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganization") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/wirelesss/{wireless_id}" - localVarPath = strings.Replace(localVarPath, "{"+"wireless_id"+"}", _neturl.QueryEscape(parameterToString(r.wirelessId, "")), -1) + localVarPath := localBasePath + "/org" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1758,33 +2426,44 @@ func (r apiGetWirelessLANRequest) Execute() (Wireless, *_nethttp.Response, error if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1794,56 +2473,62 @@ func (r apiGetWirelessLANRequest) Execute() (Wireless, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWirelessLANsRequest struct { - ctx _context.Context - apiService *OrganizationApiService - search *string +type ApiGetServiceRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + serviceId string + oid *string } -func (r apiGetWirelessLANsRequest) Search(search string) apiGetWirelessLANsRequest { - r.search = &search +// The current Organization +func (r ApiGetServiceRequest) Oid(oid string) ApiGetServiceRequest { + r.oid = &oid return r } +func (r ApiGetServiceRequest) Execute() (*Service, *http.Response, error) { + return r.ApiService.GetServiceExecute(r) +} + /* -GetWirelessLANs Get all wireless LANs. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetWirelessLANsRequest +GetService Get service details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId UUID of the service to retrieve + @return ApiGetServiceRequest */ -func (a *OrganizationApiService) GetWirelessLANs(ctx _context.Context) apiGetWirelessLANsRequest { - return apiGetWirelessLANsRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) GetService(ctx context.Context, serviceId string) ApiGetServiceRequest { + return ApiGetServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, } } -/* -Execute executes the request - @return []Wireless -*/ -func (r apiGetWirelessLANsRequest) Execute() ([]Wireless, *_nethttp.Response, error) { +// Execute executes the request +// @return Service +func (a *OrganizationAPIService) GetServiceExecute(r ApiGetServiceRequest) (*Service, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Wireless + formFiles []formFile + localVarReturnValue *Service ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.GetWirelessLANs") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetService") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/wireless" + localVarPath := localBasePath + "/org/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1862,33 +2547,55 @@ func (r apiGetWirelessLANsRequest) Execute() ([]Wireless, *_nethttp.Response, er if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -1898,51 +2605,69 @@ func (r apiGetWirelessLANsRequest) Execute() ([]Wireless, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiHideTaskRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiGetServicesRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string + search *string } -/* -HideTask Signal that a completed task should be hidden. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task to hide -@return apiHideTaskRequest -*/ -func (a *OrganizationApiService) HideTask(ctx _context.Context, taskId string) apiHideTaskRequest { - return apiHideTaskRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, - } +// The current Organization +func (r ApiGetServicesRequest) Oid(oid string) ApiGetServicesRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiGetServicesRequest) Search(search string) ApiGetServicesRequest { + r.search = &search + return r +} + +func (r ApiGetServicesRequest) Execute() ([]Service, *http.Response, error) { + return r.ApiService.GetServicesExecute(r) } /* -Execute executes the request +GetServices Get all services + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetServicesRequest */ -func (r apiHideTaskRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetServices(ctx context.Context) ApiGetServicesRequest { + return ApiGetServicesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Service +func (a *OrganizationAPIService) GetServicesExecute(r ApiGetServicesRequest) ([]Service, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue []Service ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.HideTask") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetServices") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}/hide" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/services" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1953,94 +2678,119 @@ func (r apiHideTaskRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportScanDataRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteId string - body io.Reader +type ApiGetSiteRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + oid *string } -func (r apiImportScanDataRequest) Body(body io.Reader) apiImportScanDataRequest { - r.body = body +// The current Organization +func (r ApiGetSiteRequest) Oid(oid string) ApiGetSiteRequest { + r.oid = &oid return r } +func (r ApiGetSiteRequest) Execute() (*Site, *http.Response, error) { + return r.ApiService.GetSiteExecute(r) +} + /* -ImportScanData Import a scan data file into a site. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param siteId UUID or name of the site to import scan data into -@return apiImportScanDataRequest +GetSite Get site details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site + @return ApiGetSiteRequest */ -func (a *OrganizationApiService) ImportScanData(ctx _context.Context, siteId string) apiImportScanDataRequest { - return apiImportScanDataRequest{ - apiService: a, - ctx: ctx, - siteId: siteId, +func (a *OrganizationAPIService) GetSite(ctx context.Context, siteId string) ApiGetSiteRequest { + return ApiGetSiteRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, } } -/* -Execute executes the request - @return Task -*/ -func (r apiImportScanDataRequest) Execute() (Task, *_nethttp.Response, error) { +// Execute executes the request +// @return Site +func (a *OrganizationAPIService) GetSiteExecute(r ApiGetSiteRequest) (*Site, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Task + formFiles []formFile + localVarReturnValue *Site ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.ImportScanData") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetSite") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites/{site_id}/import" - localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", _neturl.QueryEscape(parameterToString(r.siteId, "")), -1) + localVarPath := localBasePath + "/org/sites/{site_id}" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/octet-stream"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2056,35 +2806,55 @@ func (r apiImportScanDataRequest) Execute() (Task, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -2094,51 +2864,59 @@ func (r apiImportScanDataRequest) Execute() (Task, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiRemoveAgentRequest struct { - ctx _context.Context - apiService *OrganizationApiService - agentId string +type ApiGetSitesRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string } -/* -RemoveAgent Remove and uninstall an agent. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param agentId UUID of the agent to remove -@return apiRemoveAgentRequest -*/ -func (a *OrganizationApiService) RemoveAgent(ctx _context.Context, agentId string) apiRemoveAgentRequest { - return apiRemoveAgentRequest{ - apiService: a, - ctx: ctx, - agentId: agentId, - } +// The current Organization +func (r ApiGetSitesRequest) Oid(oid string) ApiGetSitesRequest { + r.oid = &oid + return r +} + +func (r ApiGetSitesRequest) Execute() ([]Site, *http.Response, error) { + return r.ApiService.GetSitesExecute(r) } /* -Execute executes the request +GetSites Get all sites + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSitesRequest */ -func (r apiRemoveAgentRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetSites(ctx context.Context) ApiGetSitesRequest { + return ApiGetSitesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Site +func (a *OrganizationAPIService) GetSitesExecute(r ApiGetSitesRequest) ([]Site, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue []Site ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.RemoveAgent") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetSites") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/agents/{agent_id}" - localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", _neturl.QueryEscape(parameterToString(r.agentId, "")), -1) + localVarPath := localBasePath + "/org/sites" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2149,85 +2927,117 @@ func (r apiRemoveAgentRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiRemoveAssetRequest struct { - ctx _context.Context - apiService *OrganizationApiService - assetId string +type ApiGetTaskRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string } -/* -RemoveAsset Remove an asset. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param assetId UUID of the asset to remove -@return apiRemoveAssetRequest -*/ -func (a *OrganizationApiService) RemoveAsset(ctx _context.Context, assetId string) apiRemoveAssetRequest { - return apiRemoveAssetRequest{ - apiService: a, - ctx: ctx, - assetId: assetId, - } +// The current Organization +func (r ApiGetTaskRequest) Oid(oid string) ApiGetTaskRequest { + r.oid = &oid + return r +} + +func (r ApiGetTaskRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.GetTaskExecute(r) } /* -Execute executes the request +GetTask Get task details + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task to retrieve + @return ApiGetTaskRequest */ -func (r apiRemoveAssetRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetTask(ctx context.Context, taskId string) ApiGetTaskRequest { + return ApiGetTaskRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) GetTaskExecute(r ApiGetTaskRequest) (*Task, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *Task ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.RemoveAsset") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetTask") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/assets/{asset_id}" - localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", _neturl.QueryEscape(parameterToString(r.assetId, "")), -1) + localVarPath := localBasePath + "/org/tasks/{task_id}" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2238,85 +3048,115 @@ func (r apiRemoveAssetRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiRemoveServiceRequest struct { - ctx _context.Context - apiService *OrganizationApiService - serviceId string +type ApiGetTaskChangeReportRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string } -/* -RemoveService Remove a service. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param serviceId UUID of the service to remove -@return apiRemoveServiceRequest -*/ -func (a *OrganizationApiService) RemoveService(ctx _context.Context, serviceId string) apiRemoveServiceRequest { - return apiRemoveServiceRequest{ - apiService: a, - ctx: ctx, - serviceId: serviceId, - } +// The current Organization +func (r ApiGetTaskChangeReportRequest) Oid(oid string) ApiGetTaskChangeReportRequest { + r.oid = &oid + return r +} + +func (r ApiGetTaskChangeReportRequest) Execute() (*http.Response, error) { + return r.ApiService.GetTaskChangeReportExecute(r) } /* -Execute executes the request +GetTaskChangeReport Returns a temporary task change report data url + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task + @return ApiGetTaskChangeReportRequest */ -func (r apiRemoveServiceRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) GetTaskChangeReport(ctx context.Context, taskId string) ApiGetTaskChangeReportRequest { + return ApiGetTaskChangeReportRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetTaskChangeReportExecute(r ApiGetTaskChangeReportRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.RemoveService") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetTaskChangeReport") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/services/{service_id}" - localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", _neturl.QueryEscape(parameterToString(r.serviceId, "")), -1) + localVarPath := localBasePath + "/org/tasks/{task_id}/changes" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2327,87 +3167,3653 @@ func (r apiRemoveServiceRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 303 { + var v URL + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarHTTPResponse, nil +} + +type ApiGetTaskLogRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string +} + +// The current Organization +func (r ApiGetTaskLogRequest) Oid(oid string) ApiGetTaskLogRequest { + r.oid = &oid + return r +} + +func (r ApiGetTaskLogRequest) Execute() (*http.Response, error) { + return r.ApiService.GetTaskLogExecute(r) +} + +/* +GetTaskLog Returns a temporary task log data url + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task + @return ApiGetTaskLogRequest +*/ +func (a *OrganizationAPIService) GetTaskLog(ctx context.Context, taskId string) ApiGetTaskLogRequest { + return ApiGetTaskLogRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetTaskLogExecute(r ApiGetTaskLogRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetTaskLog") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/tasks/{task_id}/log" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 303 { + var v URL + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetTaskScanDataRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string +} + +// The current Organization +func (r ApiGetTaskScanDataRequest) Oid(oid string) ApiGetTaskScanDataRequest { + r.oid = &oid + return r +} + +func (r ApiGetTaskScanDataRequest) Execute() (*http.Response, error) { + return r.ApiService.GetTaskScanDataExecute(r) +} + +/* +GetTaskScanData Returns a temporary task scan data url + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task + @return ApiGetTaskScanDataRequest +*/ +func (a *OrganizationAPIService) GetTaskScanData(ctx context.Context, taskId string) ApiGetTaskScanDataRequest { + return ApiGetTaskScanDataRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetTaskScanDataExecute(r ApiGetTaskScanDataRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetTaskScanData") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/tasks/{task_id}/data" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 303 { + var v URL + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetTasksRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string + status *string + search *string +} + +// The current Organization +func (r ApiGetTasksRequest) Oid(oid string) ApiGetTasksRequest { + r.oid = &oid + return r +} + +// an optional status string for filtering results +func (r ApiGetTasksRequest) Status(status string) ApiGetTasksRequest { + r.status = &status + return r +} + +// an optional search string for filtering results +func (r ApiGetTasksRequest) Search(search string) ApiGetTasksRequest { + r.search = &search + return r +} + +func (r ApiGetTasksRequest) Execute() ([]Task, *http.Response, error) { + return r.ApiService.GetTasksExecute(r) +} + +/* +GetTasks Get all tasks (last 1000) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTasksRequest +*/ +func (a *OrganizationAPIService) GetTasks(ctx context.Context) ApiGetTasksRequest { + return ApiGetTasksRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Task +func (a *OrganizationAPIService) GetTasksExecute(r ApiGetTasksRequest) ([]Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetTasks") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/tasks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetWirelessLANRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + wirelessId string + oid *string +} + +// The current Organization +func (r ApiGetWirelessLANRequest) Oid(oid string) ApiGetWirelessLANRequest { + r.oid = &oid + return r +} + +func (r ApiGetWirelessLANRequest) Execute() (*Wireless, *http.Response, error) { + return r.ApiService.GetWirelessLANExecute(r) +} + +/* +GetWirelessLAN Get wireless LAN details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wirelessId UUID of the wireless LAN to retrieve + @return ApiGetWirelessLANRequest +*/ +func (a *OrganizationAPIService) GetWirelessLAN(ctx context.Context, wirelessId string) ApiGetWirelessLANRequest { + return ApiGetWirelessLANRequest{ + ApiService: a, + ctx: ctx, + wirelessId: wirelessId, + } +} + +// Execute executes the request +// @return Wireless +func (a *OrganizationAPIService) GetWirelessLANExecute(r ApiGetWirelessLANRequest) (*Wireless, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Wireless + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetWirelessLAN") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/wireless/{wireless_id}" + localVarPath = strings.Replace(localVarPath, "{"+"wireless_id"+"}", url.PathEscape(parameterValueToString(r.wirelessId, "wirelessId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetWirelessLANsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiGetWirelessLANsRequest) Oid(oid string) ApiGetWirelessLANsRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiGetWirelessLANsRequest) Search(search string) ApiGetWirelessLANsRequest { + r.search = &search + return r +} + +func (r ApiGetWirelessLANsRequest) Execute() ([]Wireless, *http.Response, error) { + return r.ApiService.GetWirelessLANsExecute(r) +} + +/* +GetWirelessLANs Get all wireless LANs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetWirelessLANsRequest +*/ +func (a *OrganizationAPIService) GetWirelessLANs(ctx context.Context) ApiGetWirelessLANsRequest { + return ApiGetWirelessLANsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Wireless +func (a *OrganizationAPIService) GetWirelessLANsExecute(r ApiGetWirelessLANsRequest) ([]Wireless, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Wireless + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetWirelessLANs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/wireless" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiHideTaskRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string +} + +// The current Organization +func (r ApiHideTaskRequest) Oid(oid string) ApiHideTaskRequest { + r.oid = &oid + return r +} + +func (r ApiHideTaskRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.HideTaskExecute(r) +} + +/* +HideTask Signal that a completed task should be hidden + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task to hide + @return ApiHideTaskRequest +*/ +func (a *OrganizationAPIService) HideTask(ctx context.Context, taskId string) ApiHideTaskRequest { + return ApiHideTaskRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) HideTaskExecute(r ApiHideTaskRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.HideTask") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/tasks/{task_id}/hide" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiImportNessusScanDataRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + body *os.File + oid *string +} + +func (r ApiImportNessusScanDataRequest) Body(body *os.File) ApiImportNessusScanDataRequest { + r.body = body + return r +} + +// The current Organization +func (r ApiImportNessusScanDataRequest) Oid(oid string) ApiImportNessusScanDataRequest { + r.oid = &oid + return r +} + +func (r ApiImportNessusScanDataRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.ImportNessusScanDataExecute(r) +} + +/* +ImportNessusScanData Import a Nessus scan data file into a site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to import Nessus scan data into + @return ApiImportNessusScanDataRequest +*/ +func (a *OrganizationAPIService) ImportNessusScanData(ctx context.Context, siteId string) ApiImportNessusScanDataRequest { + return ApiImportNessusScanDataRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) ImportNessusScanDataExecute(r ApiImportNessusScanDataRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ImportNessusScanData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/sites/{site_id}/import/nessus" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiImportPacketDataRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + body *os.File + oid *string +} + +func (r ApiImportPacketDataRequest) Body(body *os.File) ApiImportPacketDataRequest { + r.body = body + return r +} + +// The current Organization +func (r ApiImportPacketDataRequest) Oid(oid string) ApiImportPacketDataRequest { + r.oid = &oid + return r +} + +func (r ApiImportPacketDataRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.ImportPacketDataExecute(r) +} + +/* +ImportPacketData Import a packet capture file into a site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to import packet capture into + @return ApiImportPacketDataRequest +*/ +func (a *OrganizationAPIService) ImportPacketData(ctx context.Context, siteId string) ApiImportPacketDataRequest { + return ApiImportPacketDataRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) ImportPacketDataExecute(r ApiImportPacketDataRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ImportPacketData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/sites/{site_id}/import/packet" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiImportScanDataRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + body *os.File + oid *string +} + +func (r ApiImportScanDataRequest) Body(body *os.File) ApiImportScanDataRequest { + r.body = body + return r +} + +// The current Organization +func (r ApiImportScanDataRequest) Oid(oid string) ApiImportScanDataRequest { + r.oid = &oid + return r +} + +func (r ApiImportScanDataRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.ImportScanDataExecute(r) +} + +/* +ImportScanData Import a scan data file into a site + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to import scan data into + @return ApiImportScanDataRequest +*/ +func (a *OrganizationAPIService) ImportScanData(ctx context.Context, siteId string) ApiImportScanDataRequest { + return ApiImportScanDataRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) ImportScanDataExecute(r ApiImportScanDataRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ImportScanData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/sites/{site_id}/import" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiMergeAssetsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetIDs *AssetIDs + oid *string +} + +// List of Asset IDs to merge +func (r ApiMergeAssetsRequest) AssetIDs(assetIDs AssetIDs) ApiMergeAssetsRequest { + r.assetIDs = &assetIDs + return r +} + +// The current Organization +func (r ApiMergeAssetsRequest) Oid(oid string) ApiMergeAssetsRequest { + r.oid = &oid + return r +} + +func (r ApiMergeAssetsRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.MergeAssetsExecute(r) +} + +/* +MergeAssets Merge multiple assets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMergeAssetsRequest +*/ +func (a *OrganizationAPIService) MergeAssets(ctx context.Context) ApiMergeAssetsRequest { + return ApiMergeAssetsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]interface{} +func (a *OrganizationAPIService) MergeAssetsExecute(r ApiMergeAssetsRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.MergeAssets") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/merge" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetIDs == nil { + return localVarReturnValue, nil, reportError("assetIDs is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetIDs + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveAgentRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + agentId string + oid *string +} + +// The current Organization +func (r ApiRemoveAgentRequest) Oid(oid string) ApiRemoveAgentRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveAgentRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAgentExecute(r) +} + +/* +RemoveAgent Remove and uninstall an agent. Legacy path for /org/explorers/{explorer_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId UUID of the agent to remove + @return ApiRemoveAgentRequest +*/ +func (a *OrganizationAPIService) RemoveAgent(ctx context.Context, agentId string) ApiRemoveAgentRequest { + return ApiRemoveAgentRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveAgentExecute(r ApiRemoveAgentRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveAgent") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/agents/{agent_id}" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAssetRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + oid *string +} + +// The current Organization +func (r ApiRemoveAssetRequest) Oid(oid string) ApiRemoveAssetRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveAssetRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAssetExecute(r) +} + +/* +RemoveAsset Remove an asset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to remove + @return ApiRemoveAssetRequest +*/ +func (a *OrganizationAPIService) RemoveAsset(ctx context.Context, assetId string) ApiRemoveAssetRequest { + return ApiRemoveAssetRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveAssetExecute(r ApiRemoveAssetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveAsset") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveAssetSourceRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + sourceId string +} + +func (r ApiRemoveAssetSourceRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveAssetSourceExecute(r) +} + +/* +RemoveAssetSource Remove single source from asset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @param sourceId UUID of the source + @return ApiRemoveAssetSourceRequest +*/ +func (a *OrganizationAPIService) RemoveAssetSource(ctx context.Context, assetId string, sourceId string) ApiRemoveAssetSourceRequest { + return ApiRemoveAssetSourceRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + sourceId: sourceId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveAssetSourceExecute(r ApiRemoveAssetSourceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveAssetSource") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}/sources/{source_id}/remove" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"source_id"+"}", url.PathEscape(parameterValueToString(r.sourceId, "sourceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveBulkAssetsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetIDs *AssetIDs + oid *string +} + +// list of asset IDs to remove +func (r ApiRemoveBulkAssetsRequest) AssetIDs(assetIDs AssetIDs) ApiRemoveBulkAssetsRequest { + r.assetIDs = &assetIDs + return r +} + +// The current Organization +func (r ApiRemoveBulkAssetsRequest) Oid(oid string) ApiRemoveBulkAssetsRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveBulkAssetsRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveBulkAssetsExecute(r) +} + +/* +RemoveBulkAssets Removes multiple assets by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRemoveBulkAssetsRequest +*/ +func (a *OrganizationAPIService) RemoveBulkAssets(ctx context.Context) ApiRemoveBulkAssetsRequest { + return ApiRemoveBulkAssetsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveBulkAssetsExecute(r ApiRemoveBulkAssetsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveBulkAssets") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/bulk/delete" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetIDs == nil { + return nil, reportError("assetIDs is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetIDs + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveCustomIntegrationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + customIntegrationId string +} + +func (r ApiRemoveCustomIntegrationRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveCustomIntegrationExecute(r) +} + +/* +RemoveCustomIntegration Remove single custom integration from asset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @param customIntegrationId UUID of the custom integration + @return ApiRemoveCustomIntegrationRequest +*/ +func (a *OrganizationAPIService) RemoveCustomIntegration(ctx context.Context, assetId string, customIntegrationId string) ApiRemoveCustomIntegrationRequest { + return ApiRemoveCustomIntegrationRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + customIntegrationId: customIntegrationId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveCustomIntegrationExecute(r ApiRemoveCustomIntegrationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveCustomIntegration") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}/custom-integrations/{custom_integration_id}/remove" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"custom_integration_id"+"}", url.PathEscape(parameterValueToString(r.customIntegrationId, "customIntegrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveExplorerRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + explorerId string + oid *string +} + +// The current Organization +func (r ApiRemoveExplorerRequest) Oid(oid string) ApiRemoveExplorerRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveExplorerRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveExplorerExecute(r) +} + +/* +RemoveExplorer Remove and uninstall an explorer + +Remove and uninstall an explorer. This is the same call as legacy path /org/agents/{agent_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param explorerId UUID of the explorer to remove + @return ApiRemoveExplorerRequest +*/ +func (a *OrganizationAPIService) RemoveExplorer(ctx context.Context, explorerId string) ApiRemoveExplorerRequest { + return ApiRemoveExplorerRequest{ + ApiService: a, + ctx: ctx, + explorerId: explorerId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveExplorerExecute(r ApiRemoveExplorerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveExplorer") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/explorers/{explorer_id}" + localVarPath = strings.Replace(localVarPath, "{"+"explorer_id"+"}", url.PathEscape(parameterValueToString(r.explorerId, "explorerId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveKeyRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string +} + +// The current Organization +func (r ApiRemoveKeyRequest) Oid(oid string) ApiRemoveKeyRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveKeyExecute(r) +} + +/* +RemoveKey Remove the current API key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRemoveKeyRequest +*/ +func (a *OrganizationAPIService) RemoveKey(ctx context.Context) ApiRemoveKeyRequest { + return ApiRemoveKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveKeyExecute(r ApiRemoveKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/key" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveServiceRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + serviceId string + oid *string +} + +// The current Organization +func (r ApiRemoveServiceRequest) Oid(oid string) ApiRemoveServiceRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveServiceRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveServiceExecute(r) +} + +/* +RemoveService Remove a service + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId UUID of the service to remove + @return ApiRemoveServiceRequest +*/ +func (a *OrganizationAPIService) RemoveService(ctx context.Context, serviceId string) ApiRemoveServiceRequest { + return ApiRemoveServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveServiceExecute(r ApiRemoveServiceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveService") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveSiteRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + oid *string +} + +// The current Organization +func (r ApiRemoveSiteRequest) Oid(oid string) ApiRemoveSiteRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveSiteRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveSiteExecute(r) +} + +/* +RemoveSite Remove a site and associated assets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to remove + @return ApiRemoveSiteRequest +*/ +func (a *OrganizationAPIService) RemoveSite(ctx context.Context, siteId string) ApiRemoveSiteRequest { + return ApiRemoveSiteRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveSiteExecute(r ApiRemoveSiteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveSite") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/sites/{site_id}" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveWirelessLANRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + wirelessId string + oid *string +} + +// The current Organization +func (r ApiRemoveWirelessLANRequest) Oid(oid string) ApiRemoveWirelessLANRequest { + r.oid = &oid + return r +} + +func (r ApiRemoveWirelessLANRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveWirelessLANExecute(r) +} + +/* +RemoveWirelessLAN Remove a wireless LAN + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wirelessId UUID of the wireless LAN to remove + @return ApiRemoveWirelessLANRequest +*/ +func (a *OrganizationAPIService) RemoveWirelessLAN(ctx context.Context, wirelessId string) ApiRemoveWirelessLANRequest { + return ApiRemoveWirelessLANRequest{ + ApiService: a, + ctx: ctx, + wirelessId: wirelessId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveWirelessLANExecute(r ApiRemoveWirelessLANRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveWirelessLAN") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/wireless/{wireless_id}" + localVarPath = strings.Replace(localVarPath, "{"+"wireless_id"+"}", url.PathEscape(parameterValueToString(r.wirelessId, "wirelessId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRotateKeyRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + oid *string +} + +// The current Organization +func (r ApiRotateKeyRequest) Oid(oid string) ApiRotateKeyRequest { + r.oid = &oid + return r +} + +func (r ApiRotateKeyRequest) Execute() (*OrganizationAPIKey, *http.Response, error) { + return r.ApiService.RotateKeyExecute(r) +} + +/* +RotateKey Rotate the API key secret and return the updated key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRotateKeyRequest +*/ +func (a *OrganizationAPIService) RotateKey(ctx context.Context) ApiRotateKeyRequest { + return ApiRotateKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OrganizationAPIKey +func (a *OrganizationAPIService) RotateKeyExecute(r ApiRotateKeyRequest) (*OrganizationAPIKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationAPIKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RotateKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/key/rotate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiStopTaskRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + oid *string +} + +// The current Organization +func (r ApiStopTaskRequest) Oid(oid string) ApiStopTaskRequest { + r.oid = &oid + return r +} + +func (r ApiStopTaskRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.StopTaskExecute(r) +} + +/* +StopTask Signal that a task should be stopped or canceled.This will also remove recurring and scheduled tasks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task to stop + @return ApiStopTaskRequest +*/ +func (a *OrganizationAPIService) StopTask(ctx context.Context, taskId string) ApiStopTaskRequest { + return ApiStopTaskRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, + } +} + +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) StopTaskExecute(r ApiStopTaskRequest) (*Task, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Task + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.StopTask") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/tasks/{task_id}/stop" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAgentSettingsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + agentId string + agentPatchedSettings *AgentPatchedSettings + oid *string +} + +// The updated settings to apply to the agent +func (r ApiUpdateAgentSettingsRequest) AgentPatchedSettings(agentPatchedSettings AgentPatchedSettings) ApiUpdateAgentSettingsRequest { + r.agentPatchedSettings = &agentPatchedSettings + return r +} + +// The current Organization +func (r ApiUpdateAgentSettingsRequest) Oid(oid string) ApiUpdateAgentSettingsRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateAgentSettingsRequest) Execute() (*Agent, *http.Response, error) { + return r.ApiService.UpdateAgentSettingsExecute(r) +} + +/* +UpdateAgentSettings Update the settings associated with the agent. Legacy path for /org/explorers/{explorer_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId UUID of the agent to update + @return ApiUpdateAgentSettingsRequest +*/ +func (a *OrganizationAPIService) UpdateAgentSettings(ctx context.Context, agentId string) ApiUpdateAgentSettingsRequest { + return ApiUpdateAgentSettingsRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// @return Agent +func (a *OrganizationAPIService) UpdateAgentSettingsExecute(r ApiUpdateAgentSettingsRequest) (*Agent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Agent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateAgentSettings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/agents/{agent_id}" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentPatchedSettings == nil { + return localVarReturnValue, nil, reportError("agentPatchedSettings is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.agentPatchedSettings + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetCommentsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + assetComments *AssetComments + oid *string +} + +// comments to apply to the asset +func (r ApiUpdateAssetCommentsRequest) AssetComments(assetComments AssetComments) ApiUpdateAssetCommentsRequest { + r.assetComments = &assetComments + return r +} + +// The current Organization +func (r ApiUpdateAssetCommentsRequest) Oid(oid string) ApiUpdateAssetCommentsRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateAssetCommentsRequest) Execute() (*Asset, *http.Response, error) { + return r.ApiService.UpdateAssetCommentsExecute(r) +} + +/* +UpdateAssetComments Update asset comments + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @return ApiUpdateAssetCommentsRequest +*/ +func (a *OrganizationAPIService) UpdateAssetComments(ctx context.Context, assetId string) ApiUpdateAssetCommentsRequest { + return ApiUpdateAssetCommentsRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + } +} + +// Execute executes the request +// @return Asset +func (a *OrganizationAPIService) UpdateAssetCommentsExecute(r ApiUpdateAssetCommentsRequest) (*Asset, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Asset + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateAssetComments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}/comments" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetComments == nil { + return localVarReturnValue, nil, reportError("assetComments is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetComments + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetCriticalityRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + assetCriticality *AssetCriticality + oid *string +} + +// comments to apply to the asset +func (r ApiUpdateAssetCriticalityRequest) AssetCriticality(assetCriticality AssetCriticality) ApiUpdateAssetCriticalityRequest { + r.assetCriticality = &assetCriticality + return r +} + +// The current Organization +func (r ApiUpdateAssetCriticalityRequest) Oid(oid string) ApiUpdateAssetCriticalityRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateAssetCriticalityRequest) Execute() (*Asset, *http.Response, error) { + return r.ApiService.UpdateAssetCriticalityExecute(r) +} + +/* +UpdateAssetCriticality Update asset criticality + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @return ApiUpdateAssetCriticalityRequest +*/ +func (a *OrganizationAPIService) UpdateAssetCriticality(ctx context.Context, assetId string) ApiUpdateAssetCriticalityRequest { + return ApiUpdateAssetCriticalityRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + } +} + +// Execute executes the request +// @return Asset +func (a *OrganizationAPIService) UpdateAssetCriticalityExecute(r ApiUpdateAssetCriticalityRequest) (*Asset, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Asset + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateAssetCriticality") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}/criticality" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetCriticality == nil { + return localVarReturnValue, nil, reportError("assetCriticality is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetCriticality + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetOwnersRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + assetOwnerships *AssetOwnerships + oid *string +} + +// list of ownerships to apply to the asset +func (r ApiUpdateAssetOwnersRequest) AssetOwnerships(assetOwnerships AssetOwnerships) ApiUpdateAssetOwnersRequest { + r.assetOwnerships = &assetOwnerships + return r +} + +// The current Organization +func (r ApiUpdateAssetOwnersRequest) Oid(oid string) ApiUpdateAssetOwnersRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateAssetOwnersRequest) Execute() (*Asset, *http.Response, error) { + return r.ApiService.UpdateAssetOwnersExecute(r) +} + +/* +UpdateAssetOwners Update asset owners + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @return ApiUpdateAssetOwnersRequest +*/ +func (a *OrganizationAPIService) UpdateAssetOwners(ctx context.Context, assetId string) ApiUpdateAssetOwnersRequest { + return ApiUpdateAssetOwnersRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, + } +} + +// Execute executes the request +// @return Asset +func (a *OrganizationAPIService) UpdateAssetOwnersExecute(r ApiUpdateAssetOwnersRequest) (*Asset, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Asset + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateAssetOwners") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/org/assets/{asset_id}/owners" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetOwnerships == nil { + return localVarReturnValue, nil, reportError("assetOwnerships is required and must be specified") + } + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assetOwnerships + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetTagsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetId string + assetTags *AssetTags + oid *string +} + +// tags to apply to the asset +func (r ApiUpdateAssetTagsRequest) AssetTags(assetTags AssetTags) ApiUpdateAssetTagsRequest { + r.assetTags = &assetTags + return r +} + +// The current Organization +func (r ApiUpdateAssetTagsRequest) Oid(oid string) ApiUpdateAssetTagsRequest { + r.oid = &oid + return r } -type apiRemoveSiteRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteId string +func (r ApiUpdateAssetTagsRequest) Execute() (*Asset, *http.Response, error) { + return r.ApiService.UpdateAssetTagsExecute(r) } /* -RemoveSite Remove a site and associated assets. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param siteId UUID or name of the site to remove -@return apiRemoveSiteRequest +UpdateAssetTags Update asset tags + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param assetId UUID of the asset to update + @return ApiUpdateAssetTagsRequest */ -func (a *OrganizationApiService) RemoveSite(ctx _context.Context, siteId string) apiRemoveSiteRequest { - return apiRemoveSiteRequest{ - apiService: a, - ctx: ctx, - siteId: siteId, +func (a *OrganizationAPIService) UpdateAssetTags(ctx context.Context, assetId string) ApiUpdateAssetTagsRequest { + return ApiUpdateAssetTagsRequest{ + ApiService: a, + ctx: ctx, + assetId: assetId, } } -/* -Execute executes the request - -*/ -func (r apiRemoveSiteRequest) Execute() (*_nethttp.Response, error) { +// Execute executes the request +// @return Asset +func (a *OrganizationAPIService) UpdateAssetTagsExecute(r ApiUpdateAssetTagsRequest) (*Asset, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *Asset ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.RemoveSite") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateAssetTags") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites/{site_id}" - localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", _neturl.QueryEscape(parameterToString(r.siteId, "")), -1) + localVarPath := localBasePath + "/org/assets/{asset_id}/tags" + localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", url.PathEscape(parameterValueToString(r.assetId, "assetId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetTags == nil { + return localVarReturnValue, nil, reportError("assetTags is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2416,87 +6822,138 @@ func (r apiRemoveSiteRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.assetTags + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiRemoveWirelessLANRequest struct { - ctx _context.Context - apiService *OrganizationApiService - wirelessId string +type ApiUpdateBulkAssetCriticalityRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetCriticalityWithSearch *AssetCriticalityWithSearch + oid *string } -/* -RemoveWirelessLAN Remove a wireless LAN. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param wirelessId UUID of the wireless LAN to remove -@return apiRemoveWirelessLANRequest -*/ -func (a *OrganizationApiService) RemoveWirelessLAN(ctx _context.Context, wirelessId string) apiRemoveWirelessLANRequest { - return apiRemoveWirelessLANRequest{ - apiService: a, - ctx: ctx, - wirelessId: wirelessId, - } +// search query to filter and criticality to apply +func (r ApiUpdateBulkAssetCriticalityRequest) AssetCriticalityWithSearch(assetCriticalityWithSearch AssetCriticalityWithSearch) ApiUpdateBulkAssetCriticalityRequest { + r.assetCriticalityWithSearch = &assetCriticalityWithSearch + return r +} + +// The current Organization +func (r ApiUpdateBulkAssetCriticalityRequest) Oid(oid string) ApiUpdateBulkAssetCriticalityRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateBulkAssetCriticalityRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.UpdateBulkAssetCriticalityExecute(r) } /* -Execute executes the request +UpdateBulkAssetCriticality Update criticality across multiple assets based on a search query + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateBulkAssetCriticalityRequest */ -func (r apiRemoveWirelessLANRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) UpdateBulkAssetCriticality(ctx context.Context) ApiUpdateBulkAssetCriticalityRequest { + return ApiUpdateBulkAssetCriticalityRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]interface{} +func (a *OrganizationAPIService) UpdateBulkAssetCriticalityExecute(r ApiUpdateBulkAssetCriticalityRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue map[string]interface{} ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.RemoveWirelessLAN") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateBulkAssetCriticality") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/wirelesss/{wireless_id}" - localVarPath = strings.Replace(localVarPath, "{"+"wireless_id"+"}", _neturl.QueryEscape(parameterToString(r.wirelessId, "")), -1) + localVarPath := localBasePath + "/org/assets/bulk/criticality" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetCriticalityWithSearch == nil { + return localVarReturnValue, nil, reportError("assetCriticalityWithSearch is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2505,87 +6962,138 @@ func (r apiRemoveWirelessLANRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.assetCriticalityWithSearch + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiStopTaskRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string +type ApiUpdateBulkAssetOwnersRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetOwnershipsWithSearch *AssetOwnershipsWithSearch + oid *string } -/* -StopTask Signal that a task should be stopped or canceled. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task to stop -@return apiStopTaskRequest -*/ -func (a *OrganizationApiService) StopTask(ctx _context.Context, taskId string) apiStopTaskRequest { - return apiStopTaskRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, - } +// search query to filter and ownerships to apply +func (r ApiUpdateBulkAssetOwnersRequest) AssetOwnershipsWithSearch(assetOwnershipsWithSearch AssetOwnershipsWithSearch) ApiUpdateBulkAssetOwnersRequest { + r.assetOwnershipsWithSearch = &assetOwnershipsWithSearch + return r +} + +// The current Organization +func (r ApiUpdateBulkAssetOwnersRequest) Oid(oid string) ApiUpdateBulkAssetOwnersRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateBulkAssetOwnersRequest) Execute() (*BulkAssetUpdateResult, *http.Response, error) { + return r.ApiService.UpdateBulkAssetOwnersExecute(r) } /* -Execute executes the request +UpdateBulkAssetOwners Update asset owners across multiple assets based on a search query + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateBulkAssetOwnersRequest */ -func (r apiStopTaskRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) UpdateBulkAssetOwners(ctx context.Context) ApiUpdateBulkAssetOwnersRequest { + return ApiUpdateBulkAssetOwnersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return BulkAssetUpdateResult +func (a *OrganizationAPIService) UpdateBulkAssetOwnersExecute(r ApiUpdateBulkAssetOwnersRequest) (*BulkAssetUpdateResult, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *BulkAssetUpdateResult ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.StopTask") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateBulkAssetOwners") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}/stop" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/assets/bulk/owners" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetOwnershipsWithSearch == nil { + return localVarReturnValue, nil, reportError("assetOwnershipsWithSearch is required and must be specified") + } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2594,96 +7102,158 @@ func (r apiStopTaskRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + // body params + localVarPostBody = r.assetOwnershipsWithSearch + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAgentSiteRequest struct { - ctx _context.Context - apiService *OrganizationApiService - agentId string - agentSiteID *AgentSiteID +type ApiUpdateBulkAssetTagsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + assetTagsWithSearch *AssetTagsWithSearch + oid *string } -func (r apiUpdateAgentSiteRequest) AgentSiteID(agentSiteID AgentSiteID) apiUpdateAgentSiteRequest { - r.agentSiteID = &agentSiteID +// search query to filter and tags to apply +func (r ApiUpdateBulkAssetTagsRequest) AssetTagsWithSearch(assetTagsWithSearch AssetTagsWithSearch) ApiUpdateBulkAssetTagsRequest { + r.assetTagsWithSearch = &assetTagsWithSearch return r } +// The current Organization +func (r ApiUpdateBulkAssetTagsRequest) Oid(oid string) ApiUpdateBulkAssetTagsRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateBulkAssetTagsRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.UpdateBulkAssetTagsExecute(r) +} + /* -UpdateAgentSite Update the site associated with agent. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param agentId UUID of the agent to update -@return apiUpdateAgentSiteRequest +UpdateBulkAssetTags Update tags across multiple assets based on a search query + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateBulkAssetTagsRequest */ -func (a *OrganizationApiService) UpdateAgentSite(ctx _context.Context, agentId string) apiUpdateAgentSiteRequest { - return apiUpdateAgentSiteRequest{ - apiService: a, - ctx: ctx, - agentId: agentId, +func (a *OrganizationAPIService) UpdateBulkAssetTags(ctx context.Context) ApiUpdateBulkAssetTagsRequest { + return ApiUpdateBulkAssetTagsRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Agent -*/ -func (r apiUpdateAgentSiteRequest) Execute() (Agent, *_nethttp.Response, error) { +// Execute executes the request +// @return map[string]interface{} +func (a *OrganizationAPIService) UpdateBulkAssetTagsExecute(r ApiUpdateBulkAssetTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Agent + formFiles []formFile + localVarReturnValue map[string]interface{} ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateAgentSite") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateBulkAssetTags") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/agents/{agent_id}" - localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", _neturl.QueryEscape(parameterToString(r.agentId, "")), -1) + localVarPath := localBasePath + "/org/assets/bulk/tags" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.agentSiteID == nil { - return localVarReturnValue, nil, reportError("agentSiteID is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assetTagsWithSearch == nil { + return localVarReturnValue, nil, reportError("assetTagsWithSearch is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -2702,34 +7272,56 @@ func (r apiUpdateAgentSiteRequest) Execute() (Agent, *_nethttp.Response, error) localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.agentSiteID - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.assetTagsWithSearch + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -2739,62 +7331,75 @@ func (r apiUpdateAgentSiteRequest) Execute() (Agent, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAssetCommentsRequest struct { - ctx _context.Context - apiService *OrganizationApiService - assetId string - assetComments *AssetComments +type ApiUpdateExplorerSettingsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + explorerId string + agentPatchedSettings *AgentPatchedSettings + oid *string } -func (r apiUpdateAssetCommentsRequest) AssetComments(assetComments AssetComments) apiUpdateAssetCommentsRequest { - r.assetComments = &assetComments +// The updated settings to apply to the Explorer +func (r ApiUpdateExplorerSettingsRequest) AgentPatchedSettings(agentPatchedSettings AgentPatchedSettings) ApiUpdateExplorerSettingsRequest { + r.agentPatchedSettings = &agentPatchedSettings + return r +} + +// The current Organization +func (r ApiUpdateExplorerSettingsRequest) Oid(oid string) ApiUpdateExplorerSettingsRequest { + r.oid = &oid return r } +func (r ApiUpdateExplorerSettingsRequest) Execute() (*Agent, *http.Response, error) { + return r.ApiService.UpdateExplorerSettingsExecute(r) +} + /* -UpdateAssetComments Update asset comments. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param assetId UUID of the asset to update -@return apiUpdateAssetCommentsRequest +UpdateExplorerSettings Update the settings associated with the Explorer + +Update the settings associated with the Explorer. This is the same call as legacy path /org/agents/{agent_id} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param explorerId UUID of the explorer to update + @return ApiUpdateExplorerSettingsRequest */ -func (a *OrganizationApiService) UpdateAssetComments(ctx _context.Context, assetId string) apiUpdateAssetCommentsRequest { - return apiUpdateAssetCommentsRequest{ - apiService: a, - ctx: ctx, - assetId: assetId, +func (a *OrganizationAPIService) UpdateExplorerSettings(ctx context.Context, explorerId string) ApiUpdateExplorerSettingsRequest { + return ApiUpdateExplorerSettingsRequest{ + ApiService: a, + ctx: ctx, + explorerId: explorerId, } } -/* -Execute executes the request - @return Asset -*/ -func (r apiUpdateAssetCommentsRequest) Execute() (Asset, *_nethttp.Response, error) { +// Execute executes the request +// @return Agent +func (a *OrganizationAPIService) UpdateExplorerSettingsExecute(r ApiUpdateExplorerSettingsRequest) (*Agent, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Asset + formFiles []formFile + localVarReturnValue *Agent ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateAssetComments") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateExplorerSettings") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/assets/{asset_id}/comments" - localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", _neturl.QueryEscape(parameterToString(r.assetId, "")), -1) + localVarPath := localBasePath + "/org/explorers/{explorer_id}" + localVarPath = strings.Replace(localVarPath, "{"+"explorer_id"+"}", url.PathEscape(parameterValueToString(r.explorerId, "explorerId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.assetComments == nil { - return localVarReturnValue, nil, reportError("assetComments is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentPatchedSettings == nil { + return localVarReturnValue, nil, reportError("agentPatchedSettings is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -2813,34 +7418,56 @@ func (r apiUpdateAssetCommentsRequest) Execute() (Asset, *_nethttp.Response, err localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.assetComments - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.agentPatchedSettings + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -2850,62 +7477,69 @@ func (r apiUpdateAssetCommentsRequest) Execute() (Asset, *_nethttp.Response, err return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAssetTagsRequest struct { - ctx _context.Context - apiService *OrganizationApiService - assetId string - assetTags *AssetTags +type ApiUpdateOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgOptions *OrgOptions + oid *string } -func (r apiUpdateAssetTagsRequest) AssetTags(assetTags AssetTags) apiUpdateAssetTagsRequest { - r.assetTags = &assetTags +// organization options +func (r ApiUpdateOrganizationRequest) OrgOptions(orgOptions OrgOptions) ApiUpdateOrganizationRequest { + r.orgOptions = &orgOptions + return r +} + +// The current Organization +func (r ApiUpdateOrganizationRequest) Oid(oid string) ApiUpdateOrganizationRequest { + r.oid = &oid return r } +func (r ApiUpdateOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.UpdateOrganizationExecute(r) +} + /* -UpdateAssetTags Update asset tags. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param assetId UUID of the agent to update -@return apiUpdateAssetTagsRequest +UpdateOrganization Update organization details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateOrganizationRequest */ -func (a *OrganizationApiService) UpdateAssetTags(ctx _context.Context, assetId string) apiUpdateAssetTagsRequest { - return apiUpdateAssetTagsRequest{ - apiService: a, - ctx: ctx, - assetId: assetId, +func (a *OrganizationAPIService) UpdateOrganization(ctx context.Context) ApiUpdateOrganizationRequest { + return ApiUpdateOrganizationRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return Asset -*/ -func (r apiUpdateAssetTagsRequest) Execute() (Asset, *_nethttp.Response, error) { +// Execute executes the request +// @return Organization +func (a *OrganizationAPIService) UpdateOrganizationExecute(r ApiUpdateOrganizationRequest) (*Organization, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Asset + formFiles []formFile + localVarReturnValue *Organization ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateAssetTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateOrganization") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/assets/{asset_id}/tags" - localVarPath = strings.Replace(localVarPath, "{"+"asset_id"+"}", _neturl.QueryEscape(parameterToString(r.assetId, "")), -1) + localVarPath := localBasePath + "/org" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.assetTags == nil { - return localVarReturnValue, nil, reportError("assetTags is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.orgOptions == nil { + return localVarReturnValue, nil, reportError("orgOptions is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -2924,34 +7558,45 @@ func (r apiUpdateAssetTagsRequest) Execute() (Asset, *_nethttp.Response, error) localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.assetTags - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.orgOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -2961,58 +7606,73 @@ func (r apiUpdateAssetTagsRequest) Execute() (Asset, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateOrganizationRequest struct { - ctx _context.Context - apiService *OrganizationApiService - orgOptions *OrgOptions +type ApiUpdateSiteRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + siteId string + siteOptions *SiteOptions + oid *string } -func (r apiUpdateOrganizationRequest) OrgOptions(orgOptions OrgOptions) apiUpdateOrganizationRequest { - r.orgOptions = &orgOptions +// site object +func (r ApiUpdateSiteRequest) SiteOptions(siteOptions SiteOptions) ApiUpdateSiteRequest { + r.siteOptions = &siteOptions + return r +} + +// The current Organization +func (r ApiUpdateSiteRequest) Oid(oid string) ApiUpdateSiteRequest { + r.oid = &oid return r } +func (r ApiUpdateSiteRequest) Execute() (*Site, *http.Response, error) { + return r.ApiService.UpdateSiteExecute(r) +} + /* -UpdateOrganization Update organization details. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiUpdateOrganizationRequest +UpdateSite Update a site definition + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param siteId UUID or name of the site to update + @return ApiUpdateSiteRequest */ -func (a *OrganizationApiService) UpdateOrganization(ctx _context.Context) apiUpdateOrganizationRequest { - return apiUpdateOrganizationRequest{ - apiService: a, - ctx: ctx, +func (a *OrganizationAPIService) UpdateSite(ctx context.Context, siteId string) ApiUpdateSiteRequest { + return ApiUpdateSiteRequest{ + ApiService: a, + ctx: ctx, + siteId: siteId, } } -/* -Execute executes the request - @return Organization -*/ -func (r apiUpdateOrganizationRequest) Execute() (Organization, *_nethttp.Response, error) { +// Execute executes the request +// @return Site +func (a *OrganizationAPIService) UpdateSiteExecute(r ApiUpdateSiteRequest) (*Site, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Organization + formFiles []formFile + localVarReturnValue *Site ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateOrganization") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateSite") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org" + localVarPath := localBasePath + "/org/sites/{site_id}" + localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", url.PathEscape(parameterValueToString(r.siteId, "siteId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.orgOptions == nil { - return localVarReturnValue, nil, reportError("orgOptions is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.siteOptions == nil { + return localVarReturnValue, nil, reportError("siteOptions is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -3031,34 +7691,56 @@ func (r apiUpdateOrganizationRequest) Execute() (Organization, *_nethttp.Respons localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.orgOptions - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.siteOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -3068,62 +7750,73 @@ func (r apiUpdateOrganizationRequest) Execute() (Organization, *_nethttp.Respons return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateSiteRequest struct { - ctx _context.Context - apiService *OrganizationApiService - siteId string - siteOptions *SiteOptions +type ApiUpdateTaskRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + taskId string + taskOptions *TaskOptions + oid *string } -func (r apiUpdateSiteRequest) SiteOptions(siteOptions SiteOptions) apiUpdateSiteRequest { - r.siteOptions = &siteOptions +// task object +func (r ApiUpdateTaskRequest) TaskOptions(taskOptions TaskOptions) ApiUpdateTaskRequest { + r.taskOptions = &taskOptions return r } +// The current Organization +func (r ApiUpdateTaskRequest) Oid(oid string) ApiUpdateTaskRequest { + r.oid = &oid + return r +} + +func (r ApiUpdateTaskRequest) Execute() (*Task, *http.Response, error) { + return r.ApiService.UpdateTaskExecute(r) +} + /* -UpdateSite Update a site definition. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param siteId UUID or name of the site to update -@return apiUpdateSiteRequest +UpdateTask Update task parameters + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskId UUID of the task to update + @return ApiUpdateTaskRequest */ -func (a *OrganizationApiService) UpdateSite(ctx _context.Context, siteId string) apiUpdateSiteRequest { - return apiUpdateSiteRequest{ - apiService: a, - ctx: ctx, - siteId: siteId, +func (a *OrganizationAPIService) UpdateTask(ctx context.Context, taskId string) ApiUpdateTaskRequest { + return ApiUpdateTaskRequest{ + ApiService: a, + ctx: ctx, + taskId: taskId, } } -/* -Execute executes the request - @return Site -*/ -func (r apiUpdateSiteRequest) Execute() (Site, *_nethttp.Response, error) { +// Execute executes the request +// @return Task +func (a *OrganizationAPIService) UpdateTaskExecute(r ApiUpdateTaskRequest) (*Task, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Site + formFiles []formFile + localVarReturnValue *Task ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateSite") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateTask") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/sites/{site_id}" - localVarPath = strings.Replace(localVarPath, "{"+"site_id"+"}", _neturl.QueryEscape(parameterToString(r.siteId, "")), -1) + localVarPath := localBasePath + "/org/tasks/{task_id}" + localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.siteOptions == nil { - return localVarReturnValue, nil, reportError("siteOptions is required and must be specified") + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.taskOptions == nil { + return localVarReturnValue, nil, reportError("taskOptions is required and must be specified") } + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -3142,34 +7835,56 @@ func (r apiUpdateSiteRequest) Execute() (Site, *_nethttp.Response, error) { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.siteOptions - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.taskOptions + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -3179,64 +7894,63 @@ func (r apiUpdateSiteRequest) Execute() (Site, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateTaskRequest struct { - ctx _context.Context - apiService *OrganizationApiService - taskId string - task *Task +type ApiUpgradeAgentRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + agentId string + oid *string } -func (r apiUpdateTaskRequest) Task(task Task) apiUpdateTaskRequest { - r.task = &task +// The current Organization +func (r ApiUpgradeAgentRequest) Oid(oid string) ApiUpgradeAgentRequest { + r.oid = &oid return r } +func (r ApiUpgradeAgentRequest) Execute() (*http.Response, error) { + return r.ApiService.UpgradeAgentExecute(r) +} + /* -UpdateTask Update task parameters. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param taskId UUID of the task to update -@return apiUpdateTaskRequest +UpgradeAgent Force an agent to update and restart. Legacy path for /org/explorers/{explorer_id}/update + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId UUID of the agent to update + @return ApiUpgradeAgentRequest */ -func (a *OrganizationApiService) UpdateTask(ctx _context.Context, taskId string) apiUpdateTaskRequest { - return apiUpdateTaskRequest{ - apiService: a, - ctx: ctx, - taskId: taskId, +func (a *OrganizationAPIService) UpgradeAgent(ctx context.Context, agentId string) ApiUpgradeAgentRequest { + return ApiUpgradeAgentRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, } } -/* -Execute executes the request - @return Task -*/ -func (r apiUpdateTaskRequest) Execute() (Task, *_nethttp.Response, error) { +// Execute executes the request +func (a *OrganizationAPIService) UpgradeAgentExecute(r ApiUpgradeAgentRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Task + formFiles []formFile ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpdateTask") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpgradeAgent") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/tasks/{task_id}" - localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.QueryEscape(parameterToString(r.taskId, "")), -1) + localVarPath := localBasePath + "/org/agents/{agent_id}/update" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} - if r.task == nil { - return localVarReturnValue, nil, reportError("task is required and must be specified") + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -3252,89 +7966,112 @@ func (r apiUpdateTaskRequest) Execute() (Task, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.task - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, nil, err + return nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiUpgradeAgentRequest struct { - ctx _context.Context - apiService *OrganizationApiService - agentId string +type ApiUpgradeExplorerRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + explorerId string + oid *string } -/* -UpgradeAgent Force an agent to update and restart. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param agentId UUID of the agent to update -@return apiUpgradeAgentRequest -*/ -func (a *OrganizationApiService) UpgradeAgent(ctx _context.Context, agentId string) apiUpgradeAgentRequest { - return apiUpgradeAgentRequest{ - apiService: a, - ctx: ctx, - agentId: agentId, - } +// The current Organization +func (r ApiUpgradeExplorerRequest) Oid(oid string) ApiUpgradeExplorerRequest { + r.oid = &oid + return r +} + +func (r ApiUpgradeExplorerRequest) Execute() (*http.Response, error) { + return r.ApiService.UpgradeExplorerExecute(r) } /* -Execute executes the request +UpgradeExplorer Force an explorer to update and restart + +Force an explorer to update and restart. This is the same call as legacy path /org/agents/{agent_id}/update + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param explorerId UUID of the explorer to update + @return ApiUpgradeExplorerRequest */ -func (r apiUpgradeAgentRequest) Execute() (*_nethttp.Response, error) { +func (a *OrganizationAPIService) UpgradeExplorer(ctx context.Context, explorerId string) ApiUpgradeExplorerRequest { + return ApiUpgradeExplorerRequest{ + ApiService: a, + ctx: ctx, + explorerId: explorerId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) UpgradeExplorerExecute(r ApiUpgradeExplorerRequest) (*http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "OrganizationApiService.UpgradeAgent") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpgradeExplorer") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/org/agents/{agent_id}/update" - localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", _neturl.QueryEscape(parameterToString(r.agentId, "")), -1) + localVarPath := localBasePath + "/org/explorers/{explorer_id}/update" + localVarPath = strings.Replace(localVarPath, "{"+"explorer_id"+"}", url.PathEscape(parameterValueToString(r.explorerId, "explorerId")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3345,34 +8082,56 @@ func (r apiUpgradeAgentRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } return localVarHTTPResponse, newErr } diff --git a/go/api_public.go b/go/api_public.go index f8cbb20..14d2626 100644 --- a/go/api_public.go +++ b/go/api_public.go @@ -1,71 +1,167 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( - _context "context" - _ioutil "io/ioutil" - _nethttp "net/http" - _neturl "net/url" + "bytes" + "context" + "io" + "net/http" + "net/url" ) -// Linger please -var ( - _ _context.Context -) -// PublicApiService PublicApi service -type PublicApiService service +// PublicAPIService PublicAPI service +type PublicAPIService service -type apiGetLatestAgentVersionRequest struct { - ctx _context.Context - apiService *PublicApiService +type ApiGetHealthCheckRequest struct { + ctx context.Context + ApiService *PublicAPIService +} + +func (r ApiGetHealthCheckRequest) Execute() (*HealthCheckResponse, *http.Response, error) { + return r.ApiService.GetHealthCheckExecute(r) } /* -GetLatestAgentVersion Returns latest agent version. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetLatestAgentVersionRequest +GetHealthCheck Returns a health check status (cloud and self-hosted) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHealthCheckRequest */ -func (a *PublicApiService) GetLatestAgentVersion(ctx _context.Context) apiGetLatestAgentVersionRequest { - return apiGetLatestAgentVersionRequest{ - apiService: a, - ctx: ctx, +func (a *PublicAPIService) GetHealthCheck(ctx context.Context) ApiGetHealthCheckRequest { + return ApiGetHealthCheckRequest{ + ApiService: a, + ctx: ctx, } } +// Execute executes the request +// @return HealthCheckResponse +func (a *PublicAPIService) GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*HealthCheckResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthCheckResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetHealthCheck") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/health" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetLatestAgentVersionRequest struct { + ctx context.Context + ApiService *PublicAPIService +} + +func (r ApiGetLatestAgentVersionRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.GetLatestAgentVersionExecute(r) +} + /* -Execute executes the request - @return ComponentVersion +GetLatestAgentVersion Returns latest agent version + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetLatestAgentVersionRequest */ -func (r apiGetLatestAgentVersionRequest) Execute() (ComponentVersion, *_nethttp.Response, error) { +func (a *PublicAPIService) GetLatestAgentVersion(ctx context.Context) ApiGetLatestAgentVersionRequest { + return ApiGetLatestAgentVersionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ComponentVersion +func (a *PublicAPIService) GetLatestAgentVersionExecute(r ApiGetLatestAgentVersionRequest) (*ComponentVersion, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ComponentVersion + formFiles []formFile + localVarReturnValue *ComponentVersion ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.GetLatestAgentVersion") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetLatestAgentVersion") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/releases/agent/version" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -84,33 +180,34 @@ func (r apiGetLatestAgentVersionRequest) Execute() (ComponentVersion, *_nethttp. if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -120,47 +217,48 @@ func (r apiGetLatestAgentVersionRequest) Execute() (ComponentVersion, *_nethttp. return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLatestPlatformVersionRequest struct { - ctx _context.Context - apiService *PublicApiService +type ApiGetLatestPlatformVersionRequest struct { + ctx context.Context + ApiService *PublicAPIService +} + +func (r ApiGetLatestPlatformVersionRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.GetLatestPlatformVersionExecute(r) } /* -GetLatestPlatformVersion Returns latest platform version. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetLatestPlatformVersionRequest +GetLatestPlatformVersion Returns latest platform version + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetLatestPlatformVersionRequest */ -func (a *PublicApiService) GetLatestPlatformVersion(ctx _context.Context) apiGetLatestPlatformVersionRequest { - return apiGetLatestPlatformVersionRequest{ - apiService: a, - ctx: ctx, +func (a *PublicAPIService) GetLatestPlatformVersion(ctx context.Context) ApiGetLatestPlatformVersionRequest { + return ApiGetLatestPlatformVersionRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return ComponentVersion -*/ -func (r apiGetLatestPlatformVersionRequest) Execute() (ComponentVersion, *_nethttp.Response, error) { +// Execute executes the request +// @return ComponentVersion +func (a *PublicAPIService) GetLatestPlatformVersionExecute(r ApiGetLatestPlatformVersionRequest) (*ComponentVersion, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ComponentVersion + formFiles []formFile + localVarReturnValue *ComponentVersion ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.GetLatestPlatformVersion") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetLatestPlatformVersion") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/releases/platform/version" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -179,33 +277,34 @@ func (r apiGetLatestPlatformVersionRequest) Execute() (ComponentVersion, *_netht if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } @@ -215,47 +314,48 @@ func (r apiGetLatestPlatformVersionRequest) Execute() (ComponentVersion, *_netht return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLatestScannerVersionRequest struct { - ctx _context.Context - apiService *PublicApiService +type ApiGetLatestScannerVersionRequest struct { + ctx context.Context + ApiService *PublicAPIService +} + +func (r ApiGetLatestScannerVersionRequest) Execute() (*ComponentVersion, *http.Response, error) { + return r.ApiService.GetLatestScannerVersionExecute(r) } /* -GetLatestScannerVersion Returns latest scanner version. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetLatestScannerVersionRequest +GetLatestScannerVersion Returns latest scanner version + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetLatestScannerVersionRequest */ -func (a *PublicApiService) GetLatestScannerVersion(ctx _context.Context) apiGetLatestScannerVersionRequest { - return apiGetLatestScannerVersionRequest{ - apiService: a, - ctx: ctx, +func (a *PublicAPIService) GetLatestScannerVersion(ctx context.Context) ApiGetLatestScannerVersionRequest { + return ApiGetLatestScannerVersionRequest{ + ApiService: a, + ctx: ctx, } } -/* -Execute executes the request - @return ComponentVersion -*/ -func (r apiGetLatestScannerVersionRequest) Execute() (ComponentVersion, *_nethttp.Response, error) { +// Execute executes the request +// @return ComponentVersion +func (a *PublicAPIService) GetLatestScannerVersionExecute(r ApiGetLatestScannerVersionRequest) (*ComponentVersion, *http.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ComponentVersion + formFiles []formFile + localVarReturnValue *ComponentVersion ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.GetLatestScannerVersion") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetLatestScannerVersion") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/releases/scanner/version" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -274,33 +374,34 @@ func (r apiGetLatestScannerVersionRequest) Execute() (ComponentVersion, *_nethtt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := r.apiService.client.callAPI(req) + localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: localVarHTTPResponse.Status, } return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { - newErr := GenericOpenAPIError{ + newErr := &GenericOpenAPIError{ body: localVarBody, error: err.Error(), } diff --git a/go/api_service_now.go b/go/api_service_now.go new file mode 100644 index 0000000..a02a236 --- /dev/null +++ b/go/api_service_now.go @@ -0,0 +1,525 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + + +// ServiceNowAPIService ServiceNowAPI service +type ServiceNowAPIService service + +type ApiSnowExportAssetsCSVRequest struct { + ctx context.Context + ApiService *ServiceNowAPIService + oid *string +} + +// The current Organization +func (r ApiSnowExportAssetsCSVRequest) Oid(oid string) ApiSnowExportAssetsCSVRequest { + r.oid = &oid + return r +} + +func (r ApiSnowExportAssetsCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.SnowExportAssetsCSVExecute(r) +} + +/* +SnowExportAssetsCSV Export an asset inventory as CSV for ServiceNow integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSnowExportAssetsCSVRequest +*/ +func (a *ServiceNowAPIService) SnowExportAssetsCSV(ctx context.Context) ApiSnowExportAssetsCSVRequest { + return ApiSnowExportAssetsCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ServiceNowAPIService) SnowExportAssetsCSVExecute(r ApiSnowExportAssetsCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServiceNowAPIService.SnowExportAssetsCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.servicenow.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSnowExportAssetsJSONRequest struct { + ctx context.Context + ApiService *ServiceNowAPIService + oid *string +} + +// The current Organization +func (r ApiSnowExportAssetsJSONRequest) Oid(oid string) ApiSnowExportAssetsJSONRequest { + r.oid = &oid + return r +} + +func (r ApiSnowExportAssetsJSONRequest) Execute() ([]AssetServiceNow, *http.Response, error) { + return r.ApiService.SnowExportAssetsJSONExecute(r) +} + +/* +SnowExportAssetsJSON Exports the asset inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSnowExportAssetsJSONRequest +*/ +func (a *ServiceNowAPIService) SnowExportAssetsJSON(ctx context.Context) ApiSnowExportAssetsJSONRequest { + return ApiSnowExportAssetsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetServiceNow +func (a *ServiceNowAPIService) SnowExportAssetsJSONExecute(r ApiSnowExportAssetsJSONRequest) ([]AssetServiceNow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetServiceNow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServiceNowAPIService.SnowExportAssetsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.servicenow.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSnowExportServicesCSVRequest struct { + ctx context.Context + ApiService *ServiceNowAPIService + oid *string +} + +// The current Organization +func (r ApiSnowExportServicesCSVRequest) Oid(oid string) ApiSnowExportServicesCSVRequest { + r.oid = &oid + return r +} + +func (r ApiSnowExportServicesCSVRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.SnowExportServicesCSVExecute(r) +} + +/* +SnowExportServicesCSV Export a service inventory as CSV for ServiceNow integration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSnowExportServicesCSVRequest +*/ +func (a *ServiceNowAPIService) SnowExportServicesCSV(ctx context.Context) ApiSnowExportServicesCSVRequest { + return ApiSnowExportServicesCSVRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *ServiceNowAPIService) SnowExportServicesCSVExecute(r ApiSnowExportServicesCSVRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServiceNowAPIService.SnowExportServicesCSV") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/services.servicenow.csv" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/csv", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSnowServiceGraphExportAssetsJSONRequest struct { + ctx context.Context + ApiService *ServiceNowAPIService + oid *string + search *string +} + +// The current Organization +func (r ApiSnowServiceGraphExportAssetsJSONRequest) Oid(oid string) ApiSnowServiceGraphExportAssetsJSONRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiSnowServiceGraphExportAssetsJSONRequest) Search(search string) ApiSnowServiceGraphExportAssetsJSONRequest { + r.search = &search + return r +} + +func (r ApiSnowServiceGraphExportAssetsJSONRequest) Execute() ([]AssetServiceNow, *http.Response, error) { + return r.ApiService.SnowServiceGraphExportAssetsJSONExecute(r) +} + +/* +SnowServiceGraphExportAssetsJSON Exports the asset inventory as JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSnowServiceGraphExportAssetsJSONRequest +*/ +func (a *ServiceNowAPIService) SnowServiceGraphExportAssetsJSON(ctx context.Context) ApiSnowServiceGraphExportAssetsJSONRequest { + return ApiSnowServiceGraphExportAssetsJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AssetServiceNow +func (a *ServiceNowAPIService) SnowServiceGraphExportAssetsJSONExecute(r ApiSnowServiceGraphExportAssetsJSONRequest) ([]AssetServiceNow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AssetServiceNow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServiceNowAPIService.SnowServiceGraphExportAssetsJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets.servicegraph.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/api_splunk.go b/go/api_splunk.go new file mode 100644 index 0000000..4990c09 --- /dev/null +++ b/go/api_splunk.go @@ -0,0 +1,318 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// SplunkAPIService SplunkAPI service +type SplunkAPIService service + +type ApiSplunkAssetSyncCreatedJSONRequest struct { + ctx context.Context + ApiService *SplunkAPIService + oid *string + search *string + fields *string + since *int64 +} + +// The current Organization +func (r ApiSplunkAssetSyncCreatedJSONRequest) Oid(oid string) ApiSplunkAssetSyncCreatedJSONRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiSplunkAssetSyncCreatedJSONRequest) Search(search string) ApiSplunkAssetSyncCreatedJSONRequest { + r.search = &search + return r +} + +// an optional list of fields to export, comma-separated +func (r ApiSplunkAssetSyncCreatedJSONRequest) Fields(fields string) ApiSplunkAssetSyncCreatedJSONRequest { + r.fields = &fields + return r +} + +// an optional unix timestamp to use as a checkpoint +func (r ApiSplunkAssetSyncCreatedJSONRequest) Since(since int64) ApiSplunkAssetSyncCreatedJSONRequest { + r.since = &since + return r +} + +func (r ApiSplunkAssetSyncCreatedJSONRequest) Execute() (*AssetsWithCheckpoint, *http.Response, error) { + return r.ApiService.SplunkAssetSyncCreatedJSONExecute(r) +} + +/* +SplunkAssetSyncCreatedJSON Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. Requires the Splunk entitlement. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSplunkAssetSyncCreatedJSONRequest +*/ +func (a *SplunkAPIService) SplunkAssetSyncCreatedJSON(ctx context.Context) ApiSplunkAssetSyncCreatedJSONRequest { + return ApiSplunkAssetSyncCreatedJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AssetsWithCheckpoint +func (a *SplunkAPIService) SplunkAssetSyncCreatedJSONExecute(r ApiSplunkAssetSyncCreatedJSONRequest) (*AssetsWithCheckpoint, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AssetsWithCheckpoint + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SplunkAPIService.SplunkAssetSyncCreatedJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets/sync/created/assets.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSplunkAssetSyncUpdatedJSONRequest struct { + ctx context.Context + ApiService *SplunkAPIService + oid *string + search *string + fields *string + since *int64 +} + +// The current Organization +func (r ApiSplunkAssetSyncUpdatedJSONRequest) Oid(oid string) ApiSplunkAssetSyncUpdatedJSONRequest { + r.oid = &oid + return r +} + +// an optional search string for filtering results +func (r ApiSplunkAssetSyncUpdatedJSONRequest) Search(search string) ApiSplunkAssetSyncUpdatedJSONRequest { + r.search = &search + return r +} + +// an optional list of fields to export, comma-separated +func (r ApiSplunkAssetSyncUpdatedJSONRequest) Fields(fields string) ApiSplunkAssetSyncUpdatedJSONRequest { + r.fields = &fields + return r +} + +// an optional unix timestamp to use as a checkpoint +func (r ApiSplunkAssetSyncUpdatedJSONRequest) Since(since int64) ApiSplunkAssetSyncUpdatedJSONRequest { + r.since = &since + return r +} + +func (r ApiSplunkAssetSyncUpdatedJSONRequest) Execute() (*AssetsWithCheckpoint, *http.Response, error) { + return r.ApiService.SplunkAssetSyncUpdatedJSONExecute(r) +} + +/* +SplunkAssetSyncUpdatedJSON Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. Requires the Splunk entitlement. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSplunkAssetSyncUpdatedJSONRequest +*/ +func (a *SplunkAPIService) SplunkAssetSyncUpdatedJSON(ctx context.Context) ApiSplunkAssetSyncUpdatedJSONRequest { + return ApiSplunkAssetSyncUpdatedJSONRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AssetsWithCheckpoint +func (a *SplunkAPIService) SplunkAssetSyncUpdatedJSONExecute(r ApiSplunkAssetSyncUpdatedJSONRequest) (*AssetsWithCheckpoint, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AssetsWithCheckpoint + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SplunkAPIService.SplunkAssetSyncUpdatedJSON") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/export/org/assets/sync/updated/assets.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.oid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "_oid", r.oid, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Problem + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/client.go b/go/client.go index 4574d4e..093e661 100644 --- a/go/client.go +++ b/go/client.go @@ -1,12 +1,13 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi @@ -36,11 +37,13 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the runZero API API v1.0.4 +// APIClient manages communication with the runZero API API v4.0.250826.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -48,11 +51,21 @@ type APIClient struct { // API Services - ExportApi *ExportApiService + AccountAPI *AccountAPIService + + CiscoSNTCAPI *CiscoSNTCAPIService + + ExportAPI *ExportAPIService - OrganizationApi *OrganizationApiService + ImportAPI *ImportAPIService - PublicApi *PublicApiService + OrganizationAPI *OrganizationAPIService + + PublicAPI *PublicAPIService + + ServiceNowAPI *ServiceNowAPIService + + SplunkAPI *SplunkAPIService } type service struct { @@ -71,9 +84,14 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.ExportApi = (*ExportApiService)(&c.common) - c.OrganizationApi = (*OrganizationApiService)(&c.common) - c.PublicApi = (*PublicApiService)(&c.common) + c.AccountAPI = (*AccountAPIService)(&c.common) + c.CiscoSNTCAPI = (*CiscoSNTCAPIService)(&c.common) + c.ExportAPI = (*ExportAPIService)(&c.common) + c.ImportAPI = (*ImportAPIService)(&c.common) + c.OrganizationAPI = (*OrganizationAPIService)(&c.common) + c.PublicAPI = (*PublicAPIService)(&c.common) + c.ServiceNowAPI = (*ServiceNowAPIService)(&c.common) + c.SplunkAPI = (*SplunkAPIService)(&c.common) return c } @@ -106,10 +124,10 @@ func selectHeaderAccept(accepts []string) string { return strings.Join(accepts, ",") } -// contains is a case insenstive match, finding needle in a haystack +// contains is a case insensitive match, finding needle in a haystack func contains(haystack []string, needle string) bool { for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { + if strings.EqualFold(a, needle) { return true } } @@ -125,33 +143,119 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { // Check the type is as expected. if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) } return nil } -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," + return fmt.Sprintf("%v", obj) } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(fileBytes) > 0 && fileName != "") { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -241,16 +350,17 @@ func (c *APIClient) prepareRequest( } } } - if len(fileBytes) > 0 && fileName != "" { - w.Boundary() - //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(fileBytes) - if err != nil { - return nil, err + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } } } @@ -297,7 +407,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = query.Encode() + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -313,7 +427,7 @@ func (c *APIClient) prepareRequest( if len(headerParams) > 0 { headers := http.Header{} for h, v := range headerParams { - headers.Set(h, v) + headers[h] = []string{v} } localVarRequest.Header = headers } @@ -338,15 +452,11 @@ func (c *APIClient) prepareRequest( latestToken.SetAuthHeader(localVarRequest) } - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - // AccessToken Authentication if auth, ok := ctx.Value(ContextAccessToken).(string); ok { localVarRequest.Header.Add("Authorization", "Bearer "+auth) } + } for header, value := range c.cfg.DefaultHeader { @@ -363,14 +473,46 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } - if xmlCheck.MatchString(contentType) { + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err } return nil } - if jsonCheck.MatchString(contentType) { - if err = json.Unmarshal(b, v); err != nil { + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model return err } return nil @@ -380,7 +522,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err // Add a file to the multipart request func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) + file, err := os.Open(filepath.Clean(path)) if err != nil { return err } @@ -395,11 +537,6 @@ func addFile(w *multipart.Writer, fieldName, path string) error { return err } -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { @@ -408,16 +545,22 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { _, err = bodyBuf.WriteString(s) } else if s, ok := body.(*string); ok { _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { + } else if JsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } } if err != nil { @@ -425,7 +568,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) + err = fmt.Errorf("invalid body type %s\n", contentType) return nil, err } return bodyBuf, nil @@ -527,3 +670,23 @@ func (e GenericOpenAPIError) Body() []byte { func (e GenericOpenAPIError) Model() interface{} { return e.model } + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/go/configuration.go b/go/configuration.go index d78a3bd..c3ade52 100644 --- a/go/configuration.go +++ b/go/configuration.go @@ -1,12 +1,13 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi @@ -31,18 +32,9 @@ var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") @@ -77,9 +69,9 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - URL string + URL string Description string - Variables map[string]ServerVariable + Variables map[string]ServerVariable } // ServerConfigurations stores multiple ServerConfiguration items @@ -100,16 +92,17 @@ type Configuration struct { // NewConfiguration returns a new Configuration object func NewConfiguration() *Configuration { cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ { - URL: "https://console.runzero.com/api/v1.0", + URL: "https://console.runzero.com/api/v1.0", Description: "runZero Console", }, }, - OperationServers: map[string]ServerConfigurations{}, + OperationServers: map[string]ServerConfigurations{ + }, } return cfg } @@ -122,7 +115,7 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { // URL formats template on a index using given variables func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { if index < 0 || len(sc) <= index { - return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) } server := sc[index] url := server.URL @@ -137,7 +130,7 @@ func (sc ServerConfigurations) URL(index int, variables map[string]string) (stri } } if !found { - return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) } url = strings.Replace(url, "{"+name+"}", value, -1) } else { diff --git a/go/docs/APIClientCredentials.md b/go/docs/APIClientCredentials.md new file mode 100644 index 0000000..3b0500e --- /dev/null +++ b/go/docs/APIClientCredentials.md @@ -0,0 +1,82 @@ +# APIClientCredentials + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiClientId** | Pointer to **string** | | [optional] +**ApiClientSecret** | Pointer to **string** | | [optional] + +## Methods + +### NewAPIClientCredentials + +`func NewAPIClientCredentials() *APIClientCredentials` + +NewAPIClientCredentials instantiates a new APIClientCredentials object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAPIClientCredentialsWithDefaults + +`func NewAPIClientCredentialsWithDefaults() *APIClientCredentials` + +NewAPIClientCredentialsWithDefaults instantiates a new APIClientCredentials object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiClientId + +`func (o *APIClientCredentials) GetApiClientId() string` + +GetApiClientId returns the ApiClientId field if non-nil, zero value otherwise. + +### GetApiClientIdOk + +`func (o *APIClientCredentials) GetApiClientIdOk() (*string, bool)` + +GetApiClientIdOk returns a tuple with the ApiClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiClientId + +`func (o *APIClientCredentials) SetApiClientId(v string)` + +SetApiClientId sets ApiClientId field to given value. + +### HasApiClientId + +`func (o *APIClientCredentials) HasApiClientId() bool` + +HasApiClientId returns a boolean if a field has been set. + +### GetApiClientSecret + +`func (o *APIClientCredentials) GetApiClientSecret() string` + +GetApiClientSecret returns the ApiClientSecret field if non-nil, zero value otherwise. + +### GetApiClientSecretOk + +`func (o *APIClientCredentials) GetApiClientSecretOk() (*string, bool)` + +GetApiClientSecretOk returns a tuple with the ApiClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiClientSecret + +`func (o *APIClientCredentials) SetApiClientSecret(v string)` + +SetApiClientSecret sets ApiClientSecret field to given value. + +### HasApiClientSecret + +`func (o *APIClientCredentials) HasApiClientSecret() bool` + +HasApiClientSecret returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/APIKeyOptions.md b/go/docs/APIKeyOptions.md new file mode 100644 index 0000000..0dbc446 --- /dev/null +++ b/go/docs/APIKeyOptions.md @@ -0,0 +1,82 @@ +# APIKeyOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comment** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] + +## Methods + +### NewAPIKeyOptions + +`func NewAPIKeyOptions() *APIKeyOptions` + +NewAPIKeyOptions instantiates a new APIKeyOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAPIKeyOptionsWithDefaults + +`func NewAPIKeyOptionsWithDefaults() *APIKeyOptions` + +NewAPIKeyOptionsWithDefaults instantiates a new APIKeyOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetComment + +`func (o *APIKeyOptions) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *APIKeyOptions) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *APIKeyOptions) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *APIKeyOptions) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *APIKeyOptions) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *APIKeyOptions) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *APIKeyOptions) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *APIKeyOptions) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AWSCredentialFields.md b/go/docs/AWSCredentialFields.md new file mode 100644 index 0000000..aeed58e --- /dev/null +++ b/go/docs/AWSCredentialFields.md @@ -0,0 +1,150 @@ +# AWSCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**SecretAccessKey** | **string** | | +**Regions** | Pointer to **string** | | [optional] +**UseCrossAccountOrg** | Pointer to **string** | | [optional] +**Role** | Pointer to **string** | | [optional] + +## Methods + +### NewAWSCredentialFields + +`func NewAWSCredentialFields(accessKey string, secretAccessKey string, ) *AWSCredentialFields` + +NewAWSCredentialFields instantiates a new AWSCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWSCredentialFieldsWithDefaults + +`func NewAWSCredentialFieldsWithDefaults() *AWSCredentialFields` + +NewAWSCredentialFieldsWithDefaults instantiates a new AWSCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *AWSCredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *AWSCredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *AWSCredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretAccessKey + +`func (o *AWSCredentialFields) GetSecretAccessKey() string` + +GetSecretAccessKey returns the SecretAccessKey field if non-nil, zero value otherwise. + +### GetSecretAccessKeyOk + +`func (o *AWSCredentialFields) GetSecretAccessKeyOk() (*string, bool)` + +GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretAccessKey + +`func (o *AWSCredentialFields) SetSecretAccessKey(v string)` + +SetSecretAccessKey sets SecretAccessKey field to given value. + + +### GetRegions + +`func (o *AWSCredentialFields) GetRegions() string` + +GetRegions returns the Regions field if non-nil, zero value otherwise. + +### GetRegionsOk + +`func (o *AWSCredentialFields) GetRegionsOk() (*string, bool)` + +GetRegionsOk returns a tuple with the Regions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegions + +`func (o *AWSCredentialFields) SetRegions(v string)` + +SetRegions sets Regions field to given value. + +### HasRegions + +`func (o *AWSCredentialFields) HasRegions() bool` + +HasRegions returns a boolean if a field has been set. + +### GetUseCrossAccountOrg + +`func (o *AWSCredentialFields) GetUseCrossAccountOrg() string` + +GetUseCrossAccountOrg returns the UseCrossAccountOrg field if non-nil, zero value otherwise. + +### GetUseCrossAccountOrgOk + +`func (o *AWSCredentialFields) GetUseCrossAccountOrgOk() (*string, bool)` + +GetUseCrossAccountOrgOk returns a tuple with the UseCrossAccountOrg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseCrossAccountOrg + +`func (o *AWSCredentialFields) SetUseCrossAccountOrg(v string)` + +SetUseCrossAccountOrg sets UseCrossAccountOrg field to given value. + +### HasUseCrossAccountOrg + +`func (o *AWSCredentialFields) HasUseCrossAccountOrg() bool` + +HasUseCrossAccountOrg returns a boolean if a field has been set. + +### GetRole + +`func (o *AWSCredentialFields) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *AWSCredentialFields) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *AWSCredentialFields) SetRole(v string)` + +SetRole sets Role field to given value. + +### HasRole + +`func (o *AWSCredentialFields) HasRole() bool` + +HasRole returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AccessToken.md b/go/docs/AccessToken.md new file mode 100644 index 0000000..11ad00a --- /dev/null +++ b/go/docs/AccessToken.md @@ -0,0 +1,108 @@ +# AccessToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | Pointer to **string** | | [optional] +**TokenType** | Pointer to **string** | | [optional] +**ExpiresIn** | Pointer to **int32** | | [optional] + +## Methods + +### NewAccessToken + +`func NewAccessToken() *AccessToken` + +NewAccessToken instantiates a new AccessToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccessTokenWithDefaults + +`func NewAccessTokenWithDefaults() *AccessToken` + +NewAccessTokenWithDefaults instantiates a new AccessToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *AccessToken) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *AccessToken) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *AccessToken) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + +### HasAccessToken + +`func (o *AccessToken) HasAccessToken() bool` + +HasAccessToken returns a boolean if a field has been set. + +### GetTokenType + +`func (o *AccessToken) GetTokenType() string` + +GetTokenType returns the TokenType field if non-nil, zero value otherwise. + +### GetTokenTypeOk + +`func (o *AccessToken) GetTokenTypeOk() (*string, bool)` + +GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenType + +`func (o *AccessToken) SetTokenType(v string)` + +SetTokenType sets TokenType field to given value. + +### HasTokenType + +`func (o *AccessToken) HasTokenType() bool` + +HasTokenType returns a boolean if a field has been set. + +### GetExpiresIn + +`func (o *AccessToken) GetExpiresIn() int32` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *AccessToken) GetExpiresInOk() (*int32, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *AccessToken) SetExpiresIn(v int32)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *AccessToken) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AccountAPI.md b/go/docs/AccountAPI.md new file mode 100644 index 0000000..01e6575 --- /dev/null +++ b/go/docs/AccountAPI.md @@ -0,0 +1,4355 @@ +# \AccountAPI + +All URIs are relative to *https://console.runzero.com/api/v1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAccountAssetOwnershipTypes**](AccountAPI.md#CreateAccountAssetOwnershipTypes) | **Post** /account/assets/ownership-types | Create new asset ownership types +[**CreateAccountCredential**](AccountAPI.md#CreateAccountCredential) | **Put** /account/credentials | Create a new credential +[**CreateAccountCustomIntegration**](AccountAPI.md#CreateAccountCustomIntegration) | **Post** /account/custom-integrations | Create a new custom integration +[**CreateAccountCustomIntegrationAndID**](AccountAPI.md#CreateAccountCustomIntegrationAndID) | **Put** /account/custom-integrations/{customIntegrationId} | Replace custom integration at provided ID +[**CreateAccountGroup**](AccountAPI.md#CreateAccountGroup) | **Post** /account/groups | Create a new group +[**CreateAccountGroupMapping**](AccountAPI.md#CreateAccountGroupMapping) | **Post** /account/sso/groups | Create a new SSO group mapping +[**CreateAccountKey**](AccountAPI.md#CreateAccountKey) | **Put** /account/keys | Create a new key +[**CreateAccountOrganization**](AccountAPI.md#CreateAccountOrganization) | **Put** /account/orgs | Create a new organization +[**CreateAccountOrganizationExportToken**](AccountAPI.md#CreateAccountOrganizationExportToken) | **Post** /account/orgs/{org_id}/exportTokens | Create a new export token for an organization +[**CreateAccountScanTemplate**](AccountAPI.md#CreateAccountScanTemplate) | **Post** /account/tasks/templates | Create a new scan template +[**CreateAccountUser**](AccountAPI.md#CreateAccountUser) | **Put** /account/users | Create a new user account +[**CreateAccountUserInvite**](AccountAPI.md#CreateAccountUserInvite) | **Put** /account/users/invite | Create a new user account and send an email invite +[**DeleteAccountAssetOwnershipType**](AccountAPI.md#DeleteAccountAssetOwnershipType) | **Delete** /account/assets/ownership-types/{ownership_type_id} | Delete a single asset ownership type +[**DeleteAccountAssetOwnershipTypes**](AccountAPI.md#DeleteAccountAssetOwnershipTypes) | **Delete** /account/assets/ownership-types | Delete asset ownership types +[**DeleteAccountCustomIntegration**](AccountAPI.md#DeleteAccountCustomIntegration) | **Delete** /account/custom-integrations/{customIntegrationId} | Delete an custom integration +[**DeleteAccountOrganizationExportToken**](AccountAPI.md#DeleteAccountOrganizationExportToken) | **Delete** /account/orgs/{org_id}/exportTokens/{key_id} | Removes the export token from the specified organization +[**DeleteAccountOrganizationExportTokenDeprecated**](AccountAPI.md#DeleteAccountOrganizationExportTokenDeprecated) | **Delete** /account/orgs/{org_id}/exportToken | Removes the export token from the specified organization +[**ExportEventsJSON**](AccountAPI.md#ExportEventsJSON) | **Get** /account/events.json | System event log as JSON +[**ExportEventsJSONL**](AccountAPI.md#ExportEventsJSONL) | **Get** /account/events.jsonl | System event log as JSON line-delimited +[**GetAPIToken**](AccountAPI.md#GetAPIToken) | **Post** /account/api/token | Generate an access token using an API client +[**GetAccountAgents**](AccountAPI.md#GetAccountAgents) | **Get** /account/agents | Get all agents across all organizations +[**GetAccountAssetOwnershipTypes**](AccountAPI.md#GetAccountAssetOwnershipTypes) | **Get** /account/assets/ownership-types | Get all asset ownership types +[**GetAccountCredential**](AccountAPI.md#GetAccountCredential) | **Get** /account/credentials/{credential_id} | Get credential details +[**GetAccountCredentials**](AccountAPI.md#GetAccountCredentials) | **Get** /account/credentials | Get all account credentials +[**GetAccountCustomIntegration**](AccountAPI.md#GetAccountCustomIntegration) | **Get** /account/custom-integrations/{customIntegrationId} | Get single custom integration +[**GetAccountCustomIntegrations**](AccountAPI.md#GetAccountCustomIntegrations) | **Get** /account/custom-integrations | Get all custom integrations +[**GetAccountGroup**](AccountAPI.md#GetAccountGroup) | **Get** /account/groups/{group_id} | Get group details +[**GetAccountGroupMapping**](AccountAPI.md#GetAccountGroupMapping) | **Get** /account/sso/groups/{group_mapping_id} | Get SSO group mapping details +[**GetAccountGroupMappings**](AccountAPI.md#GetAccountGroupMappings) | **Get** /account/sso/groups | Get all SSO group mappings +[**GetAccountGroups**](AccountAPI.md#GetAccountGroups) | **Get** /account/groups | Get all groups +[**GetAccountKey**](AccountAPI.md#GetAccountKey) | **Get** /account/keys/{key_id} | Get key details +[**GetAccountKeys**](AccountAPI.md#GetAccountKeys) | **Get** /account/keys | Get all active API keys +[**GetAccountLicense**](AccountAPI.md#GetAccountLicense) | **Get** /account/license | Get license details +[**GetAccountOrganization**](AccountAPI.md#GetAccountOrganization) | **Get** /account/orgs/{org_id} | Get organization details +[**GetAccountOrganizationExportToken**](AccountAPI.md#GetAccountOrganizationExportToken) | **Get** /account/orgs/{org_id}/exportTokens/{key_id} | Get export token details +[**GetAccountOrganizationExportTokens**](AccountAPI.md#GetAccountOrganizationExportTokens) | **Get** /account/orgs/{org_id}/exportTokens | Get all active export tokens for an organization +[**GetAccountOrganizations**](AccountAPI.md#GetAccountOrganizations) | **Get** /account/orgs | Get all organization details +[**GetAccountScanTemplate**](AccountAPI.md#GetAccountScanTemplate) | **Get** /account/tasks/templates/{scan_template_id} | Get scan template details +[**GetAccountScanTemplates**](AccountAPI.md#GetAccountScanTemplates) | **Get** /account/tasks/templates | Get all scan templates across all organizations (up to 1000) +[**GetAccountSites**](AccountAPI.md#GetAccountSites) | **Get** /account/sites | Get all sites details across all organizations +[**GetAccountTasks**](AccountAPI.md#GetAccountTasks) | **Get** /account/tasks | Get all task details across all organizations (up to 1000) +[**GetAccountUser**](AccountAPI.md#GetAccountUser) | **Get** /account/users/{user_id} | Get user details +[**GetAccountUsers**](AccountAPI.md#GetAccountUsers) | **Get** /account/users | Get all users +[**RemoveAccountCredential**](AccountAPI.md#RemoveAccountCredential) | **Delete** /account/credentials/{credential_id} | Remove this credential +[**RemoveAccountGroup**](AccountAPI.md#RemoveAccountGroup) | **Delete** /account/groups/{group_id} | Remove this group +[**RemoveAccountGroupMapping**](AccountAPI.md#RemoveAccountGroupMapping) | **Delete** /account/sso/groups/{group_mapping_id} | Remove this SSO group mapping +[**RemoveAccountKey**](AccountAPI.md#RemoveAccountKey) | **Delete** /account/keys/{key_id} | Remove this key +[**RemoveAccountOrganization**](AccountAPI.md#RemoveAccountOrganization) | **Delete** /account/orgs/{org_id} | Remove this organization +[**RemoveAccountScanTemplate**](AccountAPI.md#RemoveAccountScanTemplate) | **Delete** /account/tasks/templates/{scan_template_id} | Remove scan template +[**RemoveAccountUser**](AccountAPI.md#RemoveAccountUser) | **Delete** /account/users/{user_id} | Remove this user +[**ResetAccountUserLockout**](AccountAPI.md#ResetAccountUserLockout) | **Patch** /account/users/{user_id}/resetLockout | Resets the user's lockout status +[**ResetAccountUserMFA**](AccountAPI.md#ResetAccountUserMFA) | **Patch** /account/users/{user_id}/resetMFA | Resets the user's MFA tokens +[**ResetAccountUserPassword**](AccountAPI.md#ResetAccountUserPassword) | **Patch** /account/users/{user_id}/resetPassword | Sends the user a password reset email +[**RotateAPIToken**](AccountAPI.md#RotateAPIToken) | **Post** /account/api/rotate | Rotate the API client secret +[**RotateAccountKey**](AccountAPI.md#RotateAccountKey) | **Patch** /account/keys/{key_id}/rotate | Rotates the key secret +[**RotateAccountOrganizationExportToken**](AccountAPI.md#RotateAccountOrganizationExportToken) | **Patch** /account/orgs/{org_id}/exportTokens/{key_id}/rotate | Rotates an organization export token and returns the updated token +[**RotateAccountOrganizationExportTokenDeprecated**](AccountAPI.md#RotateAccountOrganizationExportTokenDeprecated) | **Patch** /account/orgs/{org_id}/exportToken/rotate | Rotates an organization export token and returns the updated token +[**UpdateAccountAssetOwnershipType**](AccountAPI.md#UpdateAccountAssetOwnershipType) | **Patch** /account/assets/ownership-types/{ownership_type_id} | Update a single asset ownership type +[**UpdateAccountAssetOwnershipTypes**](AccountAPI.md#UpdateAccountAssetOwnershipTypes) | **Put** /account/assets/ownership-types | Update asset ownership types +[**UpdateAccountCustomIntegration**](AccountAPI.md#UpdateAccountCustomIntegration) | **Patch** /account/custom-integrations/{customIntegrationId} | Update a single custom integration +[**UpdateAccountGroup**](AccountAPI.md#UpdateAccountGroup) | **Put** /account/groups | Update an existing group +[**UpdateAccountGroupMapping**](AccountAPI.md#UpdateAccountGroupMapping) | **Put** /account/sso/groups | Update an existing SSO group mapping +[**UpdateAccountOrganization**](AccountAPI.md#UpdateAccountOrganization) | **Patch** /account/orgs/{org_id} | Update organization details +[**UpdateAccountScanTemplate**](AccountAPI.md#UpdateAccountScanTemplate) | **Put** /account/tasks/templates | Update scan template +[**UpdateAccountUser**](AccountAPI.md#UpdateAccountUser) | **Patch** /account/users/{user_id} | Update a user's details + + + +## CreateAccountAssetOwnershipTypes + +> []AssetOwnershipType CreateAccountAssetOwnershipTypes(ctx).AssetOwnershipTypePost(assetOwnershipTypePost).Execute() + +Create new asset ownership types + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + assetOwnershipTypePost := []openapiclient.AssetOwnershipTypePost{*openapiclient.NewAssetOwnershipTypePost("Asset Owner")} // []AssetOwnershipTypePost | array of asset ownership types + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountAssetOwnershipTypes(context.Background()).AssetOwnershipTypePost(assetOwnershipTypePost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountAssetOwnershipTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountAssetOwnershipTypes`: []AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountAssetOwnershipTypes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountAssetOwnershipTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assetOwnershipTypePost** | [**[]AssetOwnershipTypePost**](AssetOwnershipTypePost.md) | array of asset ownership types | + +### Return type + +[**[]AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountCredential + +> Credential CreateAccountCredential(ctx).CredentialOptions(credentialOptions).Execute() + +Create a new credential + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialOptions := *openapiclient.NewCredentialOptions() // CredentialOptions | credential parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountCredential(context.Background()).CredentialOptions(credentialOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountCredential`: Credential + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountCredential`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **credentialOptions** | [**CredentialOptions**](CredentialOptions.md) | credential parameters | + +### Return type + +[**Credential**](Credential.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountCustomIntegration + +> CustomIntegration CreateAccountCustomIntegration(ctx).CustomIntegrationCreate(customIntegrationCreate).Execute() + +Create a new custom integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationCreate := *openapiclient.NewCustomIntegrationCreate("my-custom-integration") // CustomIntegrationCreate | The description of the custom integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountCustomIntegration(context.Background()).CustomIntegrationCreate(customIntegrationCreate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountCustomIntegration`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountCustomIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customIntegrationCreate** | [**CustomIntegrationCreate**](CustomIntegrationCreate.md) | The description of the custom integration | + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountCustomIntegrationAndID + +> CustomIntegration CreateAccountCustomIntegrationAndID(ctx, customIntegrationId).CustomIntegrationCreate(customIntegrationCreate).Execute() + +Replace custom integration at provided ID + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + customIntegrationCreate := *openapiclient.NewCustomIntegrationCreate("my-custom-integration") // CustomIntegrationCreate | single custom integration type + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountCustomIntegrationAndID(context.Background(), customIntegrationId).CustomIntegrationCreate(customIntegrationCreate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountCustomIntegrationAndID``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountCustomIntegrationAndID`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountCustomIntegrationAndID`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountCustomIntegrationAndIDRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **customIntegrationCreate** | [**CustomIntegrationCreate**](CustomIntegrationCreate.md) | single custom integration type | + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountGroup + +> Group CreateAccountGroup(ctx).GroupPost(groupPost).Execute() + +Create a new group + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupPost := *openapiclient.NewGroupPost() // GroupPost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountGroup(context.Background()).GroupPost(groupPost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountGroup`: Group + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountGroup`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupPost** | [**GroupPost**](GroupPost.md) | | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountGroupMapping + +> GroupMapping CreateAccountGroupMapping(ctx).GroupMapping(groupMapping).Execute() + +Create a new SSO group mapping + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupMapping := *openapiclient.NewGroupMapping("f6cfb91a-52ea-4a86-bf9a-5a891a26f52b", "2b096711-4d28-4417-8635-64af4f62c1ae", "basic-attribute", "basic-attribute-value") // GroupMapping | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountGroupMapping(context.Background()).GroupMapping(groupMapping).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountGroupMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountGroupMapping`: GroupMapping + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountGroupMapping`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountGroupMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupMapping** | [**GroupMapping**](GroupMapping.md) | | + +### Return type + +[**GroupMapping**](GroupMapping.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountKey + +> OrganizationAPIKey CreateAccountKey(ctx).APIKeyOptions(aPIKeyOptions).Execute() + +Create a new key + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + aPIKeyOptions := *openapiclient.NewAPIKeyOptions() // APIKeyOptions | key parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountKey(context.Background()).APIKeyOptions(aPIKeyOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountKey`: OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountKey`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aPIKeyOptions** | [**APIKeyOptions**](APIKeyOptions.md) | key parameters | + +### Return type + +[**OrganizationAPIKey**](OrganizationAPIKey.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountOrganization + +> Organization CreateAccountOrganization(ctx).OrgOptions(orgOptions).Execute() + +Create a new organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgOptions := *openapiclient.NewOrgOptions() // OrgOptions | organization definition + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountOrganization(context.Background()).OrgOptions(orgOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountOrganization`: Organization + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountOrganization`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgOptions** | [**OrgOptions**](OrgOptions.md) | organization definition | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountOrganizationExportToken + +> ExportToken CreateAccountOrganizationExportToken(ctx, orgId).ExportTokenOptions(exportTokenOptions).Execute() + +Create a new export token for an organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to create an export token for + exportTokenOptions := *openapiclient.NewExportTokenOptions() // ExportTokenOptions | export token parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountOrganizationExportToken(context.Background(), orgId).ExportTokenOptions(exportTokenOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountOrganizationExportToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountOrganizationExportToken`: ExportToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountOrganizationExportToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to create an export token for | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountOrganizationExportTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **exportTokenOptions** | [**ExportTokenOptions**](ExportTokenOptions.md) | export token parameters | + +### Return type + +[**ExportToken**](ExportToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountScanTemplate + +> ScanTemplate CreateAccountScanTemplate(ctx).ScanTemplateOptions(scanTemplateOptions).Execute() + +Create a new scan template + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + scanTemplateOptions := *openapiclient.NewScanTemplateOptions("My Scan Template", "f6cfb91a-52ea-4a86-bf9a-5a891a26f52b", false, map[string]interface{}{"key": interface{}(123)}) // ScanTemplateOptions | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountScanTemplate(context.Background()).ScanTemplateOptions(scanTemplateOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountScanTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountScanTemplate`: ScanTemplate + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountScanTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountScanTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **scanTemplateOptions** | [**ScanTemplateOptions**](ScanTemplateOptions.md) | | + +### Return type + +[**ScanTemplate**](ScanTemplate.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountUser + +> User CreateAccountUser(ctx).UserOptions(userOptions).Execute() + +Create a new user account + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userOptions := *openapiclient.NewUserOptions() // UserOptions | user parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountUser(context.Background()).UserOptions(userOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountUser`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userOptions** | [**UserOptions**](UserOptions.md) | user parameters | + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAccountUserInvite + +> User CreateAccountUserInvite(ctx).UserInviteOptions(userInviteOptions).Execute() + +Create a new user account and send an email invite + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userInviteOptions := *openapiclient.NewUserInviteOptions() // UserInviteOptions | user invite parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.CreateAccountUserInvite(context.Background()).UserInviteOptions(userInviteOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.CreateAccountUserInvite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAccountUserInvite`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.CreateAccountUserInvite`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAccountUserInviteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userInviteOptions** | [**UserInviteOptions**](UserInviteOptions.md) | user invite parameters | + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccountAssetOwnershipType + +> []AssetOwnershipType DeleteAccountAssetOwnershipType(ctx, ownershipTypeId).Execute() + +Delete a single asset ownership type + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + ownershipTypeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset ownership type + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.DeleteAccountAssetOwnershipType(context.Background(), ownershipTypeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.DeleteAccountAssetOwnershipType``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteAccountAssetOwnershipType`: []AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.DeleteAccountAssetOwnershipType`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ownershipTypeId** | **string** | UUID of the asset ownership type | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccountAssetOwnershipTypeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccountAssetOwnershipTypes + +> []AssetOwnershipType DeleteAccountAssetOwnershipTypes(ctx).RequestBody(requestBody).Execute() + +Delete asset ownership types + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + requestBody := []string{"Property_example"} // []string | Array of ids + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.DeleteAccountAssetOwnershipTypes(context.Background()).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.DeleteAccountAssetOwnershipTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteAccountAssetOwnershipTypes`: []AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.DeleteAccountAssetOwnershipTypes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccountAssetOwnershipTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | **[]string** | Array of ids | + +### Return type + +[**[]AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccountCustomIntegration + +> CustomIntegration DeleteAccountCustomIntegration(ctx, customIntegrationId).Execute() + +Delete an custom integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.DeleteAccountCustomIntegration(context.Background(), customIntegrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.DeleteAccountCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteAccountCustomIntegration`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.DeleteAccountCustomIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccountCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccountOrganizationExportToken + +> DeleteAccountOrganizationExportToken(ctx, orgId, keyId).Execute() + +Removes the export token from the specified organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the export token ID to remove + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.DeleteAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.DeleteAccountOrganizationExportToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | +**keyId** | **string** | UUID of the export token ID to remove | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccountOrganizationExportTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccountOrganizationExportTokenDeprecated + +> DeleteAccountOrganizationExportTokenDeprecated(ctx, orgId).Execute() + +Removes the export token from the specified organization + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.DeleteAccountOrganizationExportTokenDeprecated(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.DeleteAccountOrganizationExportTokenDeprecated``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccountOrganizationExportTokenDeprecatedRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportEventsJSON + +> EventExportResponse ExportEventsJSON(ctx).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + +System event log as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.ExportEventsJSON(context.Background()).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.ExportEventsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportEventsJSON`: EventExportResponse + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.ExportEventsJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportEventsJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + **fields** | **string** | an optional list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | + +### Return type + +[**EventExportResponse**](EventExportResponse.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportEventsJSONL + +> *os.File ExportEventsJSONL(ctx).Search(search).Fields(fields).Execute() + +System event log as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.ExportEventsJSONL(context.Background()).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.ExportEventsJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportEventsJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.ExportEventsJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportEventsJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + **fields** | **string** | an optional list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAPIToken + +> AccessToken GetAPIToken(ctx).GrantType(grantType).ClientId(clientId).ClientSecret(clientSecret).Execute() + +Generate an access token using an API client + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantType := "grantType_example" // string | + clientId := "clientId_example" // string | + clientSecret := "clientSecret_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAPIToken(context.Background()).GrantType(grantType).ClientId(clientId).ClientSecret(clientSecret).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAPIToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAPIToken`: AccessToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAPIToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAPITokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantType** | **string** | | + **clientId** | **string** | | + **clientSecret** | **string** | | + +### Return type + +[**AccessToken**](AccessToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountAgents + +> []Agent GetAccountAgents(ctx).Search(search).Execute() + +Get all agents across all organizations + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountAgents(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountAgents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountAgents`: []Agent + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountAgents`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountAgentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Agent**](Agent.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountAssetOwnershipTypes + +> []AssetOwnershipType GetAccountAssetOwnershipTypes(ctx).Execute() + +Get all asset ownership types + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountAssetOwnershipTypes(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountAssetOwnershipTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountAssetOwnershipTypes`: []AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountAssetOwnershipTypes`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountAssetOwnershipTypesRequest struct via the builder pattern + + +### Return type + +[**[]AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountCredential + +> Credential GetAccountCredential(ctx, credentialId).Execute() + +Get credential details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the credential to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountCredential(context.Background(), credentialId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountCredential`: Credential + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountCredential`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**credentialId** | **string** | UUID of the credential to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Credential**](Credential.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountCredentials + +> []Credential GetAccountCredentials(ctx).Search(search).Execute() + +Get all account credentials + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountCredentials(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountCredentials``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountCredentials`: []Credential + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountCredentials`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountCredentialsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Credential**](Credential.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountCustomIntegration + +> CustomIntegration GetAccountCustomIntegration(ctx, customIntegrationId).Execute() + +Get single custom integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountCustomIntegration(context.Background(), customIntegrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountCustomIntegration`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountCustomIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountCustomIntegrations + +> CustomIntegration GetAccountCustomIntegrations(ctx).Execute() + +Get all custom integrations + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountCustomIntegrations(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountCustomIntegrations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountCustomIntegrations`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountCustomIntegrations`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountCustomIntegrationsRequest struct via the builder pattern + + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountGroup + +> Group GetAccountGroup(ctx, groupId).Execute() + +Get group details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the group + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountGroup`: Group + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | UUID of the group | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Group**](Group.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountGroupMapping + +> GroupMapping GetAccountGroupMapping(ctx, groupMappingId).Execute() + +Get SSO group mapping details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupMappingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the SSO group mapping + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountGroupMapping(context.Background(), groupMappingId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountGroupMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountGroupMapping`: GroupMapping + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountGroupMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupMappingId** | **string** | UUID of the SSO group mapping | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountGroupMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GroupMapping**](GroupMapping.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountGroupMappings + +> GroupMapping GetAccountGroupMappings(ctx).Execute() + +Get all SSO group mappings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountGroupMappings(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountGroupMappings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountGroupMappings`: GroupMapping + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountGroupMappings`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountGroupMappingsRequest struct via the builder pattern + + +### Return type + +[**GroupMapping**](GroupMapping.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountGroups + +> Group GetAccountGroups(ctx).Execute() + +Get all groups + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountGroups(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountGroups``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountGroups`: Group + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountGroups`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountGroupsRequest struct via the builder pattern + + +### Return type + +[**Group**](Group.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountKey + +> OrganizationAPIKey GetAccountKey(ctx, keyId).Execute() + +Get key details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the key to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountKey(context.Background(), keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountKey`: OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**keyId** | **string** | UUID of the key to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OrganizationAPIKey**](OrganizationAPIKey.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountKeys + +> []OrganizationAPIKey GetAccountKeys(ctx).Execute() + +Get all active API keys + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountKeys(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountKeys`: []OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountKeys`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountKeysRequest struct via the builder pattern + + +### Return type + +[**[]OrganizationAPIKey**](OrganizationAPIKey.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountLicense + +> License GetAccountLicense(ctx).Execute() + +Get license details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountLicense(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountLicense``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountLicense`: License + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountLicense`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountLicenseRequest struct via the builder pattern + + +### Return type + +[**License**](License.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountOrganization + +> Organization GetAccountOrganization(ctx, orgId).Execute() + +Get organization details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountOrganization(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountOrganization`: Organization + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountOrganization`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountOrganizationExportToken + +> ExportToken GetAccountOrganizationExportToken(ctx, orgId, keyId).Execute() + +Get export token details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the export token ID to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountOrganizationExportToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountOrganizationExportToken`: ExportToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountOrganizationExportToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | +**keyId** | **string** | UUID of the export token ID to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountOrganizationExportTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ExportToken**](ExportToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountOrganizationExportTokens + +> []ExportToken GetAccountOrganizationExportTokens(ctx, orgId).Execute() + +Get all active export tokens for an organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve export tokens for + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountOrganizationExportTokens(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountOrganizationExportTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountOrganizationExportTokens`: []ExportToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountOrganizationExportTokens`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve export tokens for | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountOrganizationExportTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ExportToken**](ExportToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountOrganizations + +> []Organization GetAccountOrganizations(ctx).Search(search).Execute() + +Get all organization details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountOrganizations(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountOrganizations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountOrganizations`: []Organization + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountOrganizations`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountOrganizationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Organization**](Organization.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountScanTemplate + +> ScanTemplate GetAccountScanTemplate(ctx, scanTemplateId).Execute() + +Get scan template details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + scanTemplateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the scan template to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountScanTemplate(context.Background(), scanTemplateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountScanTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountScanTemplate`: ScanTemplate + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountScanTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scanTemplateId** | **string** | UUID of the scan template to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountScanTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ScanTemplate**](ScanTemplate.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountScanTemplates + +> []ScanTemplate GetAccountScanTemplates(ctx).Search(search).Execute() + +Get all scan templates across all organizations (up to 1000) + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountScanTemplates(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountScanTemplates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountScanTemplates`: []ScanTemplate + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountScanTemplates`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountScanTemplatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]ScanTemplate**](ScanTemplate.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountSites + +> []Site GetAccountSites(ctx).Search(search).Execute() + +Get all sites details across all organizations + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountSites(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountSites``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountSites`: []Site + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountSites`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountSitesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Site**](Site.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountTasks + +> []Task GetAccountTasks(ctx).Search(search).Execute() + +Get all task details across all organizations (up to 1000) + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountTasks(context.Background()).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountTasks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountTasks`: []Task + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountTasks`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountTasksRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountUser + +> User GetAccountUser(ctx, userId).Execute() + +Get user details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountUser`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAccountUsers + +> []User GetAccountUsers(ctx).Execute() + +Get all users + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.GetAccountUsers(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetAccountUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccountUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetAccountUsers`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccountUsersRequest struct via the builder pattern + + +### Return type + +[**[]User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountCredential + +> RemoveAccountCredential(ctx, credentialId).Execute() + +Remove this credential + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the credential to delete + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountCredential(context.Background(), credentialId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**credentialId** | **string** | UUID of the credential to delete | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountGroup + +> RemoveAccountGroup(ctx, groupId).Execute() + +Remove this group + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the group + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | UUID of the group | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountGroupMapping + +> RemoveAccountGroupMapping(ctx, groupMappingId).Execute() + +Remove this SSO group mapping + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupMappingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the SSO group mapping + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountGroupMapping(context.Background(), groupMappingId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountGroupMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupMappingId** | **string** | UUID of the SSO group mapping | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountGroupMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountKey + +> RemoveAccountKey(ctx, keyId).Execute() + +Remove this key + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the key to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountKey(context.Background(), keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**keyId** | **string** | UUID of the key to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountOrganization + +> RemoveAccountOrganization(ctx, orgId).Execute() + +Remove this organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountOrganization(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountScanTemplate + +> ScanTemplate RemoveAccountScanTemplate(ctx, scanTemplateId).Execute() + +Remove scan template + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + scanTemplateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the scan template to remove + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.RemoveAccountScanTemplate(context.Background(), scanTemplateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountScanTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RemoveAccountScanTemplate`: ScanTemplate + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.RemoveAccountScanTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scanTemplateId** | **string** | UUID of the scan template to remove | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountScanTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ScanTemplate**](ScanTemplate.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAccountUser + +> RemoveAccountUser(ctx, userId).Execute() + +Remove this user + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to delete + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AccountAPI.RemoveAccountUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RemoveAccountUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to delete | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAccountUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResetAccountUserLockout + +> User ResetAccountUserLockout(ctx, userId).Execute() + +Resets the user's lockout status + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.ResetAccountUserLockout(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.ResetAccountUserLockout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetAccountUserLockout`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.ResetAccountUserLockout`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetAccountUserLockoutRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResetAccountUserMFA + +> User ResetAccountUserMFA(ctx, userId).Execute() + +Resets the user's MFA tokens + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.ResetAccountUserMFA(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.ResetAccountUserMFA``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetAccountUserMFA`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.ResetAccountUserMFA`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetAccountUserMFARequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResetAccountUserPassword + +> User ResetAccountUserPassword(ctx, userId).Execute() + +Sends the user a password reset email + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.ResetAccountUserPassword(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.ResetAccountUserPassword``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetAccountUserPassword`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.ResetAccountUserPassword`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetAccountUserPasswordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RotateAPIToken + +> APIClientCredentials RotateAPIToken(ctx).GrantType(grantType).ClientId(clientId).ClientSecret(clientSecret).Execute() + +Rotate the API client secret + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantType := "grantType_example" // string | + clientId := "clientId_example" // string | + clientSecret := "clientSecret_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.RotateAPIToken(context.Background()).GrantType(grantType).ClientId(clientId).ClientSecret(clientSecret).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RotateAPIToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RotateAPIToken`: APIClientCredentials + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.RotateAPIToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRotateAPITokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantType** | **string** | | + **clientId** | **string** | | + **clientSecret** | **string** | | + +### Return type + +[**APIClientCredentials**](APIClientCredentials.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RotateAccountKey + +> OrganizationAPIKey RotateAccountKey(ctx, keyId).Execute() + +Rotates the key secret + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the key to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.RotateAccountKey(context.Background(), keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RotateAccountKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RotateAccountKey`: OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.RotateAccountKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**keyId** | **string** | UUID of the key to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRotateAccountKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OrganizationAPIKey**](OrganizationAPIKey.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RotateAccountOrganizationExportToken + +> ExportToken RotateAccountOrganizationExportToken(ctx, orgId, keyId).Execute() + +Rotates an organization export token and returns the updated token + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + keyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the export token ID to rotate + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.RotateAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RotateAccountOrganizationExportToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RotateAccountOrganizationExportToken`: ExportToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.RotateAccountOrganizationExportToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | +**keyId** | **string** | UUID of the export token ID to rotate | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRotateAccountOrganizationExportTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ExportToken**](ExportToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RotateAccountOrganizationExportTokenDeprecated + +> ExportToken RotateAccountOrganizationExportTokenDeprecated(ctx, orgId).Execute() + +Rotates an organization export token and returns the updated token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.RotateAccountOrganizationExportTokenDeprecated(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.RotateAccountOrganizationExportTokenDeprecated``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RotateAccountOrganizationExportTokenDeprecated`: ExportToken + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.RotateAccountOrganizationExportTokenDeprecated`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRotateAccountOrganizationExportTokenDeprecatedRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExportToken**](ExportToken.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountAssetOwnershipType + +> AssetOwnershipType UpdateAccountAssetOwnershipType(ctx, ownershipTypeId).AssetOwnershipTypePost(assetOwnershipTypePost).Execute() + +Update a single asset ownership type + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + ownershipTypeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset ownership type + assetOwnershipTypePost := *openapiclient.NewAssetOwnershipTypePost("Asset Owner") // AssetOwnershipTypePost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountAssetOwnershipType(context.Background(), ownershipTypeId).AssetOwnershipTypePost(assetOwnershipTypePost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountAssetOwnershipType``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountAssetOwnershipType`: AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountAssetOwnershipType`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ownershipTypeId** | **string** | UUID of the asset ownership type | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountAssetOwnershipTypeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **assetOwnershipTypePost** | [**AssetOwnershipTypePost**](AssetOwnershipTypePost.md) | | + +### Return type + +[**AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountAssetOwnershipTypes + +> []AssetOwnershipType UpdateAccountAssetOwnershipTypes(ctx).AssetOwnershipType(assetOwnershipType).Execute() + +Update asset ownership types + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + assetOwnershipType := []openapiclient.AssetOwnershipType{*openapiclient.NewAssetOwnershipType("f6cfb91a-52ea-4a86-bf9a-5a891a26f52b", "Asset Owner")} // []AssetOwnershipType | array of asset ownership types + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountAssetOwnershipTypes(context.Background()).AssetOwnershipType(assetOwnershipType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountAssetOwnershipTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountAssetOwnershipTypes`: []AssetOwnershipType + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountAssetOwnershipTypes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountAssetOwnershipTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assetOwnershipType** | [**[]AssetOwnershipType**](AssetOwnershipType.md) | array of asset ownership types | + +### Return type + +[**[]AssetOwnershipType**](AssetOwnershipType.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountCustomIntegration + +> CustomIntegration UpdateAccountCustomIntegration(ctx, customIntegrationId).BaseCustomIntegration(baseCustomIntegration).Execute() + +Update a single custom integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + baseCustomIntegration := *openapiclient.NewBaseCustomIntegration() // BaseCustomIntegration | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountCustomIntegration(context.Background(), customIntegrationId).BaseCustomIntegration(baseCustomIntegration).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountCustomIntegration`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountCustomIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **baseCustomIntegration** | [**BaseCustomIntegration**](BaseCustomIntegration.md) | | + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountGroup + +> Group UpdateAccountGroup(ctx).GroupPut(groupPut).Execute() + +Update an existing group + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupPut := *openapiclient.NewGroupPut() // GroupPut | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountGroup(context.Background()).GroupPut(groupPut).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountGroup`: Group + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountGroup`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupPut** | [**GroupPut**](GroupPut.md) | | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountGroupMapping + +> GroupMapping UpdateAccountGroupMapping(ctx).GroupMapping(groupMapping).Execute() + +Update an existing SSO group mapping + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupMapping := *openapiclient.NewGroupMapping("f6cfb91a-52ea-4a86-bf9a-5a891a26f52b", "2b096711-4d28-4417-8635-64af4f62c1ae", "basic-attribute", "basic-attribute-value") // GroupMapping | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountGroupMapping(context.Background()).GroupMapping(groupMapping).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountGroupMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountGroupMapping`: GroupMapping + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountGroupMapping`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountGroupMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupMapping** | [**GroupMapping**](GroupMapping.md) | | + +### Return type + +[**GroupMapping**](GroupMapping.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountOrganization + +> Organization UpdateAccountOrganization(ctx, orgId).OrgOptions(orgOptions).Execute() + +Update organization details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization to retrieve + orgOptions := *openapiclient.NewOrgOptions() // OrgOptions | organization options + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountOrganization(context.Background(), orgId).OrgOptions(orgOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountOrganization`: Organization + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountOrganization`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | UUID of the organization to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **orgOptions** | [**OrgOptions**](OrgOptions.md) | organization options | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountScanTemplate + +> ScanTemplate UpdateAccountScanTemplate(ctx).ScanTemplate(scanTemplate).Execute() + +Update scan template + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + scanTemplate := *openapiclient.NewScanTemplate("e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8", "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8", false, map[string]interface{}{"key": interface{}(123)}) // ScanTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountScanTemplate(context.Background()).ScanTemplate(scanTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountScanTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountScanTemplate`: ScanTemplate + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountScanTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountScanTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **scanTemplate** | [**ScanTemplate**](ScanTemplate.md) | | + +### Return type + +[**ScanTemplate**](ScanTemplate.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountUser + +> User UpdateAccountUser(ctx, userId).UserOptions(userOptions).Execute() + +Update a user's details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the user to retrieve + userOptions := *openapiclient.NewUserOptions() // UserOptions | user parameters + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountAPI.UpdateAccountUser(context.Background(), userId).UserOptions(userOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.UpdateAccountUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountUser`: User + fmt.Fprintf(os.Stdout, "Response from `AccountAPI.UpdateAccountUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | UUID of the user to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userOptions** | [**UserOptions**](UserOptions.md) | user parameters | + +### Return type + +[**User**](User.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/docs/Agent.md b/go/docs/Agent.md index 22c754c..667833b 100644 --- a/go/docs/Agent.md +++ b/go/docs/Agent.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **ClientId** | Pointer to **string** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] **CreatedAt** | Pointer to **int64** | | [optional] @@ -18,8 +18,8 @@ Name | Type | Description | Notes **Arch** | Pointer to **string** | | [optional] **Version** | Pointer to **string** | | [optional] **ExternalIp** | Pointer to **string** | | [optional] -**InternalIp** | Pointer to **string** | | [optional] -**SystemInfo** | Pointer to **map[string]map[string]interface{}** | | [optional] +**InternalIp** | Pointer to **NullableString** | | [optional] +**SystemInfo** | Pointer to **map[string]interface{}** | | [optional] **Connected** | Pointer to **bool** | | [optional] **Inactive** | Pointer to **bool** | | [optional] **DeactivatedAt** | Pointer to **int64** | | [optional] @@ -413,22 +413,32 @@ SetInternalIp sets InternalIp field to given value. HasInternalIp returns a boolean if a field has been set. +### SetInternalIpNil + +`func (o *Agent) SetInternalIpNil(b bool)` + + SetInternalIpNil sets the value for InternalIp to be an explicit nil + +### UnsetInternalIp +`func (o *Agent) UnsetInternalIp()` + +UnsetInternalIp ensures that no value is present for InternalIp, not even an explicit nil ### GetSystemInfo -`func (o *Agent) GetSystemInfo() map[string]map[string]interface{}` +`func (o *Agent) GetSystemInfo() map[string]interface{}` GetSystemInfo returns the SystemInfo field if non-nil, zero value otherwise. ### GetSystemInfoOk -`func (o *Agent) GetSystemInfoOk() (*map[string]map[string]interface{}, bool)` +`func (o *Agent) GetSystemInfoOk() (*map[string]interface{}, bool)` GetSystemInfoOk returns a tuple with the SystemInfo field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSystemInfo -`func (o *Agent) SetSystemInfo(v map[string]map[string]interface{})` +`func (o *Agent) SetSystemInfo(v map[string]interface{})` SetSystemInfo sets SystemInfo field to given value. diff --git a/go/docs/AgentPatchedSettings.md b/go/docs/AgentPatchedSettings.md new file mode 100644 index 0000000..edd81ad --- /dev/null +++ b/go/docs/AgentPatchedSettings.md @@ -0,0 +1,82 @@ +# AgentPatchedSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SiteId** | Pointer to **string** | | [optional] +**Settings** | Pointer to [**AgentPatchedSettingsSettings**](AgentPatchedSettingsSettings.md) | | [optional] + +## Methods + +### NewAgentPatchedSettings + +`func NewAgentPatchedSettings() *AgentPatchedSettings` + +NewAgentPatchedSettings instantiates a new AgentPatchedSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAgentPatchedSettingsWithDefaults + +`func NewAgentPatchedSettingsWithDefaults() *AgentPatchedSettings` + +NewAgentPatchedSettingsWithDefaults instantiates a new AgentPatchedSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSiteId + +`func (o *AgentPatchedSettings) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *AgentPatchedSettings) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *AgentPatchedSettings) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *AgentPatchedSettings) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetSettings + +`func (o *AgentPatchedSettings) GetSettings() AgentPatchedSettingsSettings` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *AgentPatchedSettings) GetSettingsOk() (*AgentPatchedSettingsSettings, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *AgentPatchedSettings) SetSettings(v AgentPatchedSettingsSettings)` + +SetSettings sets Settings field to given value. + +### HasSettings + +`func (o *AgentPatchedSettings) HasSettings() bool` + +HasSettings returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AgentPatchedSettingsSettings.md b/go/docs/AgentPatchedSettingsSettings.md new file mode 100644 index 0000000..d59578c --- /dev/null +++ b/go/docs/AgentPatchedSettingsSettings.md @@ -0,0 +1,56 @@ +# AgentPatchedSettingsSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MaxConcurrentScans** | Pointer to **int64** | | [optional] + +## Methods + +### NewAgentPatchedSettingsSettings + +`func NewAgentPatchedSettingsSettings() *AgentPatchedSettingsSettings` + +NewAgentPatchedSettingsSettings instantiates a new AgentPatchedSettingsSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAgentPatchedSettingsSettingsWithDefaults + +`func NewAgentPatchedSettingsSettingsWithDefaults() *AgentPatchedSettingsSettings` + +NewAgentPatchedSettingsSettingsWithDefaults instantiates a new AgentPatchedSettingsSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMaxConcurrentScans + +`func (o *AgentPatchedSettingsSettings) GetMaxConcurrentScans() int64` + +GetMaxConcurrentScans returns the MaxConcurrentScans field if non-nil, zero value otherwise. + +### GetMaxConcurrentScansOk + +`func (o *AgentPatchedSettingsSettings) GetMaxConcurrentScansOk() (*int64, bool)` + +GetMaxConcurrentScansOk returns a tuple with the MaxConcurrentScans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxConcurrentScans + +`func (o *AgentPatchedSettingsSettings) SetMaxConcurrentScans(v int64)` + +SetMaxConcurrentScans sets MaxConcurrentScans field to given value. + +### HasMaxConcurrentScans + +`func (o *AgentPatchedSettingsSettings) HasMaxConcurrentScans() bool` + +HasMaxConcurrentScans returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Asset.md b/go/docs/Asset.md index e8da56c..4c3fdb1 100644 --- a/go/docs/Asset.md +++ b/go/docs/Asset.md @@ -4,11 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **CreatedAt** | Pointer to **int64** | | [optional] **UpdatedAt** | Pointer to **int64** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] **SiteId** | Pointer to **string** | | [optional] +**Scanned** | Pointer to **bool** | | [optional] **Alive** | Pointer to **bool** | | [optional] **FirstSeen** | Pointer to **int64** | | [optional] **LastSeen** | Pointer to **int64** | | [optional] @@ -38,15 +39,22 @@ Name | Type | Description | Notes **Comments** | Pointer to **string** | | [optional] **ServicePortsTcp** | Pointer to **[]string** | | [optional] **ServicePortsUdp** | Pointer to **[]string** | | [optional] -**ServicePortsProtocols** | Pointer to **[]string** | | [optional] -**ServicePortsProducts** | Pointer to **[]string** | | [optional] +**ServiceProtocols** | Pointer to **[]string** | | [optional] +**ServiceProducts** | Pointer to **[]string** | | [optional] **OrgName** | Pointer to **string** | | [optional] **SiteName** | Pointer to **string** | | [optional] **AgentName** | Pointer to **string** | | [optional] **Tags** | Pointer to **map[string]string** | | [optional] -**Services** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] -**Rtts** | Pointer to **map[string]map[string]interface{}** | | [optional] -**Credentials** | Pointer to [**map[string]map[string]bool**](map.md) | | [optional] +**Services** | Pointer to **map[string]map[string]string** | | [optional] +**Rtts** | Pointer to **map[string]interface{}** | | [optional] +**RiskRank** | Pointer to **float32** | -1 = none, 0 = info, 4 = critical | [optional] +**Risk** | Pointer to **string** | | [optional] +**Credentials** | Pointer to **map[string]map[string]bool** | | [optional] +**VulnerabilityCount** | Pointer to **float32** | | [optional] +**FindingCount** | Pointer to **float32** | | [optional] +**EolOs** | Pointer to **float32** | OS main EOL date | [optional] +**EolOsExt** | Pointer to **float32** | OS extended support EOL date | [optional] +**Sources** | Pointer to **[]string** | Sources used for asset data | [optional] **Attributes** | Pointer to **map[string]string** | | [optional] ## Methods @@ -188,6 +196,31 @@ SetSiteId sets SiteId field to given value. HasSiteId returns a boolean if a field has been set. +### GetScanned + +`func (o *Asset) GetScanned() bool` + +GetScanned returns the Scanned field if non-nil, zero value otherwise. + +### GetScannedOk + +`func (o *Asset) GetScannedOk() (*bool, bool)` + +GetScannedOk returns a tuple with the Scanned field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScanned + +`func (o *Asset) SetScanned(v bool)` + +SetScanned sets Scanned field to given value. + +### HasScanned + +`func (o *Asset) HasScanned() bool` + +HasScanned returns a boolean if a field has been set. + ### GetAlive `func (o *Asset) GetAlive() bool` @@ -390,20 +423,20 @@ HasHw returns a boolean if a field has been set. ### GetAddresses -`func (o *Asset) GetAddresses() []string` +`func (o *Asset) GetAddresses() []*string` GetAddresses returns the Addresses field if non-nil, zero value otherwise. ### GetAddressesOk -`func (o *Asset) GetAddressesOk() (*[]string, bool)` +`func (o *Asset) GetAddressesOk() (*[]*string, bool)` GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAddresses -`func (o *Asset) SetAddresses(v []string)` +`func (o *Asset) SetAddresses(v []*string)` SetAddresses sets Addresses field to given value. @@ -415,20 +448,20 @@ HasAddresses returns a boolean if a field has been set. ### GetAddressesExtra -`func (o *Asset) GetAddressesExtra() []string` +`func (o *Asset) GetAddressesExtra() []*string` GetAddressesExtra returns the AddressesExtra field if non-nil, zero value otherwise. ### GetAddressesExtraOk -`func (o *Asset) GetAddressesExtraOk() (*[]string, bool)` +`func (o *Asset) GetAddressesExtraOk() (*[]*string, bool)` GetAddressesExtraOk returns a tuple with the AddressesExtra field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAddressesExtra -`func (o *Asset) SetAddressesExtra(v []string)` +`func (o *Asset) SetAddressesExtra(v []*string)` SetAddressesExtra sets AddressesExtra field to given value. @@ -913,55 +946,55 @@ SetServicePortsUdp sets ServicePortsUdp field to given value. HasServicePortsUdp returns a boolean if a field has been set. -### GetServicePortsProtocols +### GetServiceProtocols -`func (o *Asset) GetServicePortsProtocols() []string` +`func (o *Asset) GetServiceProtocols() []string` -GetServicePortsProtocols returns the ServicePortsProtocols field if non-nil, zero value otherwise. +GetServiceProtocols returns the ServiceProtocols field if non-nil, zero value otherwise. -### GetServicePortsProtocolsOk +### GetServiceProtocolsOk -`func (o *Asset) GetServicePortsProtocolsOk() (*[]string, bool)` +`func (o *Asset) GetServiceProtocolsOk() (*[]string, bool)` -GetServicePortsProtocolsOk returns a tuple with the ServicePortsProtocols field if it's non-nil, zero value otherwise +GetServiceProtocolsOk returns a tuple with the ServiceProtocols field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetServicePortsProtocols +### SetServiceProtocols -`func (o *Asset) SetServicePortsProtocols(v []string)` +`func (o *Asset) SetServiceProtocols(v []string)` -SetServicePortsProtocols sets ServicePortsProtocols field to given value. +SetServiceProtocols sets ServiceProtocols field to given value. -### HasServicePortsProtocols +### HasServiceProtocols -`func (o *Asset) HasServicePortsProtocols() bool` +`func (o *Asset) HasServiceProtocols() bool` -HasServicePortsProtocols returns a boolean if a field has been set. +HasServiceProtocols returns a boolean if a field has been set. -### GetServicePortsProducts +### GetServiceProducts -`func (o *Asset) GetServicePortsProducts() []string` +`func (o *Asset) GetServiceProducts() []string` -GetServicePortsProducts returns the ServicePortsProducts field if non-nil, zero value otherwise. +GetServiceProducts returns the ServiceProducts field if non-nil, zero value otherwise. -### GetServicePortsProductsOk +### GetServiceProductsOk -`func (o *Asset) GetServicePortsProductsOk() (*[]string, bool)` +`func (o *Asset) GetServiceProductsOk() (*[]string, bool)` -GetServicePortsProductsOk returns a tuple with the ServicePortsProducts field if it's non-nil, zero value otherwise +GetServiceProductsOk returns a tuple with the ServiceProducts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetServicePortsProducts +### SetServiceProducts -`func (o *Asset) SetServicePortsProducts(v []string)` +`func (o *Asset) SetServiceProducts(v []string)` -SetServicePortsProducts sets ServicePortsProducts field to given value. +SetServiceProducts sets ServiceProducts field to given value. -### HasServicePortsProducts +### HasServiceProducts -`func (o *Asset) HasServicePortsProducts() bool` +`func (o *Asset) HasServiceProducts() bool` -HasServicePortsProducts returns a boolean if a field has been set. +HasServiceProducts returns a boolean if a field has been set. ### GetOrgName @@ -1090,20 +1123,20 @@ HasServices returns a boolean if a field has been set. ### GetRtts -`func (o *Asset) GetRtts() map[string]map[string]interface{}` +`func (o *Asset) GetRtts() map[string]interface{}` GetRtts returns the Rtts field if non-nil, zero value otherwise. ### GetRttsOk -`func (o *Asset) GetRttsOk() (*map[string]map[string]interface{}, bool)` +`func (o *Asset) GetRttsOk() (*map[string]interface{}, bool)` GetRttsOk returns a tuple with the Rtts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRtts -`func (o *Asset) SetRtts(v map[string]map[string]interface{})` +`func (o *Asset) SetRtts(v map[string]interface{})` SetRtts sets Rtts field to given value. @@ -1113,6 +1146,56 @@ SetRtts sets Rtts field to given value. HasRtts returns a boolean if a field has been set. +### GetRiskRank + +`func (o *Asset) GetRiskRank() float32` + +GetRiskRank returns the RiskRank field if non-nil, zero value otherwise. + +### GetRiskRankOk + +`func (o *Asset) GetRiskRankOk() (*float32, bool)` + +GetRiskRankOk returns a tuple with the RiskRank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskRank + +`func (o *Asset) SetRiskRank(v float32)` + +SetRiskRank sets RiskRank field to given value. + +### HasRiskRank + +`func (o *Asset) HasRiskRank() bool` + +HasRiskRank returns a boolean if a field has been set. + +### GetRisk + +`func (o *Asset) GetRisk() string` + +GetRisk returns the Risk field if non-nil, zero value otherwise. + +### GetRiskOk + +`func (o *Asset) GetRiskOk() (*string, bool)` + +GetRiskOk returns a tuple with the Risk field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRisk + +`func (o *Asset) SetRisk(v string)` + +SetRisk sets Risk field to given value. + +### HasRisk + +`func (o *Asset) HasRisk() bool` + +HasRisk returns a boolean if a field has been set. + ### GetCredentials `func (o *Asset) GetCredentials() map[string]map[string]bool` @@ -1138,6 +1221,131 @@ SetCredentials sets Credentials field to given value. HasCredentials returns a boolean if a field has been set. +### GetVulnerabilityCount + +`func (o *Asset) GetVulnerabilityCount() float32` + +GetVulnerabilityCount returns the VulnerabilityCount field if non-nil, zero value otherwise. + +### GetVulnerabilityCountOk + +`func (o *Asset) GetVulnerabilityCountOk() (*float32, bool)` + +GetVulnerabilityCountOk returns a tuple with the VulnerabilityCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCount + +`func (o *Asset) SetVulnerabilityCount(v float32)` + +SetVulnerabilityCount sets VulnerabilityCount field to given value. + +### HasVulnerabilityCount + +`func (o *Asset) HasVulnerabilityCount() bool` + +HasVulnerabilityCount returns a boolean if a field has been set. + +### GetFindingCount + +`func (o *Asset) GetFindingCount() float32` + +GetFindingCount returns the FindingCount field if non-nil, zero value otherwise. + +### GetFindingCountOk + +`func (o *Asset) GetFindingCountOk() (*float32, bool)` + +GetFindingCountOk returns a tuple with the FindingCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFindingCount + +`func (o *Asset) SetFindingCount(v float32)` + +SetFindingCount sets FindingCount field to given value. + +### HasFindingCount + +`func (o *Asset) HasFindingCount() bool` + +HasFindingCount returns a boolean if a field has been set. + +### GetEolOs + +`func (o *Asset) GetEolOs() float32` + +GetEolOs returns the EolOs field if non-nil, zero value otherwise. + +### GetEolOsOk + +`func (o *Asset) GetEolOsOk() (*float32, bool)` + +GetEolOsOk returns a tuple with the EolOs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEolOs + +`func (o *Asset) SetEolOs(v float32)` + +SetEolOs sets EolOs field to given value. + +### HasEolOs + +`func (o *Asset) HasEolOs() bool` + +HasEolOs returns a boolean if a field has been set. + +### GetEolOsExt + +`func (o *Asset) GetEolOsExt() float32` + +GetEolOsExt returns the EolOsExt field if non-nil, zero value otherwise. + +### GetEolOsExtOk + +`func (o *Asset) GetEolOsExtOk() (*float32, bool)` + +GetEolOsExtOk returns a tuple with the EolOsExt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEolOsExt + +`func (o *Asset) SetEolOsExt(v float32)` + +SetEolOsExt sets EolOsExt field to given value. + +### HasEolOsExt + +`func (o *Asset) HasEolOsExt() bool` + +HasEolOsExt returns a boolean if a field has been set. + +### GetSources + +`func (o *Asset) GetSources() []string` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *Asset) GetSourcesOk() (*[]string, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *Asset) SetSources(v []string)` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *Asset) HasSources() bool` + +HasSources returns a boolean if a field has been set. + ### GetAttributes `func (o *Asset) GetAttributes() map[string]string` diff --git a/go/docs/AssetComments.md b/go/docs/AssetComments.md index 9f6f877..1a2fabd 100644 --- a/go/docs/AssetComments.md +++ b/go/docs/AssetComments.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Comments** | Pointer to **string** | | +**Comments** | **string** | | ## Methods diff --git a/go/docs/AssetCriticality.md b/go/docs/AssetCriticality.md new file mode 100644 index 0000000..38b5c30 --- /dev/null +++ b/go/docs/AssetCriticality.md @@ -0,0 +1,51 @@ +# AssetCriticality + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Criticality** | **string** | | + +## Methods + +### NewAssetCriticality + +`func NewAssetCriticality(criticality string, ) *AssetCriticality` + +NewAssetCriticality instantiates a new AssetCriticality object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetCriticalityWithDefaults + +`func NewAssetCriticalityWithDefaults() *AssetCriticality` + +NewAssetCriticalityWithDefaults instantiates a new AssetCriticality object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCriticality + +`func (o *AssetCriticality) GetCriticality() string` + +GetCriticality returns the Criticality field if non-nil, zero value otherwise. + +### GetCriticalityOk + +`func (o *AssetCriticality) GetCriticalityOk() (*string, bool)` + +GetCriticalityOk returns a tuple with the Criticality field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriticality + +`func (o *AssetCriticality) SetCriticality(v string)` + +SetCriticality sets Criticality field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetCriticalityWithSearch.md b/go/docs/AssetCriticalityWithSearch.md new file mode 100644 index 0000000..7325ea0 --- /dev/null +++ b/go/docs/AssetCriticalityWithSearch.md @@ -0,0 +1,72 @@ +# AssetCriticalityWithSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Criticality** | **string** | | +**Search** | **string** | | + +## Methods + +### NewAssetCriticalityWithSearch + +`func NewAssetCriticalityWithSearch(criticality string, search string, ) *AssetCriticalityWithSearch` + +NewAssetCriticalityWithSearch instantiates a new AssetCriticalityWithSearch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetCriticalityWithSearchWithDefaults + +`func NewAssetCriticalityWithSearchWithDefaults() *AssetCriticalityWithSearch` + +NewAssetCriticalityWithSearchWithDefaults instantiates a new AssetCriticalityWithSearch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCriticality + +`func (o *AssetCriticalityWithSearch) GetCriticality() string` + +GetCriticality returns the Criticality field if non-nil, zero value otherwise. + +### GetCriticalityOk + +`func (o *AssetCriticalityWithSearch) GetCriticalityOk() (*string, bool)` + +GetCriticalityOk returns a tuple with the Criticality field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriticality + +`func (o *AssetCriticalityWithSearch) SetCriticality(v string)` + +SetCriticality sets Criticality field to given value. + + +### GetSearch + +`func (o *AssetCriticalityWithSearch) GetSearch() string` + +GetSearch returns the Search field if non-nil, zero value otherwise. + +### GetSearchOk + +`func (o *AssetCriticalityWithSearch) GetSearchOk() (*string, bool)` + +GetSearchOk returns a tuple with the Search field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearch + +`func (o *AssetCriticalityWithSearch) SetSearch(v string)` + +SetSearch sets Search field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetExportResponse.md b/go/docs/AssetExportResponse.md new file mode 100644 index 0000000..2a0fcb9 --- /dev/null +++ b/go/docs/AssetExportResponse.md @@ -0,0 +1,82 @@ +# AssetExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assets** | Pointer to [**[]Asset**](Asset.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewAssetExportResponse + +`func NewAssetExportResponse() *AssetExportResponse` + +NewAssetExportResponse instantiates a new AssetExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetExportResponseWithDefaults + +`func NewAssetExportResponseWithDefaults() *AssetExportResponse` + +NewAssetExportResponseWithDefaults instantiates a new AssetExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAssets + +`func (o *AssetExportResponse) GetAssets() []Asset` + +GetAssets returns the Assets field if non-nil, zero value otherwise. + +### GetAssetsOk + +`func (o *AssetExportResponse) GetAssetsOk() (*[]Asset, bool)` + +GetAssetsOk returns a tuple with the Assets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssets + +`func (o *AssetExportResponse) SetAssets(v []Asset)` + +SetAssets sets Assets field to given value. + +### HasAssets + +`func (o *AssetExportResponse) HasAssets() bool` + +HasAssets returns a boolean if a field has been set. + +### GetNextKey + +`func (o *AssetExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *AssetExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *AssetExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *AssetExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetIDs.md b/go/docs/AssetIDs.md new file mode 100644 index 0000000..15f97c9 --- /dev/null +++ b/go/docs/AssetIDs.md @@ -0,0 +1,51 @@ +# AssetIDs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetIds** | **[]string** | | + +## Methods + +### NewAssetIDs + +`func NewAssetIDs(assetIds []string, ) *AssetIDs` + +NewAssetIDs instantiates a new AssetIDs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetIDsWithDefaults + +`func NewAssetIDsWithDefaults() *AssetIDs` + +NewAssetIDsWithDefaults instantiates a new AssetIDs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAssetIds + +`func (o *AssetIDs) GetAssetIds() []string` + +GetAssetIds returns the AssetIds field if non-nil, zero value otherwise. + +### GetAssetIdsOk + +`func (o *AssetIDs) GetAssetIdsOk() (*[]string, bool)` + +GetAssetIdsOk returns a tuple with the AssetIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetIds + +`func (o *AssetIDs) SetAssetIds(v []string)` + +SetAssetIds sets AssetIds field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetMetric.md b/go/docs/AssetMetric.md new file mode 100644 index 0000000..64e37f4 --- /dev/null +++ b/go/docs/AssetMetric.md @@ -0,0 +1,82 @@ +# AssetMetric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SiteId** | Pointer to **string** | | [optional] +**Metrics** | Pointer to **map[string]interface{}** | Free-form metric values keyed by metric name. | [optional] + +## Methods + +### NewAssetMetric + +`func NewAssetMetric() *AssetMetric` + +NewAssetMetric instantiates a new AssetMetric object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetMetricWithDefaults + +`func NewAssetMetricWithDefaults() *AssetMetric` + +NewAssetMetricWithDefaults instantiates a new AssetMetric object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSiteId + +`func (o *AssetMetric) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *AssetMetric) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *AssetMetric) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *AssetMetric) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetMetrics + +`func (o *AssetMetric) GetMetrics() map[string]interface{}` + +GetMetrics returns the Metrics field if non-nil, zero value otherwise. + +### GetMetricsOk + +`func (o *AssetMetric) GetMetricsOk() (*map[string]interface{}, bool)` + +GetMetricsOk returns a tuple with the Metrics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetrics + +`func (o *AssetMetric) SetMetrics(v map[string]interface{})` + +SetMetrics sets Metrics field to given value. + +### HasMetrics + +`func (o *AssetMetric) HasMetrics() bool` + +HasMetrics returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnership.md b/go/docs/AssetOwnership.md new file mode 100644 index 0000000..2e2eec0 --- /dev/null +++ b/go/docs/AssetOwnership.md @@ -0,0 +1,82 @@ +# AssetOwnership + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OwnershipTypeId** | Pointer to **string** | | [optional] +**Owner** | Pointer to **string** | | [optional] + +## Methods + +### NewAssetOwnership + +`func NewAssetOwnership() *AssetOwnership` + +NewAssetOwnership instantiates a new AssetOwnership object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipWithDefaults + +`func NewAssetOwnershipWithDefaults() *AssetOwnership` + +NewAssetOwnershipWithDefaults instantiates a new AssetOwnership object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwnershipTypeId + +`func (o *AssetOwnership) GetOwnershipTypeId() string` + +GetOwnershipTypeId returns the OwnershipTypeId field if non-nil, zero value otherwise. + +### GetOwnershipTypeIdOk + +`func (o *AssetOwnership) GetOwnershipTypeIdOk() (*string, bool)` + +GetOwnershipTypeIdOk returns a tuple with the OwnershipTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnershipTypeId + +`func (o *AssetOwnership) SetOwnershipTypeId(v string)` + +SetOwnershipTypeId sets OwnershipTypeId field to given value. + +### HasOwnershipTypeId + +`func (o *AssetOwnership) HasOwnershipTypeId() bool` + +HasOwnershipTypeId returns a boolean if a field has been set. + +### GetOwner + +`func (o *AssetOwnership) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *AssetOwnership) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *AssetOwnership) SetOwner(v string)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *AssetOwnership) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnershipType.md b/go/docs/AssetOwnershipType.md new file mode 100644 index 0000000..9e8c4eb --- /dev/null +++ b/go/docs/AssetOwnershipType.md @@ -0,0 +1,150 @@ +# AssetOwnershipType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**Reference** | Pointer to **int64** | | [optional] +**Order** | Pointer to **int64** | | [optional] +**Hidden** | Pointer to **bool** | | [optional] + +## Methods + +### NewAssetOwnershipType + +`func NewAssetOwnershipType(id string, name string, ) *AssetOwnershipType` + +NewAssetOwnershipType instantiates a new AssetOwnershipType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipTypeWithDefaults + +`func NewAssetOwnershipTypeWithDefaults() *AssetOwnershipType` + +NewAssetOwnershipTypeWithDefaults instantiates a new AssetOwnershipType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *AssetOwnershipType) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AssetOwnershipType) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AssetOwnershipType) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *AssetOwnershipType) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AssetOwnershipType) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AssetOwnershipType) SetName(v string)` + +SetName sets Name field to given value. + + +### GetReference + +`func (o *AssetOwnershipType) GetReference() int64` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *AssetOwnershipType) GetReferenceOk() (*int64, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *AssetOwnershipType) SetReference(v int64)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *AssetOwnershipType) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetOrder + +`func (o *AssetOwnershipType) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *AssetOwnershipType) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *AssetOwnershipType) SetOrder(v int64)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *AssetOwnershipType) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetHidden + +`func (o *AssetOwnershipType) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *AssetOwnershipType) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *AssetOwnershipType) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *AssetOwnershipType) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnershipTypePost.md b/go/docs/AssetOwnershipTypePost.md new file mode 100644 index 0000000..878275d --- /dev/null +++ b/go/docs/AssetOwnershipTypePost.md @@ -0,0 +1,129 @@ +# AssetOwnershipTypePost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Reference** | Pointer to **int64** | | [optional] +**Order** | Pointer to **int64** | | [optional] +**Hidden** | Pointer to **bool** | | [optional] + +## Methods + +### NewAssetOwnershipTypePost + +`func NewAssetOwnershipTypePost(name string, ) *AssetOwnershipTypePost` + +NewAssetOwnershipTypePost instantiates a new AssetOwnershipTypePost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipTypePostWithDefaults + +`func NewAssetOwnershipTypePostWithDefaults() *AssetOwnershipTypePost` + +NewAssetOwnershipTypePostWithDefaults instantiates a new AssetOwnershipTypePost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *AssetOwnershipTypePost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AssetOwnershipTypePost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AssetOwnershipTypePost) SetName(v string)` + +SetName sets Name field to given value. + + +### GetReference + +`func (o *AssetOwnershipTypePost) GetReference() int64` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *AssetOwnershipTypePost) GetReferenceOk() (*int64, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *AssetOwnershipTypePost) SetReference(v int64)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *AssetOwnershipTypePost) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### GetOrder + +`func (o *AssetOwnershipTypePost) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *AssetOwnershipTypePost) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *AssetOwnershipTypePost) SetOrder(v int64)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *AssetOwnershipTypePost) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetHidden + +`func (o *AssetOwnershipTypePost) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *AssetOwnershipTypePost) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *AssetOwnershipTypePost) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *AssetOwnershipTypePost) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnerships.md b/go/docs/AssetOwnerships.md new file mode 100644 index 0000000..3d51b32 --- /dev/null +++ b/go/docs/AssetOwnerships.md @@ -0,0 +1,56 @@ +# AssetOwnerships + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ownerships** | Pointer to [**[]AssetOwnership**](AssetOwnership.md) | | [optional] + +## Methods + +### NewAssetOwnerships + +`func NewAssetOwnerships() *AssetOwnerships` + +NewAssetOwnerships instantiates a new AssetOwnerships object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipsWithDefaults + +`func NewAssetOwnershipsWithDefaults() *AssetOwnerships` + +NewAssetOwnershipsWithDefaults instantiates a new AssetOwnerships object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwnerships + +`func (o *AssetOwnerships) GetOwnerships() []AssetOwnership` + +GetOwnerships returns the Ownerships field if non-nil, zero value otherwise. + +### GetOwnershipsOk + +`func (o *AssetOwnerships) GetOwnershipsOk() (*[]AssetOwnership, bool)` + +GetOwnershipsOk returns a tuple with the Ownerships field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerships + +`func (o *AssetOwnerships) SetOwnerships(v []AssetOwnership)` + +SetOwnerships sets Ownerships field to given value. + +### HasOwnerships + +`func (o *AssetOwnerships) HasOwnerships() bool` + +HasOwnerships returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnershipsWithSearch.md b/go/docs/AssetOwnershipsWithSearch.md new file mode 100644 index 0000000..cdef6b5 --- /dev/null +++ b/go/docs/AssetOwnershipsWithSearch.md @@ -0,0 +1,72 @@ +# AssetOwnershipsWithSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Search** | **string** | | +**Ownerships** | [**[]AssetOwnershipsWithSearchOwnershipsInner**](AssetOwnershipsWithSearchOwnershipsInner.md) | | + +## Methods + +### NewAssetOwnershipsWithSearch + +`func NewAssetOwnershipsWithSearch(search string, ownerships []AssetOwnershipsWithSearchOwnershipsInner, ) *AssetOwnershipsWithSearch` + +NewAssetOwnershipsWithSearch instantiates a new AssetOwnershipsWithSearch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipsWithSearchWithDefaults + +`func NewAssetOwnershipsWithSearchWithDefaults() *AssetOwnershipsWithSearch` + +NewAssetOwnershipsWithSearchWithDefaults instantiates a new AssetOwnershipsWithSearch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSearch + +`func (o *AssetOwnershipsWithSearch) GetSearch() string` + +GetSearch returns the Search field if non-nil, zero value otherwise. + +### GetSearchOk + +`func (o *AssetOwnershipsWithSearch) GetSearchOk() (*string, bool)` + +GetSearchOk returns a tuple with the Search field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearch + +`func (o *AssetOwnershipsWithSearch) SetSearch(v string)` + +SetSearch sets Search field to given value. + + +### GetOwnerships + +`func (o *AssetOwnershipsWithSearch) GetOwnerships() []AssetOwnershipsWithSearchOwnershipsInner` + +GetOwnerships returns the Ownerships field if non-nil, zero value otherwise. + +### GetOwnershipsOk + +`func (o *AssetOwnershipsWithSearch) GetOwnershipsOk() (*[]AssetOwnershipsWithSearchOwnershipsInner, bool)` + +GetOwnershipsOk returns a tuple with the Ownerships field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerships + +`func (o *AssetOwnershipsWithSearch) SetOwnerships(v []AssetOwnershipsWithSearchOwnershipsInner)` + +SetOwnerships sets Ownerships field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetOwnershipsWithSearchOwnershipsInner.md b/go/docs/AssetOwnershipsWithSearchOwnershipsInner.md new file mode 100644 index 0000000..74c5557 --- /dev/null +++ b/go/docs/AssetOwnershipsWithSearchOwnershipsInner.md @@ -0,0 +1,82 @@ +# AssetOwnershipsWithSearchOwnershipsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OwnershipTypeId** | Pointer to **string** | | [optional] +**Owner** | Pointer to **string** | | [optional] + +## Methods + +### NewAssetOwnershipsWithSearchOwnershipsInner + +`func NewAssetOwnershipsWithSearchOwnershipsInner() *AssetOwnershipsWithSearchOwnershipsInner` + +NewAssetOwnershipsWithSearchOwnershipsInner instantiates a new AssetOwnershipsWithSearchOwnershipsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetOwnershipsWithSearchOwnershipsInnerWithDefaults + +`func NewAssetOwnershipsWithSearchOwnershipsInnerWithDefaults() *AssetOwnershipsWithSearchOwnershipsInner` + +NewAssetOwnershipsWithSearchOwnershipsInnerWithDefaults instantiates a new AssetOwnershipsWithSearchOwnershipsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwnershipTypeId + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnershipTypeId() string` + +GetOwnershipTypeId returns the OwnershipTypeId field if non-nil, zero value otherwise. + +### GetOwnershipTypeIdOk + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnershipTypeIdOk() (*string, bool)` + +GetOwnershipTypeIdOk returns a tuple with the OwnershipTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnershipTypeId + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) SetOwnershipTypeId(v string)` + +SetOwnershipTypeId sets OwnershipTypeId field to given value. + +### HasOwnershipTypeId + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) HasOwnershipTypeId() bool` + +HasOwnershipTypeId returns a boolean if a field has been set. + +### GetOwner + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) SetOwner(v string)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *AssetOwnershipsWithSearchOwnershipsInner) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetPage.md b/go/docs/AssetPage.md new file mode 100644 index 0000000..57c3387 --- /dev/null +++ b/go/docs/AssetPage.md @@ -0,0 +1,82 @@ +# AssetPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assets** | Pointer to [**[]Asset**](Asset.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewAssetPage + +`func NewAssetPage() *AssetPage` + +NewAssetPage instantiates a new AssetPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetPageWithDefaults + +`func NewAssetPageWithDefaults() *AssetPage` + +NewAssetPageWithDefaults instantiates a new AssetPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAssets + +`func (o *AssetPage) GetAssets() []Asset` + +GetAssets returns the Assets field if non-nil, zero value otherwise. + +### GetAssetsOk + +`func (o *AssetPage) GetAssetsOk() (*[]Asset, bool)` + +GetAssetsOk returns a tuple with the Assets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssets + +`func (o *AssetPage) SetAssets(v []Asset)` + +SetAssets sets Assets field to given value. + +### HasAssets + +`func (o *AssetPage) HasAssets() bool` + +HasAssets returns a boolean if a field has been set. + +### GetNextKey + +`func (o *AssetPage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *AssetPage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *AssetPage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *AssetPage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetServiceNow.md b/go/docs/AssetServiceNow.md new file mode 100644 index 0000000..568fd5f --- /dev/null +++ b/go/docs/AssetServiceNow.md @@ -0,0 +1,945 @@ +# AssetServiceNow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetId** | **string** | | +**Organization** | Pointer to **string** | | [optional] +**Site** | Pointer to **string** | | [optional] +**DetectedBy** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**SysClassName** | Pointer to **string** | | [optional] +**OsVendor** | Pointer to **string** | | [optional] +**OsProduct** | Pointer to **string** | | [optional] +**OsVersion** | Pointer to **string** | | [optional] +**HwVendor** | Pointer to **string** | | [optional] +**HwProduct** | Pointer to **string** | | [optional] +**HwVersion** | Pointer to **string** | | [optional] +**IpAddress** | Pointer to **NullableString** | | [optional] +**AddressesScope** | Pointer to **string** | | [optional] +**AddressesExtra** | Pointer to **string** | | [optional] +**MacAddress** | Pointer to **string** | | [optional] +**MacManufacturer** | Pointer to **string** | | [optional] +**NewestMacAge** | Pointer to **string** | | [optional] +**Macs** | Pointer to **string** | | [optional] +**MacVendors** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Tags** | Pointer to **string** | | [optional] +**Domains** | Pointer to **string** | | [optional] +**ServiceCount** | Pointer to **int64** | | [optional] +**ServiceCountTcp** | Pointer to **int64** | | [optional] +**ServiceCountUdp** | Pointer to **int64** | | [optional] +**ServiceCountArp** | Pointer to **int64** | | [optional] +**ServiceCountIcmp** | Pointer to **int64** | | [optional] +**LowestTtl** | Pointer to **int64** | | [optional] +**LowestRtt** | Pointer to **int64** | | [optional] +**Alive** | Pointer to **bool** | | [optional] +**FirstDiscovered** | Pointer to **string** | | [optional] +**LastDiscovered** | Pointer to **string** | | [optional] +**LastUpdated** | Pointer to **string** | | [optional] +**Comments** | Pointer to **string** | | [optional] + +## Methods + +### NewAssetServiceNow + +`func NewAssetServiceNow(assetId string, ) *AssetServiceNow` + +NewAssetServiceNow instantiates a new AssetServiceNow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetServiceNowWithDefaults + +`func NewAssetServiceNowWithDefaults() *AssetServiceNow` + +NewAssetServiceNowWithDefaults instantiates a new AssetServiceNow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAssetId + +`func (o *AssetServiceNow) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *AssetServiceNow) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *AssetServiceNow) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + + +### GetOrganization + +`func (o *AssetServiceNow) GetOrganization() string` + +GetOrganization returns the Organization field if non-nil, zero value otherwise. + +### GetOrganizationOk + +`func (o *AssetServiceNow) GetOrganizationOk() (*string, bool)` + +GetOrganizationOk returns a tuple with the Organization field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganization + +`func (o *AssetServiceNow) SetOrganization(v string)` + +SetOrganization sets Organization field to given value. + +### HasOrganization + +`func (o *AssetServiceNow) HasOrganization() bool` + +HasOrganization returns a boolean if a field has been set. + +### GetSite + +`func (o *AssetServiceNow) GetSite() string` + +GetSite returns the Site field if non-nil, zero value otherwise. + +### GetSiteOk + +`func (o *AssetServiceNow) GetSiteOk() (*string, bool)` + +GetSiteOk returns a tuple with the Site field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSite + +`func (o *AssetServiceNow) SetSite(v string)` + +SetSite sets Site field to given value. + +### HasSite + +`func (o *AssetServiceNow) HasSite() bool` + +HasSite returns a boolean if a field has been set. + +### GetDetectedBy + +`func (o *AssetServiceNow) GetDetectedBy() string` + +GetDetectedBy returns the DetectedBy field if non-nil, zero value otherwise. + +### GetDetectedByOk + +`func (o *AssetServiceNow) GetDetectedByOk() (*string, bool)` + +GetDetectedByOk returns a tuple with the DetectedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetectedBy + +`func (o *AssetServiceNow) SetDetectedBy(v string)` + +SetDetectedBy sets DetectedBy field to given value. + +### HasDetectedBy + +`func (o *AssetServiceNow) HasDetectedBy() bool` + +HasDetectedBy returns a boolean if a field has been set. + +### GetType + +`func (o *AssetServiceNow) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AssetServiceNow) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AssetServiceNow) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AssetServiceNow) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSysClassName + +`func (o *AssetServiceNow) GetSysClassName() string` + +GetSysClassName returns the SysClassName field if non-nil, zero value otherwise. + +### GetSysClassNameOk + +`func (o *AssetServiceNow) GetSysClassNameOk() (*string, bool)` + +GetSysClassNameOk returns a tuple with the SysClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSysClassName + +`func (o *AssetServiceNow) SetSysClassName(v string)` + +SetSysClassName sets SysClassName field to given value. + +### HasSysClassName + +`func (o *AssetServiceNow) HasSysClassName() bool` + +HasSysClassName returns a boolean if a field has been set. + +### GetOsVendor + +`func (o *AssetServiceNow) GetOsVendor() string` + +GetOsVendor returns the OsVendor field if non-nil, zero value otherwise. + +### GetOsVendorOk + +`func (o *AssetServiceNow) GetOsVendorOk() (*string, bool)` + +GetOsVendorOk returns a tuple with the OsVendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOsVendor + +`func (o *AssetServiceNow) SetOsVendor(v string)` + +SetOsVendor sets OsVendor field to given value. + +### HasOsVendor + +`func (o *AssetServiceNow) HasOsVendor() bool` + +HasOsVendor returns a boolean if a field has been set. + +### GetOsProduct + +`func (o *AssetServiceNow) GetOsProduct() string` + +GetOsProduct returns the OsProduct field if non-nil, zero value otherwise. + +### GetOsProductOk + +`func (o *AssetServiceNow) GetOsProductOk() (*string, bool)` + +GetOsProductOk returns a tuple with the OsProduct field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOsProduct + +`func (o *AssetServiceNow) SetOsProduct(v string)` + +SetOsProduct sets OsProduct field to given value. + +### HasOsProduct + +`func (o *AssetServiceNow) HasOsProduct() bool` + +HasOsProduct returns a boolean if a field has been set. + +### GetOsVersion + +`func (o *AssetServiceNow) GetOsVersion() string` + +GetOsVersion returns the OsVersion field if non-nil, zero value otherwise. + +### GetOsVersionOk + +`func (o *AssetServiceNow) GetOsVersionOk() (*string, bool)` + +GetOsVersionOk returns a tuple with the OsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOsVersion + +`func (o *AssetServiceNow) SetOsVersion(v string)` + +SetOsVersion sets OsVersion field to given value. + +### HasOsVersion + +`func (o *AssetServiceNow) HasOsVersion() bool` + +HasOsVersion returns a boolean if a field has been set. + +### GetHwVendor + +`func (o *AssetServiceNow) GetHwVendor() string` + +GetHwVendor returns the HwVendor field if non-nil, zero value otherwise. + +### GetHwVendorOk + +`func (o *AssetServiceNow) GetHwVendorOk() (*string, bool)` + +GetHwVendorOk returns a tuple with the HwVendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHwVendor + +`func (o *AssetServiceNow) SetHwVendor(v string)` + +SetHwVendor sets HwVendor field to given value. + +### HasHwVendor + +`func (o *AssetServiceNow) HasHwVendor() bool` + +HasHwVendor returns a boolean if a field has been set. + +### GetHwProduct + +`func (o *AssetServiceNow) GetHwProduct() string` + +GetHwProduct returns the HwProduct field if non-nil, zero value otherwise. + +### GetHwProductOk + +`func (o *AssetServiceNow) GetHwProductOk() (*string, bool)` + +GetHwProductOk returns a tuple with the HwProduct field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHwProduct + +`func (o *AssetServiceNow) SetHwProduct(v string)` + +SetHwProduct sets HwProduct field to given value. + +### HasHwProduct + +`func (o *AssetServiceNow) HasHwProduct() bool` + +HasHwProduct returns a boolean if a field has been set. + +### GetHwVersion + +`func (o *AssetServiceNow) GetHwVersion() string` + +GetHwVersion returns the HwVersion field if non-nil, zero value otherwise. + +### GetHwVersionOk + +`func (o *AssetServiceNow) GetHwVersionOk() (*string, bool)` + +GetHwVersionOk returns a tuple with the HwVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHwVersion + +`func (o *AssetServiceNow) SetHwVersion(v string)` + +SetHwVersion sets HwVersion field to given value. + +### HasHwVersion + +`func (o *AssetServiceNow) HasHwVersion() bool` + +HasHwVersion returns a boolean if a field has been set. + +### GetIpAddress + +`func (o *AssetServiceNow) GetIpAddress() string` + +GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. + +### GetIpAddressOk + +`func (o *AssetServiceNow) GetIpAddressOk() (*string, bool)` + +GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpAddress + +`func (o *AssetServiceNow) SetIpAddress(v string)` + +SetIpAddress sets IpAddress field to given value. + +### HasIpAddress + +`func (o *AssetServiceNow) HasIpAddress() bool` + +HasIpAddress returns a boolean if a field has been set. + +### SetIpAddressNil + +`func (o *AssetServiceNow) SetIpAddressNil(b bool)` + + SetIpAddressNil sets the value for IpAddress to be an explicit nil + +### UnsetIpAddress +`func (o *AssetServiceNow) UnsetIpAddress()` + +UnsetIpAddress ensures that no value is present for IpAddress, not even an explicit nil +### GetAddressesScope + +`func (o *AssetServiceNow) GetAddressesScope() string` + +GetAddressesScope returns the AddressesScope field if non-nil, zero value otherwise. + +### GetAddressesScopeOk + +`func (o *AssetServiceNow) GetAddressesScopeOk() (*string, bool)` + +GetAddressesScopeOk returns a tuple with the AddressesScope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressesScope + +`func (o *AssetServiceNow) SetAddressesScope(v string)` + +SetAddressesScope sets AddressesScope field to given value. + +### HasAddressesScope + +`func (o *AssetServiceNow) HasAddressesScope() bool` + +HasAddressesScope returns a boolean if a field has been set. + +### GetAddressesExtra + +`func (o *AssetServiceNow) GetAddressesExtra() string` + +GetAddressesExtra returns the AddressesExtra field if non-nil, zero value otherwise. + +### GetAddressesExtraOk + +`func (o *AssetServiceNow) GetAddressesExtraOk() (*string, bool)` + +GetAddressesExtraOk returns a tuple with the AddressesExtra field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressesExtra + +`func (o *AssetServiceNow) SetAddressesExtra(v string)` + +SetAddressesExtra sets AddressesExtra field to given value. + +### HasAddressesExtra + +`func (o *AssetServiceNow) HasAddressesExtra() bool` + +HasAddressesExtra returns a boolean if a field has been set. + +### GetMacAddress + +`func (o *AssetServiceNow) GetMacAddress() string` + +GetMacAddress returns the MacAddress field if non-nil, zero value otherwise. + +### GetMacAddressOk + +`func (o *AssetServiceNow) GetMacAddressOk() (*string, bool)` + +GetMacAddressOk returns a tuple with the MacAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacAddress + +`func (o *AssetServiceNow) SetMacAddress(v string)` + +SetMacAddress sets MacAddress field to given value. + +### HasMacAddress + +`func (o *AssetServiceNow) HasMacAddress() bool` + +HasMacAddress returns a boolean if a field has been set. + +### GetMacManufacturer + +`func (o *AssetServiceNow) GetMacManufacturer() string` + +GetMacManufacturer returns the MacManufacturer field if non-nil, zero value otherwise. + +### GetMacManufacturerOk + +`func (o *AssetServiceNow) GetMacManufacturerOk() (*string, bool)` + +GetMacManufacturerOk returns a tuple with the MacManufacturer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacManufacturer + +`func (o *AssetServiceNow) SetMacManufacturer(v string)` + +SetMacManufacturer sets MacManufacturer field to given value. + +### HasMacManufacturer + +`func (o *AssetServiceNow) HasMacManufacturer() bool` + +HasMacManufacturer returns a boolean if a field has been set. + +### GetNewestMacAge + +`func (o *AssetServiceNow) GetNewestMacAge() string` + +GetNewestMacAge returns the NewestMacAge field if non-nil, zero value otherwise. + +### GetNewestMacAgeOk + +`func (o *AssetServiceNow) GetNewestMacAgeOk() (*string, bool)` + +GetNewestMacAgeOk returns a tuple with the NewestMacAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewestMacAge + +`func (o *AssetServiceNow) SetNewestMacAge(v string)` + +SetNewestMacAge sets NewestMacAge field to given value. + +### HasNewestMacAge + +`func (o *AssetServiceNow) HasNewestMacAge() bool` + +HasNewestMacAge returns a boolean if a field has been set. + +### GetMacs + +`func (o *AssetServiceNow) GetMacs() string` + +GetMacs returns the Macs field if non-nil, zero value otherwise. + +### GetMacsOk + +`func (o *AssetServiceNow) GetMacsOk() (*string, bool)` + +GetMacsOk returns a tuple with the Macs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacs + +`func (o *AssetServiceNow) SetMacs(v string)` + +SetMacs sets Macs field to given value. + +### HasMacs + +`func (o *AssetServiceNow) HasMacs() bool` + +HasMacs returns a boolean if a field has been set. + +### GetMacVendors + +`func (o *AssetServiceNow) GetMacVendors() string` + +GetMacVendors returns the MacVendors field if non-nil, zero value otherwise. + +### GetMacVendorsOk + +`func (o *AssetServiceNow) GetMacVendorsOk() (*string, bool)` + +GetMacVendorsOk returns a tuple with the MacVendors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacVendors + +`func (o *AssetServiceNow) SetMacVendors(v string)` + +SetMacVendors sets MacVendors field to given value. + +### HasMacVendors + +`func (o *AssetServiceNow) HasMacVendors() bool` + +HasMacVendors returns a boolean if a field has been set. + +### GetName + +`func (o *AssetServiceNow) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AssetServiceNow) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AssetServiceNow) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AssetServiceNow) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTags + +`func (o *AssetServiceNow) GetTags() string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AssetServiceNow) GetTagsOk() (*string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AssetServiceNow) SetTags(v string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *AssetServiceNow) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetDomains + +`func (o *AssetServiceNow) GetDomains() string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *AssetServiceNow) GetDomainsOk() (*string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *AssetServiceNow) SetDomains(v string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *AssetServiceNow) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetServiceCount + +`func (o *AssetServiceNow) GetServiceCount() int64` + +GetServiceCount returns the ServiceCount field if non-nil, zero value otherwise. + +### GetServiceCountOk + +`func (o *AssetServiceNow) GetServiceCountOk() (*int64, bool)` + +GetServiceCountOk returns a tuple with the ServiceCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCount + +`func (o *AssetServiceNow) SetServiceCount(v int64)` + +SetServiceCount sets ServiceCount field to given value. + +### HasServiceCount + +`func (o *AssetServiceNow) HasServiceCount() bool` + +HasServiceCount returns a boolean if a field has been set. + +### GetServiceCountTcp + +`func (o *AssetServiceNow) GetServiceCountTcp() int64` + +GetServiceCountTcp returns the ServiceCountTcp field if non-nil, zero value otherwise. + +### GetServiceCountTcpOk + +`func (o *AssetServiceNow) GetServiceCountTcpOk() (*int64, bool)` + +GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountTcp + +`func (o *AssetServiceNow) SetServiceCountTcp(v int64)` + +SetServiceCountTcp sets ServiceCountTcp field to given value. + +### HasServiceCountTcp + +`func (o *AssetServiceNow) HasServiceCountTcp() bool` + +HasServiceCountTcp returns a boolean if a field has been set. + +### GetServiceCountUdp + +`func (o *AssetServiceNow) GetServiceCountUdp() int64` + +GetServiceCountUdp returns the ServiceCountUdp field if non-nil, zero value otherwise. + +### GetServiceCountUdpOk + +`func (o *AssetServiceNow) GetServiceCountUdpOk() (*int64, bool)` + +GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountUdp + +`func (o *AssetServiceNow) SetServiceCountUdp(v int64)` + +SetServiceCountUdp sets ServiceCountUdp field to given value. + +### HasServiceCountUdp + +`func (o *AssetServiceNow) HasServiceCountUdp() bool` + +HasServiceCountUdp returns a boolean if a field has been set. + +### GetServiceCountArp + +`func (o *AssetServiceNow) GetServiceCountArp() int64` + +GetServiceCountArp returns the ServiceCountArp field if non-nil, zero value otherwise. + +### GetServiceCountArpOk + +`func (o *AssetServiceNow) GetServiceCountArpOk() (*int64, bool)` + +GetServiceCountArpOk returns a tuple with the ServiceCountArp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountArp + +`func (o *AssetServiceNow) SetServiceCountArp(v int64)` + +SetServiceCountArp sets ServiceCountArp field to given value. + +### HasServiceCountArp + +`func (o *AssetServiceNow) HasServiceCountArp() bool` + +HasServiceCountArp returns a boolean if a field has been set. + +### GetServiceCountIcmp + +`func (o *AssetServiceNow) GetServiceCountIcmp() int64` + +GetServiceCountIcmp returns the ServiceCountIcmp field if non-nil, zero value otherwise. + +### GetServiceCountIcmpOk + +`func (o *AssetServiceNow) GetServiceCountIcmpOk() (*int64, bool)` + +GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountIcmp + +`func (o *AssetServiceNow) SetServiceCountIcmp(v int64)` + +SetServiceCountIcmp sets ServiceCountIcmp field to given value. + +### HasServiceCountIcmp + +`func (o *AssetServiceNow) HasServiceCountIcmp() bool` + +HasServiceCountIcmp returns a boolean if a field has been set. + +### GetLowestTtl + +`func (o *AssetServiceNow) GetLowestTtl() int64` + +GetLowestTtl returns the LowestTtl field if non-nil, zero value otherwise. + +### GetLowestTtlOk + +`func (o *AssetServiceNow) GetLowestTtlOk() (*int64, bool)` + +GetLowestTtlOk returns a tuple with the LowestTtl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLowestTtl + +`func (o *AssetServiceNow) SetLowestTtl(v int64)` + +SetLowestTtl sets LowestTtl field to given value. + +### HasLowestTtl + +`func (o *AssetServiceNow) HasLowestTtl() bool` + +HasLowestTtl returns a boolean if a field has been set. + +### GetLowestRtt + +`func (o *AssetServiceNow) GetLowestRtt() int64` + +GetLowestRtt returns the LowestRtt field if non-nil, zero value otherwise. + +### GetLowestRttOk + +`func (o *AssetServiceNow) GetLowestRttOk() (*int64, bool)` + +GetLowestRttOk returns a tuple with the LowestRtt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLowestRtt + +`func (o *AssetServiceNow) SetLowestRtt(v int64)` + +SetLowestRtt sets LowestRtt field to given value. + +### HasLowestRtt + +`func (o *AssetServiceNow) HasLowestRtt() bool` + +HasLowestRtt returns a boolean if a field has been set. + +### GetAlive + +`func (o *AssetServiceNow) GetAlive() bool` + +GetAlive returns the Alive field if non-nil, zero value otherwise. + +### GetAliveOk + +`func (o *AssetServiceNow) GetAliveOk() (*bool, bool)` + +GetAliveOk returns a tuple with the Alive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlive + +`func (o *AssetServiceNow) SetAlive(v bool)` + +SetAlive sets Alive field to given value. + +### HasAlive + +`func (o *AssetServiceNow) HasAlive() bool` + +HasAlive returns a boolean if a field has been set. + +### GetFirstDiscovered + +`func (o *AssetServiceNow) GetFirstDiscovered() string` + +GetFirstDiscovered returns the FirstDiscovered field if non-nil, zero value otherwise. + +### GetFirstDiscoveredOk + +`func (o *AssetServiceNow) GetFirstDiscoveredOk() (*string, bool)` + +GetFirstDiscoveredOk returns a tuple with the FirstDiscovered field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstDiscovered + +`func (o *AssetServiceNow) SetFirstDiscovered(v string)` + +SetFirstDiscovered sets FirstDiscovered field to given value. + +### HasFirstDiscovered + +`func (o *AssetServiceNow) HasFirstDiscovered() bool` + +HasFirstDiscovered returns a boolean if a field has been set. + +### GetLastDiscovered + +`func (o *AssetServiceNow) GetLastDiscovered() string` + +GetLastDiscovered returns the LastDiscovered field if non-nil, zero value otherwise. + +### GetLastDiscoveredOk + +`func (o *AssetServiceNow) GetLastDiscoveredOk() (*string, bool)` + +GetLastDiscoveredOk returns a tuple with the LastDiscovered field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastDiscovered + +`func (o *AssetServiceNow) SetLastDiscovered(v string)` + +SetLastDiscovered sets LastDiscovered field to given value. + +### HasLastDiscovered + +`func (o *AssetServiceNow) HasLastDiscovered() bool` + +HasLastDiscovered returns a boolean if a field has been set. + +### GetLastUpdated + +`func (o *AssetServiceNow) GetLastUpdated() string` + +GetLastUpdated returns the LastUpdated field if non-nil, zero value otherwise. + +### GetLastUpdatedOk + +`func (o *AssetServiceNow) GetLastUpdatedOk() (*string, bool)` + +GetLastUpdatedOk returns a tuple with the LastUpdated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdated + +`func (o *AssetServiceNow) SetLastUpdated(v string)` + +SetLastUpdated sets LastUpdated field to given value. + +### HasLastUpdated + +`func (o *AssetServiceNow) HasLastUpdated() bool` + +HasLastUpdated returns a boolean if a field has been set. + +### GetComments + +`func (o *AssetServiceNow) GetComments() string` + +GetComments returns the Comments field if non-nil, zero value otherwise. + +### GetCommentsOk + +`func (o *AssetServiceNow) GetCommentsOk() (*string, bool)` + +GetCommentsOk returns a tuple with the Comments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComments + +`func (o *AssetServiceNow) SetComments(v string)` + +SetComments sets Comments field to given value. + +### HasComments + +`func (o *AssetServiceNow) HasComments() bool` + +HasComments returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetTags.md b/go/docs/AssetTags.md index d6369b2..316fdb1 100644 --- a/go/docs/AssetTags.md +++ b/go/docs/AssetTags.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Tags** | Pointer to **map[string]string** | | +**Tags** | **string** | | ## Methods ### NewAssetTags -`func NewAssetTags(tags map[string]string, ) *AssetTags` +`func NewAssetTags(tags string, ) *AssetTags` NewAssetTags instantiates a new AssetTags object This constructor will assign default values to properties that have it defined, @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetTags -`func (o *AssetTags) GetTags() map[string]string` +`func (o *AssetTags) GetTags() string` GetTags returns the Tags field if non-nil, zero value otherwise. ### GetTagsOk -`func (o *AssetTags) GetTagsOk() (*map[string]string, bool)` +`func (o *AssetTags) GetTagsOk() (*string, bool)` GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTags -`func (o *AssetTags) SetTags(v map[string]string)` +`func (o *AssetTags) SetTags(v string)` SetTags sets Tags field to given value. diff --git a/go/docs/AssetTagsWithSearch.md b/go/docs/AssetTagsWithSearch.md new file mode 100644 index 0000000..4a3dbb5 --- /dev/null +++ b/go/docs/AssetTagsWithSearch.md @@ -0,0 +1,72 @@ +# AssetTagsWithSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | **string** | | +**Search** | **string** | | + +## Methods + +### NewAssetTagsWithSearch + +`func NewAssetTagsWithSearch(tags string, search string, ) *AssetTagsWithSearch` + +NewAssetTagsWithSearch instantiates a new AssetTagsWithSearch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetTagsWithSearchWithDefaults + +`func NewAssetTagsWithSearchWithDefaults() *AssetTagsWithSearch` + +NewAssetTagsWithSearchWithDefaults instantiates a new AssetTagsWithSearch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTags + +`func (o *AssetTagsWithSearch) GetTags() string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *AssetTagsWithSearch) GetTagsOk() (*string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *AssetTagsWithSearch) SetTags(v string)` + +SetTags sets Tags field to given value. + + +### GetSearch + +`func (o *AssetTagsWithSearch) GetSearch() string` + +GetSearch returns the Search field if non-nil, zero value otherwise. + +### GetSearchOk + +`func (o *AssetTagsWithSearch) GetSearchOk() (*string, bool)` + +GetSearchOk returns a tuple with the Search field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearch + +`func (o *AssetTagsWithSearch) SetSearch(v string)` + +SetSearch sets Search field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AssetsWithCheckpoint.md b/go/docs/AssetsWithCheckpoint.md index fb7bd6b..85b3367 100644 --- a/go/docs/AssetsWithCheckpoint.md +++ b/go/docs/AssetsWithCheckpoint.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Since** | Pointer to **int64** | | -**Assets** | Pointer to [**[]Asset**](Asset.md) | | +**Since** | **int64** | | +**Assets** | [**[]Asset**](Asset.md) | | ## Methods diff --git a/go/docs/AzureClientSecretCredentialFields.md b/go/docs/AzureClientSecretCredentialFields.md new file mode 100644 index 0000000..ed2998c --- /dev/null +++ b/go/docs/AzureClientSecretCredentialFields.md @@ -0,0 +1,166 @@ +# AzureClientSecretCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | | +**ClientSecret** | **string** | | +**TenantId** | **string** | | +**Environment** | **string** | | +**MultiSubscription** | Pointer to **string** | | [optional] +**SubscriptionId** | Pointer to **string** | | [optional] + +## Methods + +### NewAzureClientSecretCredentialFields + +`func NewAzureClientSecretCredentialFields(clientId string, clientSecret string, tenantId string, environment string, ) *AzureClientSecretCredentialFields` + +NewAzureClientSecretCredentialFields instantiates a new AzureClientSecretCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureClientSecretCredentialFieldsWithDefaults + +`func NewAzureClientSecretCredentialFieldsWithDefaults() *AzureClientSecretCredentialFields` + +NewAzureClientSecretCredentialFieldsWithDefaults instantiates a new AzureClientSecretCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientId + +`func (o *AzureClientSecretCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *AzureClientSecretCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *AzureClientSecretCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetClientSecret + +`func (o *AzureClientSecretCredentialFields) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *AzureClientSecretCredentialFields) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *AzureClientSecretCredentialFields) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + + +### GetTenantId + +`func (o *AzureClientSecretCredentialFields) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *AzureClientSecretCredentialFields) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *AzureClientSecretCredentialFields) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetEnvironment + +`func (o *AzureClientSecretCredentialFields) GetEnvironment() string` + +GetEnvironment returns the Environment field if non-nil, zero value otherwise. + +### GetEnvironmentOk + +`func (o *AzureClientSecretCredentialFields) GetEnvironmentOk() (*string, bool)` + +GetEnvironmentOk returns a tuple with the Environment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironment + +`func (o *AzureClientSecretCredentialFields) SetEnvironment(v string)` + +SetEnvironment sets Environment field to given value. + + +### GetMultiSubscription + +`func (o *AzureClientSecretCredentialFields) GetMultiSubscription() string` + +GetMultiSubscription returns the MultiSubscription field if non-nil, zero value otherwise. + +### GetMultiSubscriptionOk + +`func (o *AzureClientSecretCredentialFields) GetMultiSubscriptionOk() (*string, bool)` + +GetMultiSubscriptionOk returns a tuple with the MultiSubscription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMultiSubscription + +`func (o *AzureClientSecretCredentialFields) SetMultiSubscription(v string)` + +SetMultiSubscription sets MultiSubscription field to given value. + +### HasMultiSubscription + +`func (o *AzureClientSecretCredentialFields) HasMultiSubscription() bool` + +HasMultiSubscription returns a boolean if a field has been set. + +### GetSubscriptionId + +`func (o *AzureClientSecretCredentialFields) GetSubscriptionId() string` + +GetSubscriptionId returns the SubscriptionId field if non-nil, zero value otherwise. + +### GetSubscriptionIdOk + +`func (o *AzureClientSecretCredentialFields) GetSubscriptionIdOk() (*string, bool)` + +GetSubscriptionIdOk returns a tuple with the SubscriptionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionId + +`func (o *AzureClientSecretCredentialFields) SetSubscriptionId(v string)` + +SetSubscriptionId sets SubscriptionId field to given value. + +### HasSubscriptionId + +`func (o *AzureClientSecretCredentialFields) HasSubscriptionId() bool` + +HasSubscriptionId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AzureUsernamePasswordCredentialFields.md b/go/docs/AzureUsernamePasswordCredentialFields.md new file mode 100644 index 0000000..32c9934 --- /dev/null +++ b/go/docs/AzureUsernamePasswordCredentialFields.md @@ -0,0 +1,114 @@ +# AzureUsernamePasswordCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | | +**TenantId** | **string** | | +**Username** | **string** | | +**Password** | **string** | | + +## Methods + +### NewAzureUsernamePasswordCredentialFields + +`func NewAzureUsernamePasswordCredentialFields(clientId string, tenantId string, username string, password string, ) *AzureUsernamePasswordCredentialFields` + +NewAzureUsernamePasswordCredentialFields instantiates a new AzureUsernamePasswordCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureUsernamePasswordCredentialFieldsWithDefaults + +`func NewAzureUsernamePasswordCredentialFieldsWithDefaults() *AzureUsernamePasswordCredentialFields` + +NewAzureUsernamePasswordCredentialFieldsWithDefaults instantiates a new AzureUsernamePasswordCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientId + +`func (o *AzureUsernamePasswordCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *AzureUsernamePasswordCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *AzureUsernamePasswordCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetTenantId + +`func (o *AzureUsernamePasswordCredentialFields) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *AzureUsernamePasswordCredentialFields) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *AzureUsernamePasswordCredentialFields) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetUsername + +`func (o *AzureUsernamePasswordCredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *AzureUsernamePasswordCredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *AzureUsernamePasswordCredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *AzureUsernamePasswordCredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *AzureUsernamePasswordCredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *AzureUsernamePasswordCredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/BaseCustomIntegration.md b/go/docs/BaseCustomIntegration.md new file mode 100644 index 0000000..4dc1e92 --- /dev/null +++ b/go/docs/BaseCustomIntegration.md @@ -0,0 +1,108 @@ +# BaseCustomIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The unique name of the custom integration, without spaces. | [optional] +**Icon** | Pointer to **string** | Base64 encoded png with maximum size 256x256 pixels | [optional] +**Description** | Pointer to **string** | A text description of the custom integration | [optional] + +## Methods + +### NewBaseCustomIntegration + +`func NewBaseCustomIntegration() *BaseCustomIntegration` + +NewBaseCustomIntegration instantiates a new BaseCustomIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseCustomIntegrationWithDefaults + +`func NewBaseCustomIntegrationWithDefaults() *BaseCustomIntegration` + +NewBaseCustomIntegrationWithDefaults instantiates a new BaseCustomIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *BaseCustomIntegration) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseCustomIntegration) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BaseCustomIntegration) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BaseCustomIntegration) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetIcon + +`func (o *BaseCustomIntegration) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *BaseCustomIntegration) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *BaseCustomIntegration) SetIcon(v string)` + +SetIcon sets Icon field to given value. + +### HasIcon + +`func (o *BaseCustomIntegration) HasIcon() bool` + +HasIcon returns a boolean if a field has been set. + +### GetDescription + +`func (o *BaseCustomIntegration) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *BaseCustomIntegration) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *BaseCustomIntegration) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *BaseCustomIntegration) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/BaseResponse.md b/go/docs/BaseResponse.md new file mode 100644 index 0000000..bb467ec --- /dev/null +++ b/go/docs/BaseResponse.md @@ -0,0 +1,161 @@ +# BaseResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID of the object | +**ClientId** | **string** | The unique ID of the runZero client/customer account that owns the object | +**CreatedById** | **string** | The unique ID of the entity that created the object | +**CreatedAt** | **time.Time** | A timestamp indicating creation time of the object | +**UpdatedAt** | **time.Time** | A timestamp indicating last modified time of the object | +**DestroyedAt** | Pointer to **time.Time** | A timestamp indicating deletion time of the object | [optional] + +## Methods + +### NewBaseResponse + +`func NewBaseResponse(id string, clientId string, createdById string, createdAt time.Time, updatedAt time.Time, ) *BaseResponse` + +NewBaseResponse instantiates a new BaseResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseResponseWithDefaults + +`func NewBaseResponseWithDefaults() *BaseResponse` + +NewBaseResponseWithDefaults instantiates a new BaseResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseResponse) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseResponse) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BaseResponse) SetId(v string)` + +SetId sets Id field to given value. + + +### GetClientId + +`func (o *BaseResponse) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *BaseResponse) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *BaseResponse) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetCreatedById + +`func (o *BaseResponse) GetCreatedById() string` + +GetCreatedById returns the CreatedById field if non-nil, zero value otherwise. + +### GetCreatedByIdOk + +`func (o *BaseResponse) GetCreatedByIdOk() (*string, bool)` + +GetCreatedByIdOk returns a tuple with the CreatedById field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedById + +`func (o *BaseResponse) SetCreatedById(v string)` + +SetCreatedById sets CreatedById field to given value. + + +### GetCreatedAt + +`func (o *BaseResponse) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *BaseResponse) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *BaseResponse) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetUpdatedAt + +`func (o *BaseResponse) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *BaseResponse) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *BaseResponse) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetDestroyedAt + +`func (o *BaseResponse) GetDestroyedAt() time.Time` + +GetDestroyedAt returns the DestroyedAt field if non-nil, zero value otherwise. + +### GetDestroyedAtOk + +`func (o *BaseResponse) GetDestroyedAtOk() (*time.Time, bool)` + +GetDestroyedAtOk returns a tuple with the DestroyedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestroyedAt + +`func (o *BaseResponse) SetDestroyedAt(v time.Time)` + +SetDestroyedAt sets DestroyedAt field to given value. + +### HasDestroyedAt + +`func (o *BaseResponse) HasDestroyedAt() bool` + +HasDestroyedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/BulkAssetUpdateResult.md b/go/docs/BulkAssetUpdateResult.md new file mode 100644 index 0000000..5d8d811 --- /dev/null +++ b/go/docs/BulkAssetUpdateResult.md @@ -0,0 +1,56 @@ +# BulkAssetUpdateResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpdatedAssetCount** | Pointer to **int32** | | [optional] + +## Methods + +### NewBulkAssetUpdateResult + +`func NewBulkAssetUpdateResult() *BulkAssetUpdateResult` + +NewBulkAssetUpdateResult instantiates a new BulkAssetUpdateResult object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkAssetUpdateResultWithDefaults + +`func NewBulkAssetUpdateResultWithDefaults() *BulkAssetUpdateResult` + +NewBulkAssetUpdateResultWithDefaults instantiates a new BulkAssetUpdateResult object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUpdatedAssetCount + +`func (o *BulkAssetUpdateResult) GetUpdatedAssetCount() int32` + +GetUpdatedAssetCount returns the UpdatedAssetCount field if non-nil, zero value otherwise. + +### GetUpdatedAssetCountOk + +`func (o *BulkAssetUpdateResult) GetUpdatedAssetCountOk() (*int32, bool)` + +GetUpdatedAssetCountOk returns a tuple with the UpdatedAssetCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAssetCount + +`func (o *BulkAssetUpdateResult) SetUpdatedAssetCount(v int32)` + +SetUpdatedAssetCount sets UpdatedAssetCount field to given value. + +### HasUpdatedAssetCount + +`func (o *BulkAssetUpdateResult) HasUpdatedAssetCount() bool` + +HasUpdatedAssetCount returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CensysCredentialFields.md b/go/docs/CensysCredentialFields.md new file mode 100644 index 0000000..8a0c92a --- /dev/null +++ b/go/docs/CensysCredentialFields.md @@ -0,0 +1,98 @@ +# CensysCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | | +**ClientSecret** | **string** | | +**ApiUrl** | Pointer to **string** | | [optional] + +## Methods + +### NewCensysCredentialFields + +`func NewCensysCredentialFields(clientId string, clientSecret string, ) *CensysCredentialFields` + +NewCensysCredentialFields instantiates a new CensysCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCensysCredentialFieldsWithDefaults + +`func NewCensysCredentialFieldsWithDefaults() *CensysCredentialFields` + +NewCensysCredentialFieldsWithDefaults instantiates a new CensysCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientId + +`func (o *CensysCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *CensysCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *CensysCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetClientSecret + +`func (o *CensysCredentialFields) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *CensysCredentialFields) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *CensysCredentialFields) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + + +### GetApiUrl + +`func (o *CensysCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *CensysCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *CensysCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + +### HasApiUrl + +`func (o *CensysCredentialFields) HasApiUrl() bool` + +HasApiUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Certificate.md b/go/docs/Certificate.md new file mode 100644 index 0000000..4d439e1 --- /dev/null +++ b/go/docs/Certificate.md @@ -0,0 +1,982 @@ +# Certificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Type** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | When the certificate was last seen in a response from a service, and updated. | [optional] +**OrganizationId** | **string** | | +**Names** | Pointer to **[]string** | An assembled list of all names in the certificate. | [optional] +**SelfSigned** | Pointer to **bool** | Whether the certificate appears to be self-signed based on subject and authority. | [optional] +**Hidden** | Pointer to **bool** | Whether the certificate has been hidden from the default certificates view. | [optional] +**Serial** | Pointer to **string** | The serial number of the certificate. | [optional] +**ValidityStart** | Pointer to **int64** | When the certificate becomes valid. | [optional] +**ValidityEnd** | Pointer to **int64** | When the certificate ceases to be valid. | [optional] +**PublicKey** | Pointer to **string** | | [optional] +**PublicKeyBits** | Pointer to **int32** | | [optional] +**PublicKeyAlgorithm** | Pointer to **string** | | [optional] +**Signature** | Pointer to **string** | | [optional] +**SignatureAlgorithm** | Pointer to **string** | | [optional] +**FpBkhash** | Pointer to **string** | The badkeys hash. | [optional] +**FpSha1** | Pointer to **string** | The SHA1 hash of the certificate. | [optional] +**FpSha256** | Pointer to **string** | The SHA256 hash of the certificate. | [optional] +**FpMd5** | Pointer to **string** | The MD5 hash of the certificate (for SSH). | [optional] +**Subject** | Pointer to **string** | The subject of the certificate. | [optional] +**Cn** | Pointer to **string** | The Common Name field from the certificate (no longer used by web browsers). | [optional] +**Version** | Pointer to **int32** | The version of the certificate. | [optional] +**Issuer** | Pointer to **string** | The authority which issued the certificate. | [optional] +**SubjectKeyId** | Pointer to **string** | The key ID of the subject of the certificate. | [optional] +**AuthorityKeyId** | Pointer to **string** | The key ID of the authority which signed the certificate. | [optional] +**OcspServer** | Pointer to **[]string** | Zero or more OCSP server URLs. | [optional] +**CrlDistributionPoints** | Pointer to **[]string** | Zero or more URLs of CRLs. | [optional] +**IssuingCertificateUrl** | Pointer to **[]string** | Zero or more URLs where the issuing certificate can be found. | [optional] +**IsCa** | Pointer to **bool** | Whether the certificate claims to be a Certificate Authority. | [optional] +**KeyUsage** | Pointer to **[]string** | Valid purposes the certificate's key can be used for. | [optional] +**ExtKeyUsage** | Pointer to **[]string** | Additional purposes the certificate's key can be used for. | [optional] +**SanDnsNames** | Pointer to **[]string** | Subject Alternative Name hostnames. | [optional] +**SanIpAddresses** | Pointer to **[]string** | Subject Alternative Name IP addresses. | [optional] +**SanEmailAddresses** | Pointer to **[]string** | Subject Alternative Name email addresses. | [optional] +**SanUris** | Pointer to **[]string** | Subject Alternative Name URIs. | [optional] +**PublicKeyParameters** | Pointer to **map[string]interface{}** | Parameters specific to the public key type. | [optional] + +## Methods + +### NewCertificate + +`func NewCertificate(id string, organizationId string, ) *Certificate` + +NewCertificate instantiates a new Certificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateWithDefaults + +`func NewCertificateWithDefaults() *Certificate` + +NewCertificateWithDefaults instantiates a new Certificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Certificate) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Certificate) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Certificate) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *Certificate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Certificate) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Certificate) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Certificate) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Certificate) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Certificate) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Certificate) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Certificate) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Certificate) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Certificate) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Certificate) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Certificate) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *Certificate) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *Certificate) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *Certificate) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + + +### GetNames + +`func (o *Certificate) GetNames() []string` + +GetNames returns the Names field if non-nil, zero value otherwise. + +### GetNamesOk + +`func (o *Certificate) GetNamesOk() (*[]string, bool)` + +GetNamesOk returns a tuple with the Names field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNames + +`func (o *Certificate) SetNames(v []string)` + +SetNames sets Names field to given value. + +### HasNames + +`func (o *Certificate) HasNames() bool` + +HasNames returns a boolean if a field has been set. + +### GetSelfSigned + +`func (o *Certificate) GetSelfSigned() bool` + +GetSelfSigned returns the SelfSigned field if non-nil, zero value otherwise. + +### GetSelfSignedOk + +`func (o *Certificate) GetSelfSignedOk() (*bool, bool)` + +GetSelfSignedOk returns a tuple with the SelfSigned field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSelfSigned + +`func (o *Certificate) SetSelfSigned(v bool)` + +SetSelfSigned sets SelfSigned field to given value. + +### HasSelfSigned + +`func (o *Certificate) HasSelfSigned() bool` + +HasSelfSigned returns a boolean if a field has been set. + +### GetHidden + +`func (o *Certificate) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *Certificate) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *Certificate) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *Certificate) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + +### GetSerial + +`func (o *Certificate) GetSerial() string` + +GetSerial returns the Serial field if non-nil, zero value otherwise. + +### GetSerialOk + +`func (o *Certificate) GetSerialOk() (*string, bool)` + +GetSerialOk returns a tuple with the Serial field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerial + +`func (o *Certificate) SetSerial(v string)` + +SetSerial sets Serial field to given value. + +### HasSerial + +`func (o *Certificate) HasSerial() bool` + +HasSerial returns a boolean if a field has been set. + +### GetValidityStart + +`func (o *Certificate) GetValidityStart() int64` + +GetValidityStart returns the ValidityStart field if non-nil, zero value otherwise. + +### GetValidityStartOk + +`func (o *Certificate) GetValidityStartOk() (*int64, bool)` + +GetValidityStartOk returns a tuple with the ValidityStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidityStart + +`func (o *Certificate) SetValidityStart(v int64)` + +SetValidityStart sets ValidityStart field to given value. + +### HasValidityStart + +`func (o *Certificate) HasValidityStart() bool` + +HasValidityStart returns a boolean if a field has been set. + +### GetValidityEnd + +`func (o *Certificate) GetValidityEnd() int64` + +GetValidityEnd returns the ValidityEnd field if non-nil, zero value otherwise. + +### GetValidityEndOk + +`func (o *Certificate) GetValidityEndOk() (*int64, bool)` + +GetValidityEndOk returns a tuple with the ValidityEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidityEnd + +`func (o *Certificate) SetValidityEnd(v int64)` + +SetValidityEnd sets ValidityEnd field to given value. + +### HasValidityEnd + +`func (o *Certificate) HasValidityEnd() bool` + +HasValidityEnd returns a boolean if a field has been set. + +### GetPublicKey + +`func (o *Certificate) GetPublicKey() string` + +GetPublicKey returns the PublicKey field if non-nil, zero value otherwise. + +### GetPublicKeyOk + +`func (o *Certificate) GetPublicKeyOk() (*string, bool)` + +GetPublicKeyOk returns a tuple with the PublicKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicKey + +`func (o *Certificate) SetPublicKey(v string)` + +SetPublicKey sets PublicKey field to given value. + +### HasPublicKey + +`func (o *Certificate) HasPublicKey() bool` + +HasPublicKey returns a boolean if a field has been set. + +### GetPublicKeyBits + +`func (o *Certificate) GetPublicKeyBits() int32` + +GetPublicKeyBits returns the PublicKeyBits field if non-nil, zero value otherwise. + +### GetPublicKeyBitsOk + +`func (o *Certificate) GetPublicKeyBitsOk() (*int32, bool)` + +GetPublicKeyBitsOk returns a tuple with the PublicKeyBits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicKeyBits + +`func (o *Certificate) SetPublicKeyBits(v int32)` + +SetPublicKeyBits sets PublicKeyBits field to given value. + +### HasPublicKeyBits + +`func (o *Certificate) HasPublicKeyBits() bool` + +HasPublicKeyBits returns a boolean if a field has been set. + +### GetPublicKeyAlgorithm + +`func (o *Certificate) GetPublicKeyAlgorithm() string` + +GetPublicKeyAlgorithm returns the PublicKeyAlgorithm field if non-nil, zero value otherwise. + +### GetPublicKeyAlgorithmOk + +`func (o *Certificate) GetPublicKeyAlgorithmOk() (*string, bool)` + +GetPublicKeyAlgorithmOk returns a tuple with the PublicKeyAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicKeyAlgorithm + +`func (o *Certificate) SetPublicKeyAlgorithm(v string)` + +SetPublicKeyAlgorithm sets PublicKeyAlgorithm field to given value. + +### HasPublicKeyAlgorithm + +`func (o *Certificate) HasPublicKeyAlgorithm() bool` + +HasPublicKeyAlgorithm returns a boolean if a field has been set. + +### GetSignature + +`func (o *Certificate) GetSignature() string` + +GetSignature returns the Signature field if non-nil, zero value otherwise. + +### GetSignatureOk + +`func (o *Certificate) GetSignatureOk() (*string, bool)` + +GetSignatureOk returns a tuple with the Signature field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSignature + +`func (o *Certificate) SetSignature(v string)` + +SetSignature sets Signature field to given value. + +### HasSignature + +`func (o *Certificate) HasSignature() bool` + +HasSignature returns a boolean if a field has been set. + +### GetSignatureAlgorithm + +`func (o *Certificate) GetSignatureAlgorithm() string` + +GetSignatureAlgorithm returns the SignatureAlgorithm field if non-nil, zero value otherwise. + +### GetSignatureAlgorithmOk + +`func (o *Certificate) GetSignatureAlgorithmOk() (*string, bool)` + +GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSignatureAlgorithm + +`func (o *Certificate) SetSignatureAlgorithm(v string)` + +SetSignatureAlgorithm sets SignatureAlgorithm field to given value. + +### HasSignatureAlgorithm + +`func (o *Certificate) HasSignatureAlgorithm() bool` + +HasSignatureAlgorithm returns a boolean if a field has been set. + +### GetFpBkhash + +`func (o *Certificate) GetFpBkhash() string` + +GetFpBkhash returns the FpBkhash field if non-nil, zero value otherwise. + +### GetFpBkhashOk + +`func (o *Certificate) GetFpBkhashOk() (*string, bool)` + +GetFpBkhashOk returns a tuple with the FpBkhash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFpBkhash + +`func (o *Certificate) SetFpBkhash(v string)` + +SetFpBkhash sets FpBkhash field to given value. + +### HasFpBkhash + +`func (o *Certificate) HasFpBkhash() bool` + +HasFpBkhash returns a boolean if a field has been set. + +### GetFpSha1 + +`func (o *Certificate) GetFpSha1() string` + +GetFpSha1 returns the FpSha1 field if non-nil, zero value otherwise. + +### GetFpSha1Ok + +`func (o *Certificate) GetFpSha1Ok() (*string, bool)` + +GetFpSha1Ok returns a tuple with the FpSha1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFpSha1 + +`func (o *Certificate) SetFpSha1(v string)` + +SetFpSha1 sets FpSha1 field to given value. + +### HasFpSha1 + +`func (o *Certificate) HasFpSha1() bool` + +HasFpSha1 returns a boolean if a field has been set. + +### GetFpSha256 + +`func (o *Certificate) GetFpSha256() string` + +GetFpSha256 returns the FpSha256 field if non-nil, zero value otherwise. + +### GetFpSha256Ok + +`func (o *Certificate) GetFpSha256Ok() (*string, bool)` + +GetFpSha256Ok returns a tuple with the FpSha256 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFpSha256 + +`func (o *Certificate) SetFpSha256(v string)` + +SetFpSha256 sets FpSha256 field to given value. + +### HasFpSha256 + +`func (o *Certificate) HasFpSha256() bool` + +HasFpSha256 returns a boolean if a field has been set. + +### GetFpMd5 + +`func (o *Certificate) GetFpMd5() string` + +GetFpMd5 returns the FpMd5 field if non-nil, zero value otherwise. + +### GetFpMd5Ok + +`func (o *Certificate) GetFpMd5Ok() (*string, bool)` + +GetFpMd5Ok returns a tuple with the FpMd5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFpMd5 + +`func (o *Certificate) SetFpMd5(v string)` + +SetFpMd5 sets FpMd5 field to given value. + +### HasFpMd5 + +`func (o *Certificate) HasFpMd5() bool` + +HasFpMd5 returns a boolean if a field has been set. + +### GetSubject + +`func (o *Certificate) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *Certificate) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *Certificate) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *Certificate) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetCn + +`func (o *Certificate) GetCn() string` + +GetCn returns the Cn field if non-nil, zero value otherwise. + +### GetCnOk + +`func (o *Certificate) GetCnOk() (*string, bool)` + +GetCnOk returns a tuple with the Cn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCn + +`func (o *Certificate) SetCn(v string)` + +SetCn sets Cn field to given value. + +### HasCn + +`func (o *Certificate) HasCn() bool` + +HasCn returns a boolean if a field has been set. + +### GetVersion + +`func (o *Certificate) GetVersion() int32` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *Certificate) GetVersionOk() (*int32, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *Certificate) SetVersion(v int32)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *Certificate) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetIssuer + +`func (o *Certificate) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *Certificate) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *Certificate) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *Certificate) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetSubjectKeyId + +`func (o *Certificate) GetSubjectKeyId() string` + +GetSubjectKeyId returns the SubjectKeyId field if non-nil, zero value otherwise. + +### GetSubjectKeyIdOk + +`func (o *Certificate) GetSubjectKeyIdOk() (*string, bool)` + +GetSubjectKeyIdOk returns a tuple with the SubjectKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectKeyId + +`func (o *Certificate) SetSubjectKeyId(v string)` + +SetSubjectKeyId sets SubjectKeyId field to given value. + +### HasSubjectKeyId + +`func (o *Certificate) HasSubjectKeyId() bool` + +HasSubjectKeyId returns a boolean if a field has been set. + +### GetAuthorityKeyId + +`func (o *Certificate) GetAuthorityKeyId() string` + +GetAuthorityKeyId returns the AuthorityKeyId field if non-nil, zero value otherwise. + +### GetAuthorityKeyIdOk + +`func (o *Certificate) GetAuthorityKeyIdOk() (*string, bool)` + +GetAuthorityKeyIdOk returns a tuple with the AuthorityKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorityKeyId + +`func (o *Certificate) SetAuthorityKeyId(v string)` + +SetAuthorityKeyId sets AuthorityKeyId field to given value. + +### HasAuthorityKeyId + +`func (o *Certificate) HasAuthorityKeyId() bool` + +HasAuthorityKeyId returns a boolean if a field has been set. + +### GetOcspServer + +`func (o *Certificate) GetOcspServer() []string` + +GetOcspServer returns the OcspServer field if non-nil, zero value otherwise. + +### GetOcspServerOk + +`func (o *Certificate) GetOcspServerOk() (*[]string, bool)` + +GetOcspServerOk returns a tuple with the OcspServer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOcspServer + +`func (o *Certificate) SetOcspServer(v []string)` + +SetOcspServer sets OcspServer field to given value. + +### HasOcspServer + +`func (o *Certificate) HasOcspServer() bool` + +HasOcspServer returns a boolean if a field has been set. + +### GetCrlDistributionPoints + +`func (o *Certificate) GetCrlDistributionPoints() []string` + +GetCrlDistributionPoints returns the CrlDistributionPoints field if non-nil, zero value otherwise. + +### GetCrlDistributionPointsOk + +`func (o *Certificate) GetCrlDistributionPointsOk() (*[]string, bool)` + +GetCrlDistributionPointsOk returns a tuple with the CrlDistributionPoints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrlDistributionPoints + +`func (o *Certificate) SetCrlDistributionPoints(v []string)` + +SetCrlDistributionPoints sets CrlDistributionPoints field to given value. + +### HasCrlDistributionPoints + +`func (o *Certificate) HasCrlDistributionPoints() bool` + +HasCrlDistributionPoints returns a boolean if a field has been set. + +### GetIssuingCertificateUrl + +`func (o *Certificate) GetIssuingCertificateUrl() []string` + +GetIssuingCertificateUrl returns the IssuingCertificateUrl field if non-nil, zero value otherwise. + +### GetIssuingCertificateUrlOk + +`func (o *Certificate) GetIssuingCertificateUrlOk() (*[]string, bool)` + +GetIssuingCertificateUrlOk returns a tuple with the IssuingCertificateUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuingCertificateUrl + +`func (o *Certificate) SetIssuingCertificateUrl(v []string)` + +SetIssuingCertificateUrl sets IssuingCertificateUrl field to given value. + +### HasIssuingCertificateUrl + +`func (o *Certificate) HasIssuingCertificateUrl() bool` + +HasIssuingCertificateUrl returns a boolean if a field has been set. + +### GetIsCa + +`func (o *Certificate) GetIsCa() bool` + +GetIsCa returns the IsCa field if non-nil, zero value otherwise. + +### GetIsCaOk + +`func (o *Certificate) GetIsCaOk() (*bool, bool)` + +GetIsCaOk returns a tuple with the IsCa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsCa + +`func (o *Certificate) SetIsCa(v bool)` + +SetIsCa sets IsCa field to given value. + +### HasIsCa + +`func (o *Certificate) HasIsCa() bool` + +HasIsCa returns a boolean if a field has been set. + +### GetKeyUsage + +`func (o *Certificate) GetKeyUsage() []string` + +GetKeyUsage returns the KeyUsage field if non-nil, zero value otherwise. + +### GetKeyUsageOk + +`func (o *Certificate) GetKeyUsageOk() (*[]string, bool)` + +GetKeyUsageOk returns a tuple with the KeyUsage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyUsage + +`func (o *Certificate) SetKeyUsage(v []string)` + +SetKeyUsage sets KeyUsage field to given value. + +### HasKeyUsage + +`func (o *Certificate) HasKeyUsage() bool` + +HasKeyUsage returns a boolean if a field has been set. + +### GetExtKeyUsage + +`func (o *Certificate) GetExtKeyUsage() []string` + +GetExtKeyUsage returns the ExtKeyUsage field if non-nil, zero value otherwise. + +### GetExtKeyUsageOk + +`func (o *Certificate) GetExtKeyUsageOk() (*[]string, bool)` + +GetExtKeyUsageOk returns a tuple with the ExtKeyUsage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtKeyUsage + +`func (o *Certificate) SetExtKeyUsage(v []string)` + +SetExtKeyUsage sets ExtKeyUsage field to given value. + +### HasExtKeyUsage + +`func (o *Certificate) HasExtKeyUsage() bool` + +HasExtKeyUsage returns a boolean if a field has been set. + +### GetSanDnsNames + +`func (o *Certificate) GetSanDnsNames() []string` + +GetSanDnsNames returns the SanDnsNames field if non-nil, zero value otherwise. + +### GetSanDnsNamesOk + +`func (o *Certificate) GetSanDnsNamesOk() (*[]string, bool)` + +GetSanDnsNamesOk returns a tuple with the SanDnsNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSanDnsNames + +`func (o *Certificate) SetSanDnsNames(v []string)` + +SetSanDnsNames sets SanDnsNames field to given value. + +### HasSanDnsNames + +`func (o *Certificate) HasSanDnsNames() bool` + +HasSanDnsNames returns a boolean if a field has been set. + +### GetSanIpAddresses + +`func (o *Certificate) GetSanIpAddresses() []*string` + +GetSanIpAddresses returns the SanIpAddresses field if non-nil, zero value otherwise. + +### GetSanIpAddressesOk + +`func (o *Certificate) GetSanIpAddressesOk() (*[]*string, bool)` + +GetSanIpAddressesOk returns a tuple with the SanIpAddresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSanIpAddresses + +`func (o *Certificate) SetSanIpAddresses(v []*string)` + +SetSanIpAddresses sets SanIpAddresses field to given value. + +### HasSanIpAddresses + +`func (o *Certificate) HasSanIpAddresses() bool` + +HasSanIpAddresses returns a boolean if a field has been set. + +### GetSanEmailAddresses + +`func (o *Certificate) GetSanEmailAddresses() []string` + +GetSanEmailAddresses returns the SanEmailAddresses field if non-nil, zero value otherwise. + +### GetSanEmailAddressesOk + +`func (o *Certificate) GetSanEmailAddressesOk() (*[]string, bool)` + +GetSanEmailAddressesOk returns a tuple with the SanEmailAddresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSanEmailAddresses + +`func (o *Certificate) SetSanEmailAddresses(v []string)` + +SetSanEmailAddresses sets SanEmailAddresses field to given value. + +### HasSanEmailAddresses + +`func (o *Certificate) HasSanEmailAddresses() bool` + +HasSanEmailAddresses returns a boolean if a field has been set. + +### GetSanUris + +`func (o *Certificate) GetSanUris() []string` + +GetSanUris returns the SanUris field if non-nil, zero value otherwise. + +### GetSanUrisOk + +`func (o *Certificate) GetSanUrisOk() (*[]string, bool)` + +GetSanUrisOk returns a tuple with the SanUris field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSanUris + +`func (o *Certificate) SetSanUris(v []string)` + +SetSanUris sets SanUris field to given value. + +### HasSanUris + +`func (o *Certificate) HasSanUris() bool` + +HasSanUris returns a boolean if a field has been set. + +### GetPublicKeyParameters + +`func (o *Certificate) GetPublicKeyParameters() map[string]interface{}` + +GetPublicKeyParameters returns the PublicKeyParameters field if non-nil, zero value otherwise. + +### GetPublicKeyParametersOk + +`func (o *Certificate) GetPublicKeyParametersOk() (*map[string]interface{}, bool)` + +GetPublicKeyParametersOk returns a tuple with the PublicKeyParameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicKeyParameters + +`func (o *Certificate) SetPublicKeyParameters(v map[string]interface{})` + +SetPublicKeyParameters sets PublicKeyParameters field to given value. + +### HasPublicKeyParameters + +`func (o *Certificate) HasPublicKeyParameters() bool` + +HasPublicKeyParameters returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CiscoSNTCAPI.md b/go/docs/CiscoSNTCAPI.md new file mode 100644 index 0000000..916eb3a --- /dev/null +++ b/go/docs/CiscoSNTCAPI.md @@ -0,0 +1,75 @@ +# \CiscoSNTCAPI + +All URIs are relative to *https://console.runzero.com/api/v1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportAssetsCiscoCSV**](CiscoSNTCAPI.md#ExportAssetsCiscoCSV) | **Get** /export/org/assets.cisco.csv | Cisco serial number and model name export for Cisco Smart Net Total Care Service. + + + +## ExportAssetsCiscoCSV + +> *os.File ExportAssetsCiscoCSV(ctx).Oid(oid).Search(search).Execute() + +Cisco serial number and model name export for Cisco Smart Net Total Care Service. + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CiscoSNTCAPI.ExportAssetsCiscoCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CiscoSNTCAPI.ExportAssetsCiscoCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetsCiscoCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `CiscoSNTCAPI.ExportAssetsCiscoCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAssetsCiscoCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/docs/ComponentVersion.md b/go/docs/ComponentVersion.md index 116557b..27a4335 100644 --- a/go/docs/ComponentVersion.md +++ b/go/docs/ComponentVersion.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | -**Version** | Pointer to **string** | | +**Id** | **string** | | +**Version** | **string** | | ## Methods diff --git a/go/docs/Credential.md b/go/docs/Credential.md new file mode 100644 index 0000000..60de8ea --- /dev/null +++ b/go/docs/Credential.md @@ -0,0 +1,337 @@ +# Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ClientId** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | The service the credentials are for. | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**CreatedById** | Pointer to **string** | | [optional] +**CreatedByEmail** | Pointer to **string** | | [optional] +**Acl** | Pointer to **map[string]interface{}** | | [optional] +**Global** | Pointer to **bool** | | [optional] +**Cidrs** | Pointer to **[]string** | | [optional] +**LastUsedAt** | Pointer to **int64** | | [optional] +**LastUsedById** | Pointer to **string** | | [optional] + +## Methods + +### NewCredential + +`func NewCredential(id string, ) *Credential` + +NewCredential instantiates a new Credential object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialWithDefaults + +`func NewCredentialWithDefaults() *Credential` + +NewCredentialWithDefaults instantiates a new Credential object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Credential) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Credential) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Credential) SetId(v string)` + +SetId sets Id field to given value. + + +### GetClientId + +`func (o *Credential) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *Credential) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *Credential) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *Credential) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetName + +`func (o *Credential) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Credential) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Credential) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Credential) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *Credential) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Credential) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Credential) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Credential) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Credential) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Credential) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Credential) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Credential) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCreatedById + +`func (o *Credential) GetCreatedById() string` + +GetCreatedById returns the CreatedById field if non-nil, zero value otherwise. + +### GetCreatedByIdOk + +`func (o *Credential) GetCreatedByIdOk() (*string, bool)` + +GetCreatedByIdOk returns a tuple with the CreatedById field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedById + +`func (o *Credential) SetCreatedById(v string)` + +SetCreatedById sets CreatedById field to given value. + +### HasCreatedById + +`func (o *Credential) HasCreatedById() bool` + +HasCreatedById returns a boolean if a field has been set. + +### GetCreatedByEmail + +`func (o *Credential) GetCreatedByEmail() string` + +GetCreatedByEmail returns the CreatedByEmail field if non-nil, zero value otherwise. + +### GetCreatedByEmailOk + +`func (o *Credential) GetCreatedByEmailOk() (*string, bool)` + +GetCreatedByEmailOk returns a tuple with the CreatedByEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByEmail + +`func (o *Credential) SetCreatedByEmail(v string)` + +SetCreatedByEmail sets CreatedByEmail field to given value. + +### HasCreatedByEmail + +`func (o *Credential) HasCreatedByEmail() bool` + +HasCreatedByEmail returns a boolean if a field has been set. + +### GetAcl + +`func (o *Credential) GetAcl() map[string]interface{}` + +GetAcl returns the Acl field if non-nil, zero value otherwise. + +### GetAclOk + +`func (o *Credential) GetAclOk() (*map[string]interface{}, bool)` + +GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcl + +`func (o *Credential) SetAcl(v map[string]interface{})` + +SetAcl sets Acl field to given value. + +### HasAcl + +`func (o *Credential) HasAcl() bool` + +HasAcl returns a boolean if a field has been set. + +### GetGlobal + +`func (o *Credential) GetGlobal() bool` + +GetGlobal returns the Global field if non-nil, zero value otherwise. + +### GetGlobalOk + +`func (o *Credential) GetGlobalOk() (*bool, bool)` + +GetGlobalOk returns a tuple with the Global field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGlobal + +`func (o *Credential) SetGlobal(v bool)` + +SetGlobal sets Global field to given value. + +### HasGlobal + +`func (o *Credential) HasGlobal() bool` + +HasGlobal returns a boolean if a field has been set. + +### GetCidrs + +`func (o *Credential) GetCidrs() []string` + +GetCidrs returns the Cidrs field if non-nil, zero value otherwise. + +### GetCidrsOk + +`func (o *Credential) GetCidrsOk() (*[]string, bool)` + +GetCidrsOk returns a tuple with the Cidrs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidrs + +`func (o *Credential) SetCidrs(v []string)` + +SetCidrs sets Cidrs field to given value. + +### HasCidrs + +`func (o *Credential) HasCidrs() bool` + +HasCidrs returns a boolean if a field has been set. + +### GetLastUsedAt + +`func (o *Credential) GetLastUsedAt() int64` + +GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. + +### GetLastUsedAtOk + +`func (o *Credential) GetLastUsedAtOk() (*int64, bool)` + +GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsedAt + +`func (o *Credential) SetLastUsedAt(v int64)` + +SetLastUsedAt sets LastUsedAt field to given value. + +### HasLastUsedAt + +`func (o *Credential) HasLastUsedAt() bool` + +HasLastUsedAt returns a boolean if a field has been set. + +### GetLastUsedById + +`func (o *Credential) GetLastUsedById() string` + +GetLastUsedById returns the LastUsedById field if non-nil, zero value otherwise. + +### GetLastUsedByIdOk + +`func (o *Credential) GetLastUsedByIdOk() (*string, bool)` + +GetLastUsedByIdOk returns a tuple with the LastUsedById field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsedById + +`func (o *Credential) SetLastUsedById(v string)` + +SetLastUsedById sets LastUsedById field to given value. + +### HasLastUsedById + +`func (o *Credential) HasLastUsedById() bool` + +HasLastUsedById returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CredentialFields.md b/go/docs/CredentialFields.md new file mode 100644 index 0000000..c35ebf1 --- /dev/null +++ b/go/docs/CredentialFields.md @@ -0,0 +1,1116 @@ +# CredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**SecretAccessKey** | **string** | | +**Regions** | Pointer to **string** | | [optional] +**UseCrossAccountOrg** | Pointer to **string** | | [optional] +**Role** | Pointer to **string** | | [optional] +**ClientId** | **string** | | +**ClientSecret** | **string** | | +**TenantId** | **string** | | +**Environment** | **string** | | +**MultiSubscription** | Pointer to **string** | | [optional] +**SubscriptionId** | Pointer to **string** | | [optional] +**Username** | **string** | | +**Password** | **string** | | +**ApiUrl** | **string** | | +**AccessSecret** | **string** | | +**CrossProject** | Pointer to **string** | | [optional] +**AuthProviderX509CertUrl** | Pointer to **string** | | [optional] +**AuthUri** | Pointer to **string** | | [optional] +**ClientEmail** | Pointer to **string** | | [optional] +**ClientX509CertUrl** | Pointer to **string** | | [optional] +**PrivateKey** | **string** | | +**PrivateKeyId** | Pointer to **string** | | [optional] +**ProjectId** | Pointer to **string** | | [optional] +**TokenUri** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**UniverseDomain** | Pointer to **string** | | [optional] +**Delegate** | **string** | | +**CustomerId** | Pointer to **string** | | [optional] +**Insecure** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] +**Url** | **string** | | +**BaseDn** | **string** | | +**LegacyTls** | Pointer to **string** | | [optional] +**DbConnectionString** | **string** | | +**ApiKey** | **string** | | +**Hostname** | **string** | | +**SecretKey** | **string** | | +**Community** | **string** | | +**Context** | Pointer to **string** | | [optional] +**AuthProtocol** | Pointer to **string** | | [optional] +**AuthPassphrase** | Pointer to **string** | | [optional] +**PrivacyProtocol** | Pointer to **string** | | [optional] +**PrivacyPassphrase** | Pointer to **string** | | [optional] +**ApiToken** | **string** | | +**AuthUrl** | **string** | | +**X509Certificate** | **string** | | + +## Methods + +### NewCredentialFields + +`func NewCredentialFields(accessKey string, secretAccessKey string, clientId string, clientSecret string, tenantId string, environment string, username string, password string, apiUrl string, accessSecret string, privateKey string, delegate string, url string, baseDn string, dbConnectionString string, apiKey string, hostname string, secretKey string, community string, apiToken string, authUrl string, x509Certificate string, ) *CredentialFields` + +NewCredentialFields instantiates a new CredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialFieldsWithDefaults + +`func NewCredentialFieldsWithDefaults() *CredentialFields` + +NewCredentialFieldsWithDefaults instantiates a new CredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *CredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *CredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *CredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretAccessKey + +`func (o *CredentialFields) GetSecretAccessKey() string` + +GetSecretAccessKey returns the SecretAccessKey field if non-nil, zero value otherwise. + +### GetSecretAccessKeyOk + +`func (o *CredentialFields) GetSecretAccessKeyOk() (*string, bool)` + +GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretAccessKey + +`func (o *CredentialFields) SetSecretAccessKey(v string)` + +SetSecretAccessKey sets SecretAccessKey field to given value. + + +### GetRegions + +`func (o *CredentialFields) GetRegions() string` + +GetRegions returns the Regions field if non-nil, zero value otherwise. + +### GetRegionsOk + +`func (o *CredentialFields) GetRegionsOk() (*string, bool)` + +GetRegionsOk returns a tuple with the Regions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegions + +`func (o *CredentialFields) SetRegions(v string)` + +SetRegions sets Regions field to given value. + +### HasRegions + +`func (o *CredentialFields) HasRegions() bool` + +HasRegions returns a boolean if a field has been set. + +### GetUseCrossAccountOrg + +`func (o *CredentialFields) GetUseCrossAccountOrg() string` + +GetUseCrossAccountOrg returns the UseCrossAccountOrg field if non-nil, zero value otherwise. + +### GetUseCrossAccountOrgOk + +`func (o *CredentialFields) GetUseCrossAccountOrgOk() (*string, bool)` + +GetUseCrossAccountOrgOk returns a tuple with the UseCrossAccountOrg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseCrossAccountOrg + +`func (o *CredentialFields) SetUseCrossAccountOrg(v string)` + +SetUseCrossAccountOrg sets UseCrossAccountOrg field to given value. + +### HasUseCrossAccountOrg + +`func (o *CredentialFields) HasUseCrossAccountOrg() bool` + +HasUseCrossAccountOrg returns a boolean if a field has been set. + +### GetRole + +`func (o *CredentialFields) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *CredentialFields) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *CredentialFields) SetRole(v string)` + +SetRole sets Role field to given value. + +### HasRole + +`func (o *CredentialFields) HasRole() bool` + +HasRole returns a boolean if a field has been set. + +### GetClientId + +`func (o *CredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *CredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *CredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetClientSecret + +`func (o *CredentialFields) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *CredentialFields) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *CredentialFields) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + + +### GetTenantId + +`func (o *CredentialFields) GetTenantId() string` + +GetTenantId returns the TenantId field if non-nil, zero value otherwise. + +### GetTenantIdOk + +`func (o *CredentialFields) GetTenantIdOk() (*string, bool)` + +GetTenantIdOk returns a tuple with the TenantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTenantId + +`func (o *CredentialFields) SetTenantId(v string)` + +SetTenantId sets TenantId field to given value. + + +### GetEnvironment + +`func (o *CredentialFields) GetEnvironment() string` + +GetEnvironment returns the Environment field if non-nil, zero value otherwise. + +### GetEnvironmentOk + +`func (o *CredentialFields) GetEnvironmentOk() (*string, bool)` + +GetEnvironmentOk returns a tuple with the Environment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvironment + +`func (o *CredentialFields) SetEnvironment(v string)` + +SetEnvironment sets Environment field to given value. + + +### GetMultiSubscription + +`func (o *CredentialFields) GetMultiSubscription() string` + +GetMultiSubscription returns the MultiSubscription field if non-nil, zero value otherwise. + +### GetMultiSubscriptionOk + +`func (o *CredentialFields) GetMultiSubscriptionOk() (*string, bool)` + +GetMultiSubscriptionOk returns a tuple with the MultiSubscription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMultiSubscription + +`func (o *CredentialFields) SetMultiSubscription(v string)` + +SetMultiSubscription sets MultiSubscription field to given value. + +### HasMultiSubscription + +`func (o *CredentialFields) HasMultiSubscription() bool` + +HasMultiSubscription returns a boolean if a field has been set. + +### GetSubscriptionId + +`func (o *CredentialFields) GetSubscriptionId() string` + +GetSubscriptionId returns the SubscriptionId field if non-nil, zero value otherwise. + +### GetSubscriptionIdOk + +`func (o *CredentialFields) GetSubscriptionIdOk() (*string, bool)` + +GetSubscriptionIdOk returns a tuple with the SubscriptionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionId + +`func (o *CredentialFields) SetSubscriptionId(v string)` + +SetSubscriptionId sets SubscriptionId field to given value. + +### HasSubscriptionId + +`func (o *CredentialFields) HasSubscriptionId() bool` + +HasSubscriptionId returns a boolean if a field has been set. + +### GetUsername + +`func (o *CredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *CredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *CredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *CredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *CredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *CredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetApiUrl + +`func (o *CredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *CredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *CredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetAccessSecret + +`func (o *CredentialFields) GetAccessSecret() string` + +GetAccessSecret returns the AccessSecret field if non-nil, zero value otherwise. + +### GetAccessSecretOk + +`func (o *CredentialFields) GetAccessSecretOk() (*string, bool)` + +GetAccessSecretOk returns a tuple with the AccessSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessSecret + +`func (o *CredentialFields) SetAccessSecret(v string)` + +SetAccessSecret sets AccessSecret field to given value. + + +### GetCrossProject + +`func (o *CredentialFields) GetCrossProject() string` + +GetCrossProject returns the CrossProject field if non-nil, zero value otherwise. + +### GetCrossProjectOk + +`func (o *CredentialFields) GetCrossProjectOk() (*string, bool)` + +GetCrossProjectOk returns a tuple with the CrossProject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrossProject + +`func (o *CredentialFields) SetCrossProject(v string)` + +SetCrossProject sets CrossProject field to given value. + +### HasCrossProject + +`func (o *CredentialFields) HasCrossProject() bool` + +HasCrossProject returns a boolean if a field has been set. + +### GetAuthProviderX509CertUrl + +`func (o *CredentialFields) GetAuthProviderX509CertUrl() string` + +GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field if non-nil, zero value otherwise. + +### GetAuthProviderX509CertUrlOk + +`func (o *CredentialFields) GetAuthProviderX509CertUrlOk() (*string, bool)` + +GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthProviderX509CertUrl + +`func (o *CredentialFields) SetAuthProviderX509CertUrl(v string)` + +SetAuthProviderX509CertUrl sets AuthProviderX509CertUrl field to given value. + +### HasAuthProviderX509CertUrl + +`func (o *CredentialFields) HasAuthProviderX509CertUrl() bool` + +HasAuthProviderX509CertUrl returns a boolean if a field has been set. + +### GetAuthUri + +`func (o *CredentialFields) GetAuthUri() string` + +GetAuthUri returns the AuthUri field if non-nil, zero value otherwise. + +### GetAuthUriOk + +`func (o *CredentialFields) GetAuthUriOk() (*string, bool)` + +GetAuthUriOk returns a tuple with the AuthUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthUri + +`func (o *CredentialFields) SetAuthUri(v string)` + +SetAuthUri sets AuthUri field to given value. + +### HasAuthUri + +`func (o *CredentialFields) HasAuthUri() bool` + +HasAuthUri returns a boolean if a field has been set. + +### GetClientEmail + +`func (o *CredentialFields) GetClientEmail() string` + +GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. + +### GetClientEmailOk + +`func (o *CredentialFields) GetClientEmailOk() (*string, bool)` + +GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientEmail + +`func (o *CredentialFields) SetClientEmail(v string)` + +SetClientEmail sets ClientEmail field to given value. + +### HasClientEmail + +`func (o *CredentialFields) HasClientEmail() bool` + +HasClientEmail returns a boolean if a field has been set. + +### GetClientX509CertUrl + +`func (o *CredentialFields) GetClientX509CertUrl() string` + +GetClientX509CertUrl returns the ClientX509CertUrl field if non-nil, zero value otherwise. + +### GetClientX509CertUrlOk + +`func (o *CredentialFields) GetClientX509CertUrlOk() (*string, bool)` + +GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientX509CertUrl + +`func (o *CredentialFields) SetClientX509CertUrl(v string)` + +SetClientX509CertUrl sets ClientX509CertUrl field to given value. + +### HasClientX509CertUrl + +`func (o *CredentialFields) HasClientX509CertUrl() bool` + +HasClientX509CertUrl returns a boolean if a field has been set. + +### GetPrivateKey + +`func (o *CredentialFields) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *CredentialFields) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *CredentialFields) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + + +### GetPrivateKeyId + +`func (o *CredentialFields) GetPrivateKeyId() string` + +GetPrivateKeyId returns the PrivateKeyId field if non-nil, zero value otherwise. + +### GetPrivateKeyIdOk + +`func (o *CredentialFields) GetPrivateKeyIdOk() (*string, bool)` + +GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKeyId + +`func (o *CredentialFields) SetPrivateKeyId(v string)` + +SetPrivateKeyId sets PrivateKeyId field to given value. + +### HasPrivateKeyId + +`func (o *CredentialFields) HasPrivateKeyId() bool` + +HasPrivateKeyId returns a boolean if a field has been set. + +### GetProjectId + +`func (o *CredentialFields) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *CredentialFields) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *CredentialFields) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + +### HasProjectId + +`func (o *CredentialFields) HasProjectId() bool` + +HasProjectId returns a boolean if a field has been set. + +### GetTokenUri + +`func (o *CredentialFields) GetTokenUri() string` + +GetTokenUri returns the TokenUri field if non-nil, zero value otherwise. + +### GetTokenUriOk + +`func (o *CredentialFields) GetTokenUriOk() (*string, bool)` + +GetTokenUriOk returns a tuple with the TokenUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenUri + +`func (o *CredentialFields) SetTokenUri(v string)` + +SetTokenUri sets TokenUri field to given value. + +### HasTokenUri + +`func (o *CredentialFields) HasTokenUri() bool` + +HasTokenUri returns a boolean if a field has been set. + +### GetType + +`func (o *CredentialFields) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CredentialFields) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CredentialFields) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CredentialFields) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUniverseDomain + +`func (o *CredentialFields) GetUniverseDomain() string` + +GetUniverseDomain returns the UniverseDomain field if non-nil, zero value otherwise. + +### GetUniverseDomainOk + +`func (o *CredentialFields) GetUniverseDomainOk() (*string, bool)` + +GetUniverseDomainOk returns a tuple with the UniverseDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUniverseDomain + +`func (o *CredentialFields) SetUniverseDomain(v string)` + +SetUniverseDomain sets UniverseDomain field to given value. + +### HasUniverseDomain + +`func (o *CredentialFields) HasUniverseDomain() bool` + +HasUniverseDomain returns a boolean if a field has been set. + +### GetDelegate + +`func (o *CredentialFields) GetDelegate() string` + +GetDelegate returns the Delegate field if non-nil, zero value otherwise. + +### GetDelegateOk + +`func (o *CredentialFields) GetDelegateOk() (*string, bool)` + +GetDelegateOk returns a tuple with the Delegate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegate + +`func (o *CredentialFields) SetDelegate(v string)` + +SetDelegate sets Delegate field to given value. + + +### GetCustomerId + +`func (o *CredentialFields) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *CredentialFields) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *CredentialFields) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + +### HasCustomerId + +`func (o *CredentialFields) HasCustomerId() bool` + +HasCustomerId returns a boolean if a field has been set. + +### GetInsecure + +`func (o *CredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *CredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *CredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *CredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *CredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *CredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *CredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *CredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + +### GetUrl + +`func (o *CredentialFields) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *CredentialFields) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *CredentialFields) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetBaseDn + +`func (o *CredentialFields) GetBaseDn() string` + +GetBaseDn returns the BaseDn field if non-nil, zero value otherwise. + +### GetBaseDnOk + +`func (o *CredentialFields) GetBaseDnOk() (*string, bool)` + +GetBaseDnOk returns a tuple with the BaseDn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseDn + +`func (o *CredentialFields) SetBaseDn(v string)` + +SetBaseDn sets BaseDn field to given value. + + +### GetLegacyTls + +`func (o *CredentialFields) GetLegacyTls() string` + +GetLegacyTls returns the LegacyTls field if non-nil, zero value otherwise. + +### GetLegacyTlsOk + +`func (o *CredentialFields) GetLegacyTlsOk() (*string, bool)` + +GetLegacyTlsOk returns a tuple with the LegacyTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLegacyTls + +`func (o *CredentialFields) SetLegacyTls(v string)` + +SetLegacyTls sets LegacyTls field to given value. + +### HasLegacyTls + +`func (o *CredentialFields) HasLegacyTls() bool` + +HasLegacyTls returns a boolean if a field has been set. + +### GetDbConnectionString + +`func (o *CredentialFields) GetDbConnectionString() string` + +GetDbConnectionString returns the DbConnectionString field if non-nil, zero value otherwise. + +### GetDbConnectionStringOk + +`func (o *CredentialFields) GetDbConnectionStringOk() (*string, bool)` + +GetDbConnectionStringOk returns a tuple with the DbConnectionString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDbConnectionString + +`func (o *CredentialFields) SetDbConnectionString(v string)` + +SetDbConnectionString sets DbConnectionString field to given value. + + +### GetApiKey + +`func (o *CredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *CredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *CredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetHostname + +`func (o *CredentialFields) GetHostname() string` + +GetHostname returns the Hostname field if non-nil, zero value otherwise. + +### GetHostnameOk + +`func (o *CredentialFields) GetHostnameOk() (*string, bool)` + +GetHostnameOk returns a tuple with the Hostname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostname + +`func (o *CredentialFields) SetHostname(v string)` + +SetHostname sets Hostname field to given value. + + +### GetSecretKey + +`func (o *CredentialFields) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *CredentialFields) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *CredentialFields) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetCommunity + +`func (o *CredentialFields) GetCommunity() string` + +GetCommunity returns the Community field if non-nil, zero value otherwise. + +### GetCommunityOk + +`func (o *CredentialFields) GetCommunityOk() (*string, bool)` + +GetCommunityOk returns a tuple with the Community field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommunity + +`func (o *CredentialFields) SetCommunity(v string)` + +SetCommunity sets Community field to given value. + + +### GetContext + +`func (o *CredentialFields) GetContext() string` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *CredentialFields) GetContextOk() (*string, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *CredentialFields) SetContext(v string)` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *CredentialFields) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetAuthProtocol + +`func (o *CredentialFields) GetAuthProtocol() string` + +GetAuthProtocol returns the AuthProtocol field if non-nil, zero value otherwise. + +### GetAuthProtocolOk + +`func (o *CredentialFields) GetAuthProtocolOk() (*string, bool)` + +GetAuthProtocolOk returns a tuple with the AuthProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthProtocol + +`func (o *CredentialFields) SetAuthProtocol(v string)` + +SetAuthProtocol sets AuthProtocol field to given value. + +### HasAuthProtocol + +`func (o *CredentialFields) HasAuthProtocol() bool` + +HasAuthProtocol returns a boolean if a field has been set. + +### GetAuthPassphrase + +`func (o *CredentialFields) GetAuthPassphrase() string` + +GetAuthPassphrase returns the AuthPassphrase field if non-nil, zero value otherwise. + +### GetAuthPassphraseOk + +`func (o *CredentialFields) GetAuthPassphraseOk() (*string, bool)` + +GetAuthPassphraseOk returns a tuple with the AuthPassphrase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthPassphrase + +`func (o *CredentialFields) SetAuthPassphrase(v string)` + +SetAuthPassphrase sets AuthPassphrase field to given value. + +### HasAuthPassphrase + +`func (o *CredentialFields) HasAuthPassphrase() bool` + +HasAuthPassphrase returns a boolean if a field has been set. + +### GetPrivacyProtocol + +`func (o *CredentialFields) GetPrivacyProtocol() string` + +GetPrivacyProtocol returns the PrivacyProtocol field if non-nil, zero value otherwise. + +### GetPrivacyProtocolOk + +`func (o *CredentialFields) GetPrivacyProtocolOk() (*string, bool)` + +GetPrivacyProtocolOk returns a tuple with the PrivacyProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivacyProtocol + +`func (o *CredentialFields) SetPrivacyProtocol(v string)` + +SetPrivacyProtocol sets PrivacyProtocol field to given value. + +### HasPrivacyProtocol + +`func (o *CredentialFields) HasPrivacyProtocol() bool` + +HasPrivacyProtocol returns a boolean if a field has been set. + +### GetPrivacyPassphrase + +`func (o *CredentialFields) GetPrivacyPassphrase() string` + +GetPrivacyPassphrase returns the PrivacyPassphrase field if non-nil, zero value otherwise. + +### GetPrivacyPassphraseOk + +`func (o *CredentialFields) GetPrivacyPassphraseOk() (*string, bool)` + +GetPrivacyPassphraseOk returns a tuple with the PrivacyPassphrase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivacyPassphrase + +`func (o *CredentialFields) SetPrivacyPassphrase(v string)` + +SetPrivacyPassphrase sets PrivacyPassphrase field to given value. + +### HasPrivacyPassphrase + +`func (o *CredentialFields) HasPrivacyPassphrase() bool` + +HasPrivacyPassphrase returns a boolean if a field has been set. + +### GetApiToken + +`func (o *CredentialFields) GetApiToken() string` + +GetApiToken returns the ApiToken field if non-nil, zero value otherwise. + +### GetApiTokenOk + +`func (o *CredentialFields) GetApiTokenOk() (*string, bool)` + +GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiToken + +`func (o *CredentialFields) SetApiToken(v string)` + +SetApiToken sets ApiToken field to given value. + + +### GetAuthUrl + +`func (o *CredentialFields) GetAuthUrl() string` + +GetAuthUrl returns the AuthUrl field if non-nil, zero value otherwise. + +### GetAuthUrlOk + +`func (o *CredentialFields) GetAuthUrlOk() (*string, bool)` + +GetAuthUrlOk returns a tuple with the AuthUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthUrl + +`func (o *CredentialFields) SetAuthUrl(v string)` + +SetAuthUrl sets AuthUrl field to given value. + + +### GetX509Certificate + +`func (o *CredentialFields) GetX509Certificate() string` + +GetX509Certificate returns the X509Certificate field if non-nil, zero value otherwise. + +### GetX509CertificateOk + +`func (o *CredentialFields) GetX509CertificateOk() (*string, bool)` + +GetX509CertificateOk returns a tuple with the X509Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetX509Certificate + +`func (o *CredentialFields) SetX509Certificate(v string)` + +SetX509Certificate sets X509Certificate field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CredentialOptions.md b/go/docs/CredentialOptions.md new file mode 100644 index 0000000..6f39856 --- /dev/null +++ b/go/docs/CredentialOptions.md @@ -0,0 +1,186 @@ +# CredentialOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Acl** | Pointer to **map[string]interface{}** | | [optional] +**Global** | Pointer to **bool** | | [optional] +**Cidrs** | Pointer to **string** | | [optional] +**Secret** | Pointer to [**CredentialFields**](CredentialFields.md) | | [optional] + +## Methods + +### NewCredentialOptions + +`func NewCredentialOptions() *CredentialOptions` + +NewCredentialOptions instantiates a new CredentialOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialOptionsWithDefaults + +`func NewCredentialOptionsWithDefaults() *CredentialOptions` + +NewCredentialOptionsWithDefaults instantiates a new CredentialOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CredentialOptions) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CredentialOptions) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CredentialOptions) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CredentialOptions) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *CredentialOptions) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CredentialOptions) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CredentialOptions) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CredentialOptions) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAcl + +`func (o *CredentialOptions) GetAcl() map[string]interface{}` + +GetAcl returns the Acl field if non-nil, zero value otherwise. + +### GetAclOk + +`func (o *CredentialOptions) GetAclOk() (*map[string]interface{}, bool)` + +GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcl + +`func (o *CredentialOptions) SetAcl(v map[string]interface{})` + +SetAcl sets Acl field to given value. + +### HasAcl + +`func (o *CredentialOptions) HasAcl() bool` + +HasAcl returns a boolean if a field has been set. + +### GetGlobal + +`func (o *CredentialOptions) GetGlobal() bool` + +GetGlobal returns the Global field if non-nil, zero value otherwise. + +### GetGlobalOk + +`func (o *CredentialOptions) GetGlobalOk() (*bool, bool)` + +GetGlobalOk returns a tuple with the Global field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGlobal + +`func (o *CredentialOptions) SetGlobal(v bool)` + +SetGlobal sets Global field to given value. + +### HasGlobal + +`func (o *CredentialOptions) HasGlobal() bool` + +HasGlobal returns a boolean if a field has been set. + +### GetCidrs + +`func (o *CredentialOptions) GetCidrs() string` + +GetCidrs returns the Cidrs field if non-nil, zero value otherwise. + +### GetCidrsOk + +`func (o *CredentialOptions) GetCidrsOk() (*string, bool)` + +GetCidrsOk returns a tuple with the Cidrs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCidrs + +`func (o *CredentialOptions) SetCidrs(v string)` + +SetCidrs sets Cidrs field to given value. + +### HasCidrs + +`func (o *CredentialOptions) HasCidrs() bool` + +HasCidrs returns a boolean if a field has been set. + +### GetSecret + +`func (o *CredentialOptions) GetSecret() CredentialFields` + +GetSecret returns the Secret field if non-nil, zero value otherwise. + +### GetSecretOk + +`func (o *CredentialOptions) GetSecretOk() (*CredentialFields, bool)` + +GetSecretOk returns a tuple with the Secret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecret + +`func (o *CredentialOptions) SetSecret(v CredentialFields)` + +SetSecret sets Secret field to given value. + +### HasSecret + +`func (o *CredentialOptions) HasSecret() bool` + +HasSecret returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CrowdstrikeCredentialFields.md b/go/docs/CrowdstrikeCredentialFields.md new file mode 100644 index 0000000..6526937 --- /dev/null +++ b/go/docs/CrowdstrikeCredentialFields.md @@ -0,0 +1,93 @@ +# CrowdstrikeCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | | +**ClientSecret** | **string** | | +**ApiUrl** | **string** | | + +## Methods + +### NewCrowdstrikeCredentialFields + +`func NewCrowdstrikeCredentialFields(clientId string, clientSecret string, apiUrl string, ) *CrowdstrikeCredentialFields` + +NewCrowdstrikeCredentialFields instantiates a new CrowdstrikeCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCrowdstrikeCredentialFieldsWithDefaults + +`func NewCrowdstrikeCredentialFieldsWithDefaults() *CrowdstrikeCredentialFields` + +NewCrowdstrikeCredentialFieldsWithDefaults instantiates a new CrowdstrikeCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientId + +`func (o *CrowdstrikeCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *CrowdstrikeCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *CrowdstrikeCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetClientSecret + +`func (o *CrowdstrikeCredentialFields) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *CrowdstrikeCredentialFields) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *CrowdstrikeCredentialFields) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + + +### GetApiUrl + +`func (o *CrowdstrikeCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *CrowdstrikeCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *CrowdstrikeCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CustomAttributesValue.md b/go/docs/CustomAttributesValue.md new file mode 100644 index 0000000..7f6765f --- /dev/null +++ b/go/docs/CustomAttributesValue.md @@ -0,0 +1,30 @@ +# CustomAttributesValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewCustomAttributesValue + +`func NewCustomAttributesValue() *CustomAttributesValue` + +NewCustomAttributesValue instantiates a new CustomAttributesValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomAttributesValueWithDefaults + +`func NewCustomAttributesValueWithDefaults() *CustomAttributesValue` + +NewCustomAttributesValueWithDefaults instantiates a new CustomAttributesValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CustomIntegration.md b/go/docs/CustomIntegration.md new file mode 100644 index 0000000..aefe23d --- /dev/null +++ b/go/docs/CustomIntegration.md @@ -0,0 +1,234 @@ +# CustomIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The unique name of the custom integration, without spaces. | +**Icon** | Pointer to **string** | Base64 encoded png with maximum size 256x256 pixels | [optional] +**Description** | Pointer to **string** | A text description of the custom integration | [optional] +**Id** | **string** | The unique ID of the object | +**ClientId** | **string** | The unique ID of the runZero client/customer account that owns the object | +**CreatedById** | **string** | The unique ID of the entity that created the object | +**CreatedAt** | **time.Time** | A timestamp indicating creation time of the object | +**UpdatedAt** | **time.Time** | A timestamp indicating last modified time of the object | +**DestroyedAt** | Pointer to **time.Time** | A timestamp indicating deletion time of the object | [optional] + +## Methods + +### NewCustomIntegration + +`func NewCustomIntegration(name string, id string, clientId string, createdById string, createdAt time.Time, updatedAt time.Time, ) *CustomIntegration` + +NewCustomIntegration instantiates a new CustomIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomIntegrationWithDefaults + +`func NewCustomIntegrationWithDefaults() *CustomIntegration` + +NewCustomIntegrationWithDefaults instantiates a new CustomIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CustomIntegration) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CustomIntegration) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CustomIntegration) SetName(v string)` + +SetName sets Name field to given value. + + +### GetIcon + +`func (o *CustomIntegration) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *CustomIntegration) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *CustomIntegration) SetIcon(v string)` + +SetIcon sets Icon field to given value. + +### HasIcon + +`func (o *CustomIntegration) HasIcon() bool` + +HasIcon returns a boolean if a field has been set. + +### GetDescription + +`func (o *CustomIntegration) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CustomIntegration) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CustomIntegration) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CustomIntegration) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetId + +`func (o *CustomIntegration) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CustomIntegration) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CustomIntegration) SetId(v string)` + +SetId sets Id field to given value. + + +### GetClientId + +`func (o *CustomIntegration) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *CustomIntegration) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *CustomIntegration) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetCreatedById + +`func (o *CustomIntegration) GetCreatedById() string` + +GetCreatedById returns the CreatedById field if non-nil, zero value otherwise. + +### GetCreatedByIdOk + +`func (o *CustomIntegration) GetCreatedByIdOk() (*string, bool)` + +GetCreatedByIdOk returns a tuple with the CreatedById field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedById + +`func (o *CustomIntegration) SetCreatedById(v string)` + +SetCreatedById sets CreatedById field to given value. + + +### GetCreatedAt + +`func (o *CustomIntegration) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CustomIntegration) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CustomIntegration) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetUpdatedAt + +`func (o *CustomIntegration) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CustomIntegration) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CustomIntegration) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetDestroyedAt + +`func (o *CustomIntegration) GetDestroyedAt() time.Time` + +GetDestroyedAt returns the DestroyedAt field if non-nil, zero value otherwise. + +### GetDestroyedAtOk + +`func (o *CustomIntegration) GetDestroyedAtOk() (*time.Time, bool)` + +GetDestroyedAtOk returns a tuple with the DestroyedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestroyedAt + +`func (o *CustomIntegration) SetDestroyedAt(v time.Time)` + +SetDestroyedAt sets DestroyedAt field to given value. + +### HasDestroyedAt + +`func (o *CustomIntegration) HasDestroyedAt() bool` + +HasDestroyedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CustomIntegrationCreate.md b/go/docs/CustomIntegrationCreate.md new file mode 100644 index 0000000..e61c67d --- /dev/null +++ b/go/docs/CustomIntegrationCreate.md @@ -0,0 +1,103 @@ +# CustomIntegrationCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The unique name of the custom integration, without spaces. | +**Icon** | Pointer to **string** | Base64 encoded png with maximum size 256x256 pixels | [optional] +**Description** | Pointer to **string** | A text description of the custom integration | [optional] + +## Methods + +### NewCustomIntegrationCreate + +`func NewCustomIntegrationCreate(name string, ) *CustomIntegrationCreate` + +NewCustomIntegrationCreate instantiates a new CustomIntegrationCreate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomIntegrationCreateWithDefaults + +`func NewCustomIntegrationCreateWithDefaults() *CustomIntegrationCreate` + +NewCustomIntegrationCreateWithDefaults instantiates a new CustomIntegrationCreate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CustomIntegrationCreate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CustomIntegrationCreate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CustomIntegrationCreate) SetName(v string)` + +SetName sets Name field to given value. + + +### GetIcon + +`func (o *CustomIntegrationCreate) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *CustomIntegrationCreate) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *CustomIntegrationCreate) SetIcon(v string)` + +SetIcon sets Icon field to given value. + +### HasIcon + +`func (o *CustomIntegrationCreate) HasIcon() bool` + +HasIcon returns a boolean if a field has been set. + +### GetDescription + +`func (o *CustomIntegrationCreate) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CustomIntegrationCreate) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CustomIntegrationCreate) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CustomIntegrationCreate) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/CustomIntegrationScriptCredentialFields.md b/go/docs/CustomIntegrationScriptCredentialFields.md new file mode 100644 index 0000000..3ce1e9b --- /dev/null +++ b/go/docs/CustomIntegrationScriptCredentialFields.md @@ -0,0 +1,72 @@ +# CustomIntegrationScriptCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**AccessSecret** | **string** | | + +## Methods + +### NewCustomIntegrationScriptCredentialFields + +`func NewCustomIntegrationScriptCredentialFields(accessKey string, accessSecret string, ) *CustomIntegrationScriptCredentialFields` + +NewCustomIntegrationScriptCredentialFields instantiates a new CustomIntegrationScriptCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomIntegrationScriptCredentialFieldsWithDefaults + +`func NewCustomIntegrationScriptCredentialFieldsWithDefaults() *CustomIntegrationScriptCredentialFields` + +NewCustomIntegrationScriptCredentialFieldsWithDefaults instantiates a new CustomIntegrationScriptCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *CustomIntegrationScriptCredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *CustomIntegrationScriptCredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *CustomIntegrationScriptCredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetAccessSecret + +`func (o *CustomIntegrationScriptCredentialFields) GetAccessSecret() string` + +GetAccessSecret returns the AccessSecret field if non-nil, zero value otherwise. + +### GetAccessSecretOk + +`func (o *CustomIntegrationScriptCredentialFields) GetAccessSecretOk() (*string, bool)` + +GetAccessSecretOk returns a tuple with the AccessSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessSecret + +`func (o *CustomIntegrationScriptCredentialFields) SetAccessSecret(v string)` + +SetAccessSecret sets AccessSecret field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/DirectoryGroup.md b/go/docs/DirectoryGroup.md new file mode 100644 index 0000000..6ed0ec5 --- /dev/null +++ b/go/docs/DirectoryGroup.md @@ -0,0 +1,415 @@ +# DirectoryGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**DirectoryGroupId** | Pointer to **string** | | [optional] +**DirectoryGroupOrganizationId** | Pointer to **string** | | [optional] +**DirectoryGroupSiteId** | Pointer to **string** | | [optional] +**DirectoryGroupSourceId** | Pointer to **int32** | | [optional] +**DirectoryGroupCreatedAt** | Pointer to **int64** | | [optional] +**DirectoryGroupUpdatedAt** | Pointer to **int64** | | [optional] +**DirectoryGroupGroupId** | Pointer to **string** | | [optional] +**DirectoryGroupUserCount** | Pointer to **int64** | | [optional] +**DirectoryGroupName** | Pointer to **string** | | [optional] +**DirectoryGroupDisplayName** | Pointer to **string** | | [optional] +**DirectoryGroupDescription** | Pointer to **string** | | [optional] +**DirectoryGroupEmail** | Pointer to **string** | | [optional] +**DirectoryGroupEmailNormalized** | Pointer to **string** | | [optional] +**DirectoryGroupAttributes** | Pointer to **map[string]string** | | [optional] + +## Methods + +### NewDirectoryGroup + +`func NewDirectoryGroup(id string, ) *DirectoryGroup` + +NewDirectoryGroup instantiates a new DirectoryGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDirectoryGroupWithDefaults + +`func NewDirectoryGroupWithDefaults() *DirectoryGroup` + +NewDirectoryGroupWithDefaults instantiates a new DirectoryGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DirectoryGroup) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DirectoryGroup) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DirectoryGroup) SetId(v string)` + +SetId sets Id field to given value. + + +### GetDirectoryGroupId + +`func (o *DirectoryGroup) GetDirectoryGroupId() string` + +GetDirectoryGroupId returns the DirectoryGroupId field if non-nil, zero value otherwise. + +### GetDirectoryGroupIdOk + +`func (o *DirectoryGroup) GetDirectoryGroupIdOk() (*string, bool)` + +GetDirectoryGroupIdOk returns a tuple with the DirectoryGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupId + +`func (o *DirectoryGroup) SetDirectoryGroupId(v string)` + +SetDirectoryGroupId sets DirectoryGroupId field to given value. + +### HasDirectoryGroupId + +`func (o *DirectoryGroup) HasDirectoryGroupId() bool` + +HasDirectoryGroupId returns a boolean if a field has been set. + +### GetDirectoryGroupOrganizationId + +`func (o *DirectoryGroup) GetDirectoryGroupOrganizationId() string` + +GetDirectoryGroupOrganizationId returns the DirectoryGroupOrganizationId field if non-nil, zero value otherwise. + +### GetDirectoryGroupOrganizationIdOk + +`func (o *DirectoryGroup) GetDirectoryGroupOrganizationIdOk() (*string, bool)` + +GetDirectoryGroupOrganizationIdOk returns a tuple with the DirectoryGroupOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupOrganizationId + +`func (o *DirectoryGroup) SetDirectoryGroupOrganizationId(v string)` + +SetDirectoryGroupOrganizationId sets DirectoryGroupOrganizationId field to given value. + +### HasDirectoryGroupOrganizationId + +`func (o *DirectoryGroup) HasDirectoryGroupOrganizationId() bool` + +HasDirectoryGroupOrganizationId returns a boolean if a field has been set. + +### GetDirectoryGroupSiteId + +`func (o *DirectoryGroup) GetDirectoryGroupSiteId() string` + +GetDirectoryGroupSiteId returns the DirectoryGroupSiteId field if non-nil, zero value otherwise. + +### GetDirectoryGroupSiteIdOk + +`func (o *DirectoryGroup) GetDirectoryGroupSiteIdOk() (*string, bool)` + +GetDirectoryGroupSiteIdOk returns a tuple with the DirectoryGroupSiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupSiteId + +`func (o *DirectoryGroup) SetDirectoryGroupSiteId(v string)` + +SetDirectoryGroupSiteId sets DirectoryGroupSiteId field to given value. + +### HasDirectoryGroupSiteId + +`func (o *DirectoryGroup) HasDirectoryGroupSiteId() bool` + +HasDirectoryGroupSiteId returns a boolean if a field has been set. + +### GetDirectoryGroupSourceId + +`func (o *DirectoryGroup) GetDirectoryGroupSourceId() int32` + +GetDirectoryGroupSourceId returns the DirectoryGroupSourceId field if non-nil, zero value otherwise. + +### GetDirectoryGroupSourceIdOk + +`func (o *DirectoryGroup) GetDirectoryGroupSourceIdOk() (*int32, bool)` + +GetDirectoryGroupSourceIdOk returns a tuple with the DirectoryGroupSourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupSourceId + +`func (o *DirectoryGroup) SetDirectoryGroupSourceId(v int32)` + +SetDirectoryGroupSourceId sets DirectoryGroupSourceId field to given value. + +### HasDirectoryGroupSourceId + +`func (o *DirectoryGroup) HasDirectoryGroupSourceId() bool` + +HasDirectoryGroupSourceId returns a boolean if a field has been set. + +### GetDirectoryGroupCreatedAt + +`func (o *DirectoryGroup) GetDirectoryGroupCreatedAt() int64` + +GetDirectoryGroupCreatedAt returns the DirectoryGroupCreatedAt field if non-nil, zero value otherwise. + +### GetDirectoryGroupCreatedAtOk + +`func (o *DirectoryGroup) GetDirectoryGroupCreatedAtOk() (*int64, bool)` + +GetDirectoryGroupCreatedAtOk returns a tuple with the DirectoryGroupCreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupCreatedAt + +`func (o *DirectoryGroup) SetDirectoryGroupCreatedAt(v int64)` + +SetDirectoryGroupCreatedAt sets DirectoryGroupCreatedAt field to given value. + +### HasDirectoryGroupCreatedAt + +`func (o *DirectoryGroup) HasDirectoryGroupCreatedAt() bool` + +HasDirectoryGroupCreatedAt returns a boolean if a field has been set. + +### GetDirectoryGroupUpdatedAt + +`func (o *DirectoryGroup) GetDirectoryGroupUpdatedAt() int64` + +GetDirectoryGroupUpdatedAt returns the DirectoryGroupUpdatedAt field if non-nil, zero value otherwise. + +### GetDirectoryGroupUpdatedAtOk + +`func (o *DirectoryGroup) GetDirectoryGroupUpdatedAtOk() (*int64, bool)` + +GetDirectoryGroupUpdatedAtOk returns a tuple with the DirectoryGroupUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupUpdatedAt + +`func (o *DirectoryGroup) SetDirectoryGroupUpdatedAt(v int64)` + +SetDirectoryGroupUpdatedAt sets DirectoryGroupUpdatedAt field to given value. + +### HasDirectoryGroupUpdatedAt + +`func (o *DirectoryGroup) HasDirectoryGroupUpdatedAt() bool` + +HasDirectoryGroupUpdatedAt returns a boolean if a field has been set. + +### GetDirectoryGroupGroupId + +`func (o *DirectoryGroup) GetDirectoryGroupGroupId() string` + +GetDirectoryGroupGroupId returns the DirectoryGroupGroupId field if non-nil, zero value otherwise. + +### GetDirectoryGroupGroupIdOk + +`func (o *DirectoryGroup) GetDirectoryGroupGroupIdOk() (*string, bool)` + +GetDirectoryGroupGroupIdOk returns a tuple with the DirectoryGroupGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupGroupId + +`func (o *DirectoryGroup) SetDirectoryGroupGroupId(v string)` + +SetDirectoryGroupGroupId sets DirectoryGroupGroupId field to given value. + +### HasDirectoryGroupGroupId + +`func (o *DirectoryGroup) HasDirectoryGroupGroupId() bool` + +HasDirectoryGroupGroupId returns a boolean if a field has been set. + +### GetDirectoryGroupUserCount + +`func (o *DirectoryGroup) GetDirectoryGroupUserCount() int64` + +GetDirectoryGroupUserCount returns the DirectoryGroupUserCount field if non-nil, zero value otherwise. + +### GetDirectoryGroupUserCountOk + +`func (o *DirectoryGroup) GetDirectoryGroupUserCountOk() (*int64, bool)` + +GetDirectoryGroupUserCountOk returns a tuple with the DirectoryGroupUserCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupUserCount + +`func (o *DirectoryGroup) SetDirectoryGroupUserCount(v int64)` + +SetDirectoryGroupUserCount sets DirectoryGroupUserCount field to given value. + +### HasDirectoryGroupUserCount + +`func (o *DirectoryGroup) HasDirectoryGroupUserCount() bool` + +HasDirectoryGroupUserCount returns a boolean if a field has been set. + +### GetDirectoryGroupName + +`func (o *DirectoryGroup) GetDirectoryGroupName() string` + +GetDirectoryGroupName returns the DirectoryGroupName field if non-nil, zero value otherwise. + +### GetDirectoryGroupNameOk + +`func (o *DirectoryGroup) GetDirectoryGroupNameOk() (*string, bool)` + +GetDirectoryGroupNameOk returns a tuple with the DirectoryGroupName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupName + +`func (o *DirectoryGroup) SetDirectoryGroupName(v string)` + +SetDirectoryGroupName sets DirectoryGroupName field to given value. + +### HasDirectoryGroupName + +`func (o *DirectoryGroup) HasDirectoryGroupName() bool` + +HasDirectoryGroupName returns a boolean if a field has been set. + +### GetDirectoryGroupDisplayName + +`func (o *DirectoryGroup) GetDirectoryGroupDisplayName() string` + +GetDirectoryGroupDisplayName returns the DirectoryGroupDisplayName field if non-nil, zero value otherwise. + +### GetDirectoryGroupDisplayNameOk + +`func (o *DirectoryGroup) GetDirectoryGroupDisplayNameOk() (*string, bool)` + +GetDirectoryGroupDisplayNameOk returns a tuple with the DirectoryGroupDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupDisplayName + +`func (o *DirectoryGroup) SetDirectoryGroupDisplayName(v string)` + +SetDirectoryGroupDisplayName sets DirectoryGroupDisplayName field to given value. + +### HasDirectoryGroupDisplayName + +`func (o *DirectoryGroup) HasDirectoryGroupDisplayName() bool` + +HasDirectoryGroupDisplayName returns a boolean if a field has been set. + +### GetDirectoryGroupDescription + +`func (o *DirectoryGroup) GetDirectoryGroupDescription() string` + +GetDirectoryGroupDescription returns the DirectoryGroupDescription field if non-nil, zero value otherwise. + +### GetDirectoryGroupDescriptionOk + +`func (o *DirectoryGroup) GetDirectoryGroupDescriptionOk() (*string, bool)` + +GetDirectoryGroupDescriptionOk returns a tuple with the DirectoryGroupDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupDescription + +`func (o *DirectoryGroup) SetDirectoryGroupDescription(v string)` + +SetDirectoryGroupDescription sets DirectoryGroupDescription field to given value. + +### HasDirectoryGroupDescription + +`func (o *DirectoryGroup) HasDirectoryGroupDescription() bool` + +HasDirectoryGroupDescription returns a boolean if a field has been set. + +### GetDirectoryGroupEmail + +`func (o *DirectoryGroup) GetDirectoryGroupEmail() string` + +GetDirectoryGroupEmail returns the DirectoryGroupEmail field if non-nil, zero value otherwise. + +### GetDirectoryGroupEmailOk + +`func (o *DirectoryGroup) GetDirectoryGroupEmailOk() (*string, bool)` + +GetDirectoryGroupEmailOk returns a tuple with the DirectoryGroupEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupEmail + +`func (o *DirectoryGroup) SetDirectoryGroupEmail(v string)` + +SetDirectoryGroupEmail sets DirectoryGroupEmail field to given value. + +### HasDirectoryGroupEmail + +`func (o *DirectoryGroup) HasDirectoryGroupEmail() bool` + +HasDirectoryGroupEmail returns a boolean if a field has been set. + +### GetDirectoryGroupEmailNormalized + +`func (o *DirectoryGroup) GetDirectoryGroupEmailNormalized() string` + +GetDirectoryGroupEmailNormalized returns the DirectoryGroupEmailNormalized field if non-nil, zero value otherwise. + +### GetDirectoryGroupEmailNormalizedOk + +`func (o *DirectoryGroup) GetDirectoryGroupEmailNormalizedOk() (*string, bool)` + +GetDirectoryGroupEmailNormalizedOk returns a tuple with the DirectoryGroupEmailNormalized field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupEmailNormalized + +`func (o *DirectoryGroup) SetDirectoryGroupEmailNormalized(v string)` + +SetDirectoryGroupEmailNormalized sets DirectoryGroupEmailNormalized field to given value. + +### HasDirectoryGroupEmailNormalized + +`func (o *DirectoryGroup) HasDirectoryGroupEmailNormalized() bool` + +HasDirectoryGroupEmailNormalized returns a boolean if a field has been set. + +### GetDirectoryGroupAttributes + +`func (o *DirectoryGroup) GetDirectoryGroupAttributes() map[string]string` + +GetDirectoryGroupAttributes returns the DirectoryGroupAttributes field if non-nil, zero value otherwise. + +### GetDirectoryGroupAttributesOk + +`func (o *DirectoryGroup) GetDirectoryGroupAttributesOk() (*map[string]string, bool)` + +GetDirectoryGroupAttributesOk returns a tuple with the DirectoryGroupAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryGroupAttributes + +`func (o *DirectoryGroup) SetDirectoryGroupAttributes(v map[string]string)` + +SetDirectoryGroupAttributes sets DirectoryGroupAttributes field to given value. + +### HasDirectoryGroupAttributes + +`func (o *DirectoryGroup) HasDirectoryGroupAttributes() bool` + +HasDirectoryGroupAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/DirectoryUser.md b/go/docs/DirectoryUser.md new file mode 100644 index 0000000..de62605 --- /dev/null +++ b/go/docs/DirectoryUser.md @@ -0,0 +1,571 @@ +# DirectoryUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**DirectoryUserId** | Pointer to **string** | | [optional] +**DirectoryUserOrganizationId** | Pointer to **string** | | [optional] +**DirectoryUserSiteId** | Pointer to **string** | | [optional] +**DirectoryUserSourceId** | Pointer to **int32** | | [optional] +**DirectoryUserCreatedAt** | Pointer to **int64** | | [optional] +**DirectoryUserUpdatedAt** | Pointer to **int64** | | [optional] +**DirectoryUserUserId** | Pointer to **string** | | [optional] +**DirectoryUserGroupIds** | Pointer to **[]string** | | [optional] +**DirectoryUserDisplayName** | Pointer to **string** | | [optional] +**DirectoryUserName** | Pointer to **string** | | [optional] +**DirectoryUserFirstName** | Pointer to **string** | | [optional] +**DirectoryUserLastName** | Pointer to **string** | | [optional] +**DirectoryUserDescription** | Pointer to **string** | | [optional] +**DirectoryUserEmail** | Pointer to **string** | | [optional] +**DirectoryUserEmailNormalized** | Pointer to **string** | | [optional] +**DirectoryUserPhone** | Pointer to **string** | | [optional] +**DirectoryUserTitle** | Pointer to **string** | | [optional] +**DirectoryUserLocation** | Pointer to **string** | | [optional] +**DirectoryUserLastLogonAt** | Pointer to **int64** | | [optional] +**DirectoryUserAttributes** | Pointer to **map[string]string** | | [optional] + +## Methods + +### NewDirectoryUser + +`func NewDirectoryUser(id string, ) *DirectoryUser` + +NewDirectoryUser instantiates a new DirectoryUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDirectoryUserWithDefaults + +`func NewDirectoryUserWithDefaults() *DirectoryUser` + +NewDirectoryUserWithDefaults instantiates a new DirectoryUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DirectoryUser) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DirectoryUser) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DirectoryUser) SetId(v string)` + +SetId sets Id field to given value. + + +### GetDirectoryUserId + +`func (o *DirectoryUser) GetDirectoryUserId() string` + +GetDirectoryUserId returns the DirectoryUserId field if non-nil, zero value otherwise. + +### GetDirectoryUserIdOk + +`func (o *DirectoryUser) GetDirectoryUserIdOk() (*string, bool)` + +GetDirectoryUserIdOk returns a tuple with the DirectoryUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserId + +`func (o *DirectoryUser) SetDirectoryUserId(v string)` + +SetDirectoryUserId sets DirectoryUserId field to given value. + +### HasDirectoryUserId + +`func (o *DirectoryUser) HasDirectoryUserId() bool` + +HasDirectoryUserId returns a boolean if a field has been set. + +### GetDirectoryUserOrganizationId + +`func (o *DirectoryUser) GetDirectoryUserOrganizationId() string` + +GetDirectoryUserOrganizationId returns the DirectoryUserOrganizationId field if non-nil, zero value otherwise. + +### GetDirectoryUserOrganizationIdOk + +`func (o *DirectoryUser) GetDirectoryUserOrganizationIdOk() (*string, bool)` + +GetDirectoryUserOrganizationIdOk returns a tuple with the DirectoryUserOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserOrganizationId + +`func (o *DirectoryUser) SetDirectoryUserOrganizationId(v string)` + +SetDirectoryUserOrganizationId sets DirectoryUserOrganizationId field to given value. + +### HasDirectoryUserOrganizationId + +`func (o *DirectoryUser) HasDirectoryUserOrganizationId() bool` + +HasDirectoryUserOrganizationId returns a boolean if a field has been set. + +### GetDirectoryUserSiteId + +`func (o *DirectoryUser) GetDirectoryUserSiteId() string` + +GetDirectoryUserSiteId returns the DirectoryUserSiteId field if non-nil, zero value otherwise. + +### GetDirectoryUserSiteIdOk + +`func (o *DirectoryUser) GetDirectoryUserSiteIdOk() (*string, bool)` + +GetDirectoryUserSiteIdOk returns a tuple with the DirectoryUserSiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserSiteId + +`func (o *DirectoryUser) SetDirectoryUserSiteId(v string)` + +SetDirectoryUserSiteId sets DirectoryUserSiteId field to given value. + +### HasDirectoryUserSiteId + +`func (o *DirectoryUser) HasDirectoryUserSiteId() bool` + +HasDirectoryUserSiteId returns a boolean if a field has been set. + +### GetDirectoryUserSourceId + +`func (o *DirectoryUser) GetDirectoryUserSourceId() int32` + +GetDirectoryUserSourceId returns the DirectoryUserSourceId field if non-nil, zero value otherwise. + +### GetDirectoryUserSourceIdOk + +`func (o *DirectoryUser) GetDirectoryUserSourceIdOk() (*int32, bool)` + +GetDirectoryUserSourceIdOk returns a tuple with the DirectoryUserSourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserSourceId + +`func (o *DirectoryUser) SetDirectoryUserSourceId(v int32)` + +SetDirectoryUserSourceId sets DirectoryUserSourceId field to given value. + +### HasDirectoryUserSourceId + +`func (o *DirectoryUser) HasDirectoryUserSourceId() bool` + +HasDirectoryUserSourceId returns a boolean if a field has been set. + +### GetDirectoryUserCreatedAt + +`func (o *DirectoryUser) GetDirectoryUserCreatedAt() int64` + +GetDirectoryUserCreatedAt returns the DirectoryUserCreatedAt field if non-nil, zero value otherwise. + +### GetDirectoryUserCreatedAtOk + +`func (o *DirectoryUser) GetDirectoryUserCreatedAtOk() (*int64, bool)` + +GetDirectoryUserCreatedAtOk returns a tuple with the DirectoryUserCreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserCreatedAt + +`func (o *DirectoryUser) SetDirectoryUserCreatedAt(v int64)` + +SetDirectoryUserCreatedAt sets DirectoryUserCreatedAt field to given value. + +### HasDirectoryUserCreatedAt + +`func (o *DirectoryUser) HasDirectoryUserCreatedAt() bool` + +HasDirectoryUserCreatedAt returns a boolean if a field has been set. + +### GetDirectoryUserUpdatedAt + +`func (o *DirectoryUser) GetDirectoryUserUpdatedAt() int64` + +GetDirectoryUserUpdatedAt returns the DirectoryUserUpdatedAt field if non-nil, zero value otherwise. + +### GetDirectoryUserUpdatedAtOk + +`func (o *DirectoryUser) GetDirectoryUserUpdatedAtOk() (*int64, bool)` + +GetDirectoryUserUpdatedAtOk returns a tuple with the DirectoryUserUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserUpdatedAt + +`func (o *DirectoryUser) SetDirectoryUserUpdatedAt(v int64)` + +SetDirectoryUserUpdatedAt sets DirectoryUserUpdatedAt field to given value. + +### HasDirectoryUserUpdatedAt + +`func (o *DirectoryUser) HasDirectoryUserUpdatedAt() bool` + +HasDirectoryUserUpdatedAt returns a boolean if a field has been set. + +### GetDirectoryUserUserId + +`func (o *DirectoryUser) GetDirectoryUserUserId() string` + +GetDirectoryUserUserId returns the DirectoryUserUserId field if non-nil, zero value otherwise. + +### GetDirectoryUserUserIdOk + +`func (o *DirectoryUser) GetDirectoryUserUserIdOk() (*string, bool)` + +GetDirectoryUserUserIdOk returns a tuple with the DirectoryUserUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserUserId + +`func (o *DirectoryUser) SetDirectoryUserUserId(v string)` + +SetDirectoryUserUserId sets DirectoryUserUserId field to given value. + +### HasDirectoryUserUserId + +`func (o *DirectoryUser) HasDirectoryUserUserId() bool` + +HasDirectoryUserUserId returns a boolean if a field has been set. + +### GetDirectoryUserGroupIds + +`func (o *DirectoryUser) GetDirectoryUserGroupIds() []string` + +GetDirectoryUserGroupIds returns the DirectoryUserGroupIds field if non-nil, zero value otherwise. + +### GetDirectoryUserGroupIdsOk + +`func (o *DirectoryUser) GetDirectoryUserGroupIdsOk() (*[]string, bool)` + +GetDirectoryUserGroupIdsOk returns a tuple with the DirectoryUserGroupIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserGroupIds + +`func (o *DirectoryUser) SetDirectoryUserGroupIds(v []string)` + +SetDirectoryUserGroupIds sets DirectoryUserGroupIds field to given value. + +### HasDirectoryUserGroupIds + +`func (o *DirectoryUser) HasDirectoryUserGroupIds() bool` + +HasDirectoryUserGroupIds returns a boolean if a field has been set. + +### GetDirectoryUserDisplayName + +`func (o *DirectoryUser) GetDirectoryUserDisplayName() string` + +GetDirectoryUserDisplayName returns the DirectoryUserDisplayName field if non-nil, zero value otherwise. + +### GetDirectoryUserDisplayNameOk + +`func (o *DirectoryUser) GetDirectoryUserDisplayNameOk() (*string, bool)` + +GetDirectoryUserDisplayNameOk returns a tuple with the DirectoryUserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserDisplayName + +`func (o *DirectoryUser) SetDirectoryUserDisplayName(v string)` + +SetDirectoryUserDisplayName sets DirectoryUserDisplayName field to given value. + +### HasDirectoryUserDisplayName + +`func (o *DirectoryUser) HasDirectoryUserDisplayName() bool` + +HasDirectoryUserDisplayName returns a boolean if a field has been set. + +### GetDirectoryUserName + +`func (o *DirectoryUser) GetDirectoryUserName() string` + +GetDirectoryUserName returns the DirectoryUserName field if non-nil, zero value otherwise. + +### GetDirectoryUserNameOk + +`func (o *DirectoryUser) GetDirectoryUserNameOk() (*string, bool)` + +GetDirectoryUserNameOk returns a tuple with the DirectoryUserName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserName + +`func (o *DirectoryUser) SetDirectoryUserName(v string)` + +SetDirectoryUserName sets DirectoryUserName field to given value. + +### HasDirectoryUserName + +`func (o *DirectoryUser) HasDirectoryUserName() bool` + +HasDirectoryUserName returns a boolean if a field has been set. + +### GetDirectoryUserFirstName + +`func (o *DirectoryUser) GetDirectoryUserFirstName() string` + +GetDirectoryUserFirstName returns the DirectoryUserFirstName field if non-nil, zero value otherwise. + +### GetDirectoryUserFirstNameOk + +`func (o *DirectoryUser) GetDirectoryUserFirstNameOk() (*string, bool)` + +GetDirectoryUserFirstNameOk returns a tuple with the DirectoryUserFirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserFirstName + +`func (o *DirectoryUser) SetDirectoryUserFirstName(v string)` + +SetDirectoryUserFirstName sets DirectoryUserFirstName field to given value. + +### HasDirectoryUserFirstName + +`func (o *DirectoryUser) HasDirectoryUserFirstName() bool` + +HasDirectoryUserFirstName returns a boolean if a field has been set. + +### GetDirectoryUserLastName + +`func (o *DirectoryUser) GetDirectoryUserLastName() string` + +GetDirectoryUserLastName returns the DirectoryUserLastName field if non-nil, zero value otherwise. + +### GetDirectoryUserLastNameOk + +`func (o *DirectoryUser) GetDirectoryUserLastNameOk() (*string, bool)` + +GetDirectoryUserLastNameOk returns a tuple with the DirectoryUserLastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserLastName + +`func (o *DirectoryUser) SetDirectoryUserLastName(v string)` + +SetDirectoryUserLastName sets DirectoryUserLastName field to given value. + +### HasDirectoryUserLastName + +`func (o *DirectoryUser) HasDirectoryUserLastName() bool` + +HasDirectoryUserLastName returns a boolean if a field has been set. + +### GetDirectoryUserDescription + +`func (o *DirectoryUser) GetDirectoryUserDescription() string` + +GetDirectoryUserDescription returns the DirectoryUserDescription field if non-nil, zero value otherwise. + +### GetDirectoryUserDescriptionOk + +`func (o *DirectoryUser) GetDirectoryUserDescriptionOk() (*string, bool)` + +GetDirectoryUserDescriptionOk returns a tuple with the DirectoryUserDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserDescription + +`func (o *DirectoryUser) SetDirectoryUserDescription(v string)` + +SetDirectoryUserDescription sets DirectoryUserDescription field to given value. + +### HasDirectoryUserDescription + +`func (o *DirectoryUser) HasDirectoryUserDescription() bool` + +HasDirectoryUserDescription returns a boolean if a field has been set. + +### GetDirectoryUserEmail + +`func (o *DirectoryUser) GetDirectoryUserEmail() string` + +GetDirectoryUserEmail returns the DirectoryUserEmail field if non-nil, zero value otherwise. + +### GetDirectoryUserEmailOk + +`func (o *DirectoryUser) GetDirectoryUserEmailOk() (*string, bool)` + +GetDirectoryUserEmailOk returns a tuple with the DirectoryUserEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserEmail + +`func (o *DirectoryUser) SetDirectoryUserEmail(v string)` + +SetDirectoryUserEmail sets DirectoryUserEmail field to given value. + +### HasDirectoryUserEmail + +`func (o *DirectoryUser) HasDirectoryUserEmail() bool` + +HasDirectoryUserEmail returns a boolean if a field has been set. + +### GetDirectoryUserEmailNormalized + +`func (o *DirectoryUser) GetDirectoryUserEmailNormalized() string` + +GetDirectoryUserEmailNormalized returns the DirectoryUserEmailNormalized field if non-nil, zero value otherwise. + +### GetDirectoryUserEmailNormalizedOk + +`func (o *DirectoryUser) GetDirectoryUserEmailNormalizedOk() (*string, bool)` + +GetDirectoryUserEmailNormalizedOk returns a tuple with the DirectoryUserEmailNormalized field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserEmailNormalized + +`func (o *DirectoryUser) SetDirectoryUserEmailNormalized(v string)` + +SetDirectoryUserEmailNormalized sets DirectoryUserEmailNormalized field to given value. + +### HasDirectoryUserEmailNormalized + +`func (o *DirectoryUser) HasDirectoryUserEmailNormalized() bool` + +HasDirectoryUserEmailNormalized returns a boolean if a field has been set. + +### GetDirectoryUserPhone + +`func (o *DirectoryUser) GetDirectoryUserPhone() string` + +GetDirectoryUserPhone returns the DirectoryUserPhone field if non-nil, zero value otherwise. + +### GetDirectoryUserPhoneOk + +`func (o *DirectoryUser) GetDirectoryUserPhoneOk() (*string, bool)` + +GetDirectoryUserPhoneOk returns a tuple with the DirectoryUserPhone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserPhone + +`func (o *DirectoryUser) SetDirectoryUserPhone(v string)` + +SetDirectoryUserPhone sets DirectoryUserPhone field to given value. + +### HasDirectoryUserPhone + +`func (o *DirectoryUser) HasDirectoryUserPhone() bool` + +HasDirectoryUserPhone returns a boolean if a field has been set. + +### GetDirectoryUserTitle + +`func (o *DirectoryUser) GetDirectoryUserTitle() string` + +GetDirectoryUserTitle returns the DirectoryUserTitle field if non-nil, zero value otherwise. + +### GetDirectoryUserTitleOk + +`func (o *DirectoryUser) GetDirectoryUserTitleOk() (*string, bool)` + +GetDirectoryUserTitleOk returns a tuple with the DirectoryUserTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserTitle + +`func (o *DirectoryUser) SetDirectoryUserTitle(v string)` + +SetDirectoryUserTitle sets DirectoryUserTitle field to given value. + +### HasDirectoryUserTitle + +`func (o *DirectoryUser) HasDirectoryUserTitle() bool` + +HasDirectoryUserTitle returns a boolean if a field has been set. + +### GetDirectoryUserLocation + +`func (o *DirectoryUser) GetDirectoryUserLocation() string` + +GetDirectoryUserLocation returns the DirectoryUserLocation field if non-nil, zero value otherwise. + +### GetDirectoryUserLocationOk + +`func (o *DirectoryUser) GetDirectoryUserLocationOk() (*string, bool)` + +GetDirectoryUserLocationOk returns a tuple with the DirectoryUserLocation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserLocation + +`func (o *DirectoryUser) SetDirectoryUserLocation(v string)` + +SetDirectoryUserLocation sets DirectoryUserLocation field to given value. + +### HasDirectoryUserLocation + +`func (o *DirectoryUser) HasDirectoryUserLocation() bool` + +HasDirectoryUserLocation returns a boolean if a field has been set. + +### GetDirectoryUserLastLogonAt + +`func (o *DirectoryUser) GetDirectoryUserLastLogonAt() int64` + +GetDirectoryUserLastLogonAt returns the DirectoryUserLastLogonAt field if non-nil, zero value otherwise. + +### GetDirectoryUserLastLogonAtOk + +`func (o *DirectoryUser) GetDirectoryUserLastLogonAtOk() (*int64, bool)` + +GetDirectoryUserLastLogonAtOk returns a tuple with the DirectoryUserLastLogonAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserLastLogonAt + +`func (o *DirectoryUser) SetDirectoryUserLastLogonAt(v int64)` + +SetDirectoryUserLastLogonAt sets DirectoryUserLastLogonAt field to given value. + +### HasDirectoryUserLastLogonAt + +`func (o *DirectoryUser) HasDirectoryUserLastLogonAt() bool` + +HasDirectoryUserLastLogonAt returns a boolean if a field has been set. + +### GetDirectoryUserAttributes + +`func (o *DirectoryUser) GetDirectoryUserAttributes() map[string]string` + +GetDirectoryUserAttributes returns the DirectoryUserAttributes field if non-nil, zero value otherwise. + +### GetDirectoryUserAttributesOk + +`func (o *DirectoryUser) GetDirectoryUserAttributesOk() (*map[string]string, bool)` + +GetDirectoryUserAttributesOk returns a tuple with the DirectoryUserAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryUserAttributes + +`func (o *DirectoryUser) SetDirectoryUserAttributes(v map[string]string)` + +SetDirectoryUserAttributes sets DirectoryUserAttributes field to given value. + +### HasDirectoryUserAttributes + +`func (o *DirectoryUser) HasDirectoryUserAttributes() bool` + +HasDirectoryUserAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Event.md b/go/docs/Event.md new file mode 100644 index 0000000..2fc394c --- /dev/null +++ b/go/docs/Event.md @@ -0,0 +1,472 @@ +# Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**ClientId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**SiteId** | Pointer to **string** | | [optional] +**Action** | Pointer to **string** | | [optional] +**SourceId** | Pointer to **string** | | [optional] +**SourceName** | Pointer to **string** | | [optional] +**SourceType** | Pointer to **string** | | [optional] +**TargetId** | Pointer to **string** | | [optional] +**TargetName** | Pointer to **string** | | [optional] +**TargetType** | Pointer to **string** | | [optional] +**Success** | Pointer to **bool** | | [optional] +**Details** | Pointer to **map[string]interface{}** | | [optional] +**State** | Pointer to **string** | | [optional] +**ProcessorId** | Pointer to **string** | | [optional] +**ProcessedAt** | Pointer to **int64** | | [optional] + +## Methods + +### NewEvent + +`func NewEvent() *Event` + +NewEvent instantiates a new Event object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventWithDefaults + +`func NewEventWithDefaults() *Event` + +NewEventWithDefaults instantiates a new Event object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Event) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Event) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Event) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Event) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Event) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Event) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Event) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Event) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetClientId + +`func (o *Event) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *Event) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *Event) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *Event) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *Event) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *Event) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *Event) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *Event) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetSiteId + +`func (o *Event) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *Event) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *Event) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *Event) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetAction + +`func (o *Event) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *Event) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *Event) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *Event) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetSourceId + +`func (o *Event) GetSourceId() string` + +GetSourceId returns the SourceId field if non-nil, zero value otherwise. + +### GetSourceIdOk + +`func (o *Event) GetSourceIdOk() (*string, bool)` + +GetSourceIdOk returns a tuple with the SourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceId + +`func (o *Event) SetSourceId(v string)` + +SetSourceId sets SourceId field to given value. + +### HasSourceId + +`func (o *Event) HasSourceId() bool` + +HasSourceId returns a boolean if a field has been set. + +### GetSourceName + +`func (o *Event) GetSourceName() string` + +GetSourceName returns the SourceName field if non-nil, zero value otherwise. + +### GetSourceNameOk + +`func (o *Event) GetSourceNameOk() (*string, bool)` + +GetSourceNameOk returns a tuple with the SourceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceName + +`func (o *Event) SetSourceName(v string)` + +SetSourceName sets SourceName field to given value. + +### HasSourceName + +`func (o *Event) HasSourceName() bool` + +HasSourceName returns a boolean if a field has been set. + +### GetSourceType + +`func (o *Event) GetSourceType() string` + +GetSourceType returns the SourceType field if non-nil, zero value otherwise. + +### GetSourceTypeOk + +`func (o *Event) GetSourceTypeOk() (*string, bool)` + +GetSourceTypeOk returns a tuple with the SourceType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceType + +`func (o *Event) SetSourceType(v string)` + +SetSourceType sets SourceType field to given value. + +### HasSourceType + +`func (o *Event) HasSourceType() bool` + +HasSourceType returns a boolean if a field has been set. + +### GetTargetId + +`func (o *Event) GetTargetId() string` + +GetTargetId returns the TargetId field if non-nil, zero value otherwise. + +### GetTargetIdOk + +`func (o *Event) GetTargetIdOk() (*string, bool)` + +GetTargetIdOk returns a tuple with the TargetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetId + +`func (o *Event) SetTargetId(v string)` + +SetTargetId sets TargetId field to given value. + +### HasTargetId + +`func (o *Event) HasTargetId() bool` + +HasTargetId returns a boolean if a field has been set. + +### GetTargetName + +`func (o *Event) GetTargetName() string` + +GetTargetName returns the TargetName field if non-nil, zero value otherwise. + +### GetTargetNameOk + +`func (o *Event) GetTargetNameOk() (*string, bool)` + +GetTargetNameOk returns a tuple with the TargetName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetName + +`func (o *Event) SetTargetName(v string)` + +SetTargetName sets TargetName field to given value. + +### HasTargetName + +`func (o *Event) HasTargetName() bool` + +HasTargetName returns a boolean if a field has been set. + +### GetTargetType + +`func (o *Event) GetTargetType() string` + +GetTargetType returns the TargetType field if non-nil, zero value otherwise. + +### GetTargetTypeOk + +`func (o *Event) GetTargetTypeOk() (*string, bool)` + +GetTargetTypeOk returns a tuple with the TargetType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetType + +`func (o *Event) SetTargetType(v string)` + +SetTargetType sets TargetType field to given value. + +### HasTargetType + +`func (o *Event) HasTargetType() bool` + +HasTargetType returns a boolean if a field has been set. + +### GetSuccess + +`func (o *Event) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *Event) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *Event) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *Event) HasSuccess() bool` + +HasSuccess returns a boolean if a field has been set. + +### GetDetails + +`func (o *Event) GetDetails() map[string]interface{}` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *Event) GetDetailsOk() (*map[string]interface{}, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *Event) SetDetails(v map[string]interface{})` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *Event) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetState + +`func (o *Event) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *Event) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *Event) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *Event) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetProcessorId + +`func (o *Event) GetProcessorId() string` + +GetProcessorId returns the ProcessorId field if non-nil, zero value otherwise. + +### GetProcessorIdOk + +`func (o *Event) GetProcessorIdOk() (*string, bool)` + +GetProcessorIdOk returns a tuple with the ProcessorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProcessorId + +`func (o *Event) SetProcessorId(v string)` + +SetProcessorId sets ProcessorId field to given value. + +### HasProcessorId + +`func (o *Event) HasProcessorId() bool` + +HasProcessorId returns a boolean if a field has been set. + +### GetProcessedAt + +`func (o *Event) GetProcessedAt() int64` + +GetProcessedAt returns the ProcessedAt field if non-nil, zero value otherwise. + +### GetProcessedAtOk + +`func (o *Event) GetProcessedAtOk() (*int64, bool)` + +GetProcessedAtOk returns a tuple with the ProcessedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProcessedAt + +`func (o *Event) SetProcessedAt(v int64)` + +SetProcessedAt sets ProcessedAt field to given value. + +### HasProcessedAt + +`func (o *Event) HasProcessedAt() bool` + +HasProcessedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/EventExportResponse.md b/go/docs/EventExportResponse.md new file mode 100644 index 0000000..455bd92 --- /dev/null +++ b/go/docs/EventExportResponse.md @@ -0,0 +1,82 @@ +# EventExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | Pointer to [**[]Event**](Event.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewEventExportResponse + +`func NewEventExportResponse() *EventExportResponse` + +NewEventExportResponse instantiates a new EventExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventExportResponseWithDefaults + +`func NewEventExportResponseWithDefaults() *EventExportResponse` + +NewEventExportResponseWithDefaults instantiates a new EventExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEvents + +`func (o *EventExportResponse) GetEvents() []Event` + +GetEvents returns the Events field if non-nil, zero value otherwise. + +### GetEventsOk + +`func (o *EventExportResponse) GetEventsOk() (*[]Event, bool)` + +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvents + +`func (o *EventExportResponse) SetEvents(v []Event)` + +SetEvents sets Events field to given value. + +### HasEvents + +`func (o *EventExportResponse) HasEvents() bool` + +HasEvents returns a boolean if a field has been set. + +### GetNextKey + +`func (o *EventExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *EventExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *EventExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *EventExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/EventPage.md b/go/docs/EventPage.md new file mode 100644 index 0000000..d8f3424 --- /dev/null +++ b/go/docs/EventPage.md @@ -0,0 +1,82 @@ +# EventPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | Pointer to [**[]Event**](Event.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewEventPage + +`func NewEventPage() *EventPage` + +NewEventPage instantiates a new EventPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventPageWithDefaults + +`func NewEventPageWithDefaults() *EventPage` + +NewEventPageWithDefaults instantiates a new EventPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEvents + +`func (o *EventPage) GetEvents() []Event` + +GetEvents returns the Events field if non-nil, zero value otherwise. + +### GetEventsOk + +`func (o *EventPage) GetEventsOk() (*[]Event, bool)` + +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvents + +`func (o *EventPage) SetEvents(v []Event)` + +SetEvents sets Events field to given value. + +### HasEvents + +`func (o *EventPage) HasEvents() bool` + +HasEvents returns a boolean if a field has been set. + +### GetNextKey + +`func (o *EventPage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *EventPage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *EventPage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *EventPage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ExportAPI.md b/go/docs/ExportAPI.md index 0edf6c7..79d013c 100644 --- a/go/docs/ExportAPI.md +++ b/go/docs/ExportAPI.md @@ -1,32 +1,125 @@ -# \ExportApi +# \ExportAPI All URIs are relative to *https://console.runzero.com/api/v1.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ExportAssetSyncCreatedJSON**](ExportApi.md#ExportAssetSyncCreatedJSON) | **Get** /export/org/assets/sync/created/assets.json | Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. -[**ExportAssetSyncUpdatedJSON**](ExportApi.md#ExportAssetSyncUpdatedJSON) | **Get** /export/org/assets/sync/updated/assets.json | Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. -[**ExportAssetsCSV**](ExportApi.md#ExportAssetsCSV) | **Get** /export/org/assets.csv | Asset inventory as CSV. -[**ExportAssetsJSON**](ExportApi.md#ExportAssetsJSON) | **Get** /export/org/assets.json | Exports the asset inventory. -[**ExportAssetsJSONL**](ExportApi.md#ExportAssetsJSONL) | **Get** /export/org/assets.jsonl | Asset inventory as JSON line-delimited. -[**ExportAssetsNmapXML**](ExportApi.md#ExportAssetsNmapXML) | **Get** /export/org/assets.nmap.xml | Asset inventory as Nmap-style XML. -[**ExportServicesCSV**](ExportApi.md#ExportServicesCSV) | **Get** /export/org/services.csv | Service inventory as CSV. -[**ExportServicesJSON**](ExportApi.md#ExportServicesJSON) | **Get** /export/org/services.json | Service inventory as JSON. -[**ExportServicesJSONL**](ExportApi.md#ExportServicesJSONL) | **Get** /export/org/services.jsonl | Service inventory as JSON line-delimited. -[**ExportSitesCSV**](ExportApi.md#ExportSitesCSV) | **Get** /export/org/sites.csv | Site list as CSV. -[**ExportSitesJSON**](ExportApi.md#ExportSitesJSON) | **Get** /export/org/sites.json | Export all sites. -[**ExportSitesJSONL**](ExportApi.md#ExportSitesJSONL) | **Get** /export/org/sites.jsonl | Site list as JSON line-delimited. -[**ExportWirelessCSV**](ExportApi.md#ExportWirelessCSV) | **Get** /export/org/wireless.csv | Wireless inventory as CSV. -[**ExportWirelessJSON**](ExportApi.md#ExportWirelessJSON) | **Get** /export/org/wireless.json | Wireless inventory as JSON. -[**ExportWirelessJSONL**](ExportApi.md#ExportWirelessJSONL) | **Get** /export/org/wireless.jsonl | Wireless inventory as JSON line-delimited. +[**ExportAssetMetricsJSON**](ExportAPI.md#ExportAssetMetricsJSON) | **Get** /org/metrics | Export asset metrics +[**ExportAssetTopHWCSV**](ExportAPI.md#ExportAssetTopHWCSV) | **Get** /org/assets/hw.csv | Top asset hardware products as CSV +[**ExportAssetTopOSCSV**](ExportAPI.md#ExportAssetTopOSCSV) | **Get** /org/assets/os.csv | Top asset operating systems as CSV +[**ExportAssetTopTagsCSV**](ExportAPI.md#ExportAssetTopTagsCSV) | **Get** /org/assets/tags.csv | Top asset tags as CSV +[**ExportAssetTopTypesCSV**](ExportAPI.md#ExportAssetTopTypesCSV) | **Get** /org/assets/type.csv | Top asset types as CSV +[**ExportAssetsCSV**](ExportAPI.md#ExportAssetsCSV) | **Get** /export/org/assets.csv | Asset inventory as CSV +[**ExportAssetsJSON**](ExportAPI.md#ExportAssetsJSON) | **Get** /export/org/assets.json | Exports the asset inventory +[**ExportAssetsJSONL**](ExportAPI.md#ExportAssetsJSONL) | **Get** /export/org/assets.jsonl | Asset inventory as JSON line-delimited +[**ExportAssetsNmapXML**](ExportAPI.md#ExportAssetsNmapXML) | **Get** /export/org/assets.nmap.xml | Asset inventory as Nmap-style XML +[**ExportCertificatesCSV**](ExportAPI.md#ExportCertificatesCSV) | **Get** /export/org/certificates.csv | Export the certificate inventory as CSV +[**ExportCertificatesJSON**](ExportAPI.md#ExportCertificatesJSON) | **Get** /export/org/certificates.json | Export the certificate inventory as JSON +[**ExportCertificatesJSONL**](ExportAPI.md#ExportCertificatesJSONL) | **Get** /export/org/certificates.jsonl | Export the certificate inventory as JSONL line-delimited +[**ExportDirectoryGroupsCSV**](ExportAPI.md#ExportDirectoryGroupsCSV) | **Get** /export/org/groups.csv | Group inventory as CSV +[**ExportDirectoryGroupsJSON**](ExportAPI.md#ExportDirectoryGroupsJSON) | **Get** /export/org/groups.json | Exports the group inventory +[**ExportDirectoryGroupsJSONL**](ExportAPI.md#ExportDirectoryGroupsJSONL) | **Get** /export/org/groups.jsonl | Group inventory as JSON line-delimited +[**ExportDirectoryUsersCSV**](ExportAPI.md#ExportDirectoryUsersCSV) | **Get** /export/org/users.csv | User inventory as CSV +[**ExportDirectoryUsersJSON**](ExportAPI.md#ExportDirectoryUsersJSON) | **Get** /export/org/users.json | Exports the user inventory +[**ExportDirectoryUsersJSONL**](ExportAPI.md#ExportDirectoryUsersJSONL) | **Get** /export/org/users.jsonl | User inventory as JSON line-delimited +[**ExportFindingsCSV**](ExportAPI.md#ExportFindingsCSV) | **Get** /export/org/findings.csv | Export findings as CSV +[**ExportFindingsJSON**](ExportAPI.md#ExportFindingsJSON) | **Get** /export/org/findings.json | Export findings as JSON +[**ExportFindingsJSONL**](ExportAPI.md#ExportFindingsJSONL) | **Get** /export/org/findings.jsonl | Export findings as JSON line-delimited +[**ExportSNMPARPCacheCSV**](ExportAPI.md#ExportSNMPARPCacheCSV) | **Get** /export/org/snmp.arpcache.csv | SNMP ARP cache data as CSV +[**ExportServicesCSV**](ExportAPI.md#ExportServicesCSV) | **Get** /export/org/services.csv | Service inventory as CSV +[**ExportServicesJSON**](ExportAPI.md#ExportServicesJSON) | **Get** /export/org/services.json | Service inventory as JSON +[**ExportServicesJSONL**](ExportAPI.md#ExportServicesJSONL) | **Get** /export/org/services.jsonl | Service inventory as JSON line-delimited +[**ExportServicesTopProductsCSV**](ExportAPI.md#ExportServicesTopProductsCSV) | **Get** /org/services/products.csv | Top service products as CSV +[**ExportServicesTopProtocolsCSV**](ExportAPI.md#ExportServicesTopProtocolsCSV) | **Get** /org/services/protocols.csv | Top service protocols as CSV +[**ExportServicesTopTCPCSV**](ExportAPI.md#ExportServicesTopTCPCSV) | **Get** /org/services/tcp.csv | Top TCP services as CSV +[**ExportServicesTopUDPCSV**](ExportAPI.md#ExportServicesTopUDPCSV) | **Get** /org/services/udp.csv | Top UDP services as CSV +[**ExportSitesCSV**](ExportAPI.md#ExportSitesCSV) | **Get** /export/org/sites.csv | Site list as CSV +[**ExportSitesJSON**](ExportAPI.md#ExportSitesJSON) | **Get** /export/org/sites.json | Export all sites +[**ExportSitesJSONL**](ExportAPI.md#ExportSitesJSONL) | **Get** /export/org/sites.jsonl | Site list as JSON line-delimited +[**ExportSoftwareCSV**](ExportAPI.md#ExportSoftwareCSV) | **Get** /export/org/software.csv | Software inventory as CSV +[**ExportSoftwareJSON**](ExportAPI.md#ExportSoftwareJSON) | **Get** /export/org/software.json | Exports the software inventory +[**ExportSoftwareJSONL**](ExportAPI.md#ExportSoftwareJSONL) | **Get** /export/org/software.jsonl | Software inventory as JSON line-delimited +[**ExportSubnetUtilizationStatsCSV**](ExportAPI.md#ExportSubnetUtilizationStatsCSV) | **Get** /export/org/subnet.stats.csv | Subnet utilization statistics as as CSV +[**ExportTasksJSON**](ExportAPI.md#ExportTasksJSON) | **Get** /export/org/tasks.json | Exports organization tasks +[**ExportTasksJSONL**](ExportAPI.md#ExportTasksJSONL) | **Get** /export/org/tasks.jsonl | Organization tasks as JSON line-delimited +[**ExportVulnerabilitiesCSV**](ExportAPI.md#ExportVulnerabilitiesCSV) | **Get** /export/org/vulnerabilities.csv | Export the vulnerability inventory as CSV +[**ExportVulnerabilitiesJSON**](ExportAPI.md#ExportVulnerabilitiesJSON) | **Get** /export/org/vulnerabilities.json | Export the vulnerability inventory as JSON +[**ExportVulnerabilitiesJSONL**](ExportAPI.md#ExportVulnerabilitiesJSONL) | **Get** /export/org/vulnerabilities.jsonl | Export the vulnerability inventory as JSON line-delimited +[**ExportWirelessCSV**](ExportAPI.md#ExportWirelessCSV) | **Get** /export/org/wireless.csv | Wireless inventory as CSV +[**ExportWirelessJSON**](ExportAPI.md#ExportWirelessJSON) | **Get** /export/org/wireless.json | Wireless inventory as JSON +[**ExportWirelessJSONL**](ExportAPI.md#ExportWirelessJSONL) | **Get** /export/org/wireless.jsonl | Wireless inventory as JSON line-delimited + + + +## ExportAssetMetricsJSON + +> map[string]AssetMetric ExportAssetMetricsJSON(ctx).Oid(oid).Execute() + +Export asset metrics +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetMetricsJSON(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetMetricsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetMetricsJSON`: map[string]AssetMetric + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetMetricsJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAssetMetricsJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**map[string]AssetMetric**](AssetMetric.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -## ExportAssetSyncCreatedJSON +## ExportAssetTopHWCSV -> AssetsWithCheckpoint ExportAssetSyncCreatedJSON(ctx).Search(search).Fields(fields).Since(since).Execute() +> *os.File ExportAssetTopHWCSV(ctx).Oid(oid).Execute() -Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. +Top asset hardware products as CSV ### Example @@ -34,26 +127,88 @@ Exports the asset inventory in a sync-friendly manner using created_at as a chec package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - since := 987 // int64 | an optional unix timestamp to use as a checkpoint (optional) + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetTopHWCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetTopHWCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetTopHWCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetTopHWCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAssetTopHWCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportAssetTopOSCSV + +> *os.File ExportAssetTopOSCSV(ctx).Oid(oid).Execute() + +Top asset operating systems as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetSyncCreatedJSON(context.Background(), ).Search(search).Fields(fields).Since(since).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetSyncCreatedJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetSyncCreatedJSON`: AssetsWithCheckpoint - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetSyncCreatedJSON`: %v\n", resp) +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetTopOSCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetTopOSCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetTopOSCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetTopOSCSV`: %v\n", resp) } ``` @@ -63,38 +218,36 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportAssetSyncCreatedJSONRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportAssetTopOSCSVRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | - **since** | **int64** | an optional unix timestamp to use as a checkpoint | + **oid** | **string** | The current Organization | ### Return type -[**AssetsWithCheckpoint**](AssetsWithCheckpoint.md) +[***os.File**](*os.File.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportAssetSyncUpdatedJSON +## ExportAssetTopTagsCSV -> AssetsWithCheckpoint ExportAssetSyncUpdatedJSON(ctx).Search(search).Fields(fields).Since(since).Execute() +> *os.File ExportAssetTopTagsCSV(ctx).Oid(oid).Execute() -Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. +Top asset tags as CSV ### Example @@ -102,26 +255,88 @@ Exports the asset inventory in a sync-friendly manner using updated_at as a chec package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - since := 987 // int64 | an optional unix timestamp to use as a checkpoint (optional) + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetTopTagsCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetTopTagsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetTopTagsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetTopTagsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAssetTopTagsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportAssetTopTypesCSV + +> *os.File ExportAssetTopTypesCSV(ctx).Oid(oid).Execute() + +Top asset types as CSV - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetSyncUpdatedJSON(context.Background(), ).Search(search).Fields(fields).Since(since).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetSyncUpdatedJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetSyncUpdatedJSON`: AssetsWithCheckpoint - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetSyncUpdatedJSON`: %v\n", resp) +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetTopTypesCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetTopTypesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetTopTypesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetTopTypesCSV`: %v\n", resp) } ``` @@ -131,27 +346,25 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportAssetSyncUpdatedJSONRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportAssetTopTypesCSVRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | - **since** | **int64** | an optional unix timestamp to use as a checkpoint | + **oid** | **string** | The current Organization | ### Return type -[**AssetsWithCheckpoint**](AssetsWithCheckpoint.md) +[***os.File**](*os.File.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -160,9 +373,9 @@ Name | Type | Description | Notes ## ExportAssetsCSV -> *os.File ExportAssetsCSV(ctx).Search(search).Execute() +> *os.File ExportAssetsCSV(ctx).Oid(oid).Search(search).Execute() -Asset inventory as CSV. +Asset inventory as CSV ### Example @@ -170,24 +383,25 @@ Asset inventory as CSV. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetsCSV(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetsCSV``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetsCSV`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetsCSV`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetsCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetsCSV`: %v\n", resp) } ``` @@ -202,7 +416,8 @@ Other parameters are passed through a pointer to a apiExportAssetsCSVRequest str Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type @@ -210,12 +425,12 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: text/csv +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -224,9 +439,9 @@ Name | Type | Description | Notes ## ExportAssetsJSON -> []Asset ExportAssetsJSON(ctx).Search(search).Fields(fields).Execute() +> AssetExportResponse ExportAssetsJSON(ctx).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() -Exports the asset inventory. +Exports the asset inventory ### Example @@ -234,25 +449,28 @@ Exports the asset inventory. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetsJSON(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetsJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetsJSON`: []Asset - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetsJSON`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetsJSON(context.Background()).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetsJSON`: AssetExportResponse + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetsJSON`: %v\n", resp) } ``` @@ -267,16 +485,19 @@ Other parameters are passed through a pointer to a apiExportAssetsJSONRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | ### Return type -[**[]Asset**](Asset.md) +[**AssetExportResponse**](AssetExportResponse.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -290,9 +511,9 @@ Name | Type | Description | Notes ## ExportAssetsJSONL -> *os.File ExportAssetsJSONL(ctx).Search(search).Fields(fields).Execute() +> *os.File ExportAssetsJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() -Asset inventory as JSON line-delimited. +Asset inventory as JSON line-delimited ### Example @@ -300,25 +521,26 @@ Asset inventory as JSON line-delimited. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetsJSONL(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetsJSONL``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetsJSONL`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetsJSONL`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetsJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetsJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetsJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetsJSONL`: %v\n", resp) } ``` @@ -333,8 +555,9 @@ Other parameters are passed through a pointer to a apiExportAssetsJSONLRequest s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | ### Return type @@ -342,7 +565,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -356,9 +579,9 @@ Name | Type | Description | Notes ## ExportAssetsNmapXML -> *os.File ExportAssetsNmapXML(ctx).Search(search).Execute() +> *os.File ExportAssetsNmapXML(ctx).Oid(oid).Search(search).Execute() -Asset inventory as Nmap-style XML. +Asset inventory as Nmap-style XML ### Example @@ -366,24 +589,25 @@ Asset inventory as Nmap-style XML. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportAssetsNmapXML(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportAssetsNmapXML``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportAssetsNmapXML`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportAssetsNmapXML`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportAssetsNmapXML(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportAssetsNmapXML``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAssetsNmapXML`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportAssetsNmapXML`: %v\n", resp) } ``` @@ -398,7 +622,8 @@ Other parameters are passed through a pointer to a apiExportAssetsNmapXMLRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type @@ -406,23 +631,23 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: text/xml +- **Accept**: text/xml, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportServicesCSV +## ExportCertificatesCSV -> *os.File ExportServicesCSV(ctx).Search(search).Execute() +> *os.File ExportCertificatesCSV(ctx).Oid(oid).Search(search).Execute() -Service inventory as CSV. +Export the certificate inventory as CSV ### Example @@ -430,24 +655,25 @@ Service inventory as CSV. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportServicesCSV(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportServicesCSV``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportServicesCSV`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportServicesCSV`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportCertificatesCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportCertificatesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportCertificatesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportCertificatesCSV`: %v\n", resp) } ``` @@ -457,12 +683,13 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportServicesCSVRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportCertificatesCSVRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type @@ -470,23 +697,23 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: text/csv +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportServicesJSON +## ExportCertificatesJSON -> []Service ExportServicesJSON(ctx).Search(search).Fields(fields).Execute() +> []Certificate ExportCertificatesJSON(ctx).Oid(oid).Search(search).Execute() -Service inventory as JSON. +Export the certificate inventory as JSON ### Example @@ -494,25 +721,25 @@ Service inventory as JSON. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportServicesJSON(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportServicesJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportServicesJSON`: []Service - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportServicesJSON`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportCertificatesJSON(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportCertificatesJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportCertificatesJSON`: []Certificate + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportCertificatesJSON`: %v\n", resp) } ``` @@ -522,21 +749,21 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportServicesJSONRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportCertificatesJSONRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type -[**[]Service**](Service.md) +[**[]Certificate**](Certificate.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -548,11 +775,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportServicesJSONL +## ExportCertificatesJSONL -> *os.File ExportServicesJSONL(ctx).Search(search).Fields(fields).Execute() +> *os.File ExportCertificatesJSONL(ctx).Oid(oid).Search(search).Execute() -Service inventory as JSON line-delimited. +Export the certificate inventory as JSONL line-delimited ### Example @@ -560,25 +787,25 @@ Service inventory as JSON line-delimited. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportServicesJSONL(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportServicesJSONL``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportServicesJSONL`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportServicesJSONL`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportCertificatesJSONL(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportCertificatesJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportCertificatesJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportCertificatesJSONL`: %v\n", resp) } ``` @@ -588,13 +815,13 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportServicesJSONLRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportCertificatesJSONLRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type @@ -602,7 +829,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -614,11 +841,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportSitesCSV +## ExportDirectoryGroupsCSV -> *os.File ExportSitesCSV(ctx).Execute() +> *os.File ExportDirectoryGroupsCSV(ctx).Oid(oid).Search(search).Execute() -Site list as CSV. +Group inventory as CSV ### Example @@ -626,58 +853,65 @@ Site list as CSV. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportSitesCSV(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportSitesCSV``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportSitesCSV`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportSitesCSV`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryGroupsCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryGroupsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryGroupsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryGroupsCSV`: %v\n", resp) } ``` ### Path Parameters -This endpoint does not need any parameter. + ### Other Parameters -Other parameters are passed through a pointer to a apiExportSitesCSVRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportDirectoryGroupsCSVRequest struct via the builder pattern +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + ### Return type [***os.File**](*os.File.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: text/csv +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportSitesJSON +## ExportDirectoryGroupsJSON -> []Site ExportSitesJSON(ctx).Search(search).Fields(fields).Execute() +> []DirectoryGroup ExportDirectoryGroupsJSON(ctx).Oid(oid).Search(search).Fields(fields).Execute() -Export all sites. +Exports the group inventory ### Example @@ -685,25 +919,26 @@ Export all sites. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportSitesJSON(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportSitesJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportSitesJSON`: []Site - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportSitesJSON`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryGroupsJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryGroupsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryGroupsJSON`: []DirectoryGroup + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryGroupsJSON`: %v\n", resp) } ``` @@ -713,21 +948,22 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportSitesJSONRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportDirectoryGroupsJSONRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | ### Return type -[**[]Site**](Site.md) +[**[]DirectoryGroup**](DirectoryGroup.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -739,11 +975,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportSitesJSONL +## ExportDirectoryGroupsJSONL -> *os.File ExportSitesJSONL(ctx).Search(search).Fields(fields).Execute() +> *os.File ExportDirectoryGroupsJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() -Site list as JSON line-delimited. +Group inventory as JSON line-delimited ### Example @@ -751,25 +987,26 @@ Site list as JSON line-delimited. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportSitesJSONL(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportSitesJSONL``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportSitesJSONL`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportSitesJSONL`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryGroupsJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryGroupsJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryGroupsJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryGroupsJSONL`: %v\n", resp) } ``` @@ -779,13 +1016,14 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportSitesJSONLRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportDirectoryGroupsJSONLRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | ### Return type @@ -793,7 +1031,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -805,11 +1043,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportWirelessCSV +## ExportDirectoryUsersCSV -> *os.File ExportWirelessCSV(ctx).Search(search).Execute() +> *os.File ExportDirectoryUsersCSV(ctx).Oid(oid).Search(search).Execute() -Wireless inventory as CSV. +User inventory as CSV ### Example @@ -817,24 +1055,25 @@ Wireless inventory as CSV. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportWirelessCSV(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportWirelessCSV``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportWirelessCSV`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportWirelessCSV`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryUsersCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryUsersCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryUsersCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryUsersCSV`: %v\n", resp) } ``` @@ -844,12 +1083,13 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportWirelessCSVRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportDirectoryUsersCSVRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | ### Return type @@ -857,23 +1097,23 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: text/csv +- **Accept**: text/csv, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportWirelessJSON +## ExportDirectoryUsersJSON -> []Wireless ExportWirelessJSON(ctx).Search(search).Fields(fields).Execute() +> []DirectoryUser ExportDirectoryUsersJSON(ctx).Oid(oid).Search(search).Fields(fields).Execute() -Wireless inventory as JSON. +Exports the user inventory ### Example @@ -881,25 +1121,94 @@ Wireless inventory as JSON. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryUsersJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryUsersJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryUsersJSON`: []DirectoryUser + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryUsersJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportDirectoryUsersJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[**[]DirectoryUser**](DirectoryUser.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportDirectoryUsersJSONL + +> *os.File ExportDirectoryUsersJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +User inventory as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportWirelessJSON(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportWirelessJSON``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportWirelessJSON`: []Wireless - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportWirelessJSON`: %v\n", resp) +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportDirectoryUsersJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportDirectoryUsersJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportDirectoryUsersJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportDirectoryUsersJSONL`: %v\n", resp) } ``` @@ -909,21 +1218,22 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiExportWirelessJSONRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportDirectoryUsersJSONLRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | ### Return type -[**[]Wireless**](Wireless.md) +[***os.File**](*os.File.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -935,11 +1245,77 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportWirelessJSONL +## ExportFindingsCSV + +> *os.File ExportFindingsCSV(ctx).Oid(oid).Search(search).Execute() + +Export findings as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportFindingsCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportFindingsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportFindingsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportFindingsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportFindingsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportFindingsJSON -> *os.File ExportWirelessJSONL(ctx).Search(search).Fields(fields).Execute() +> []Finding ExportFindingsJSON(ctx).Oid(oid).Search(search).Execute() -Wireless inventory as JSON line-delimited. +Export findings as JSON ### Example @@ -947,25 +1323,1636 @@ Wireless inventory as JSON line-delimited. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportFindingsJSON(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportFindingsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportFindingsJSON`: []Finding + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportFindingsJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportFindingsJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[**[]Finding**](Finding.md) - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.ExportApi.ExportWirelessJSONL(context.Background(), ).Search(search).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ExportApi.ExportWirelessJSONL``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExportWirelessJSONL`: *os.File - fmt.Fprintf(os.Stdout, "Response from `ExportApi.ExportWirelessJSONL`: %v\n", resp) +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportFindingsJSONL + +> []Finding ExportFindingsJSONL(ctx).Oid(oid).Search(search).Execute() + +Export findings as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportFindingsJSONL(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportFindingsJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportFindingsJSONL`: []Finding + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportFindingsJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportFindingsJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[**[]Finding**](Finding.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSNMPARPCacheCSV + +> *os.File ExportSNMPARPCacheCSV(ctx).Oid(oid).Execute() + +SNMP ARP cache data as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSNMPARPCacheCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSNMPARPCacheCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSNMPARPCacheCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSNMPARPCacheCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSNMPARPCacheCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesCSV + +> *os.File ExportServicesCSV(ctx).Oid(oid).Search(search).Execute() + +Service inventory as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesJSON + +> ServiceExportResponse ExportServicesJSON(ctx).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + +Service inventory as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesJSON(context.Background()).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesJSON`: ServiceExportResponse + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | + +### Return type + +[**ServiceExportResponse**](ServiceExportResponse.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesJSONL + +> *os.File ExportServicesJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Service inventory as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesTopProductsCSV + +> *os.File ExportServicesTopProductsCSV(ctx).Oid(oid).Execute() + +Top service products as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesTopProductsCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesTopProductsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesTopProductsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesTopProductsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesTopProductsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesTopProtocolsCSV + +> *os.File ExportServicesTopProtocolsCSV(ctx).Oid(oid).Execute() + +Top service protocols as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesTopProtocolsCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesTopProtocolsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesTopProtocolsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesTopProtocolsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesTopProtocolsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesTopTCPCSV + +> *os.File ExportServicesTopTCPCSV(ctx).Oid(oid).Execute() + +Top TCP services as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesTopTCPCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesTopTCPCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesTopTCPCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesTopTCPCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesTopTCPCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportServicesTopUDPCSV + +> *os.File ExportServicesTopUDPCSV(ctx).Oid(oid).Execute() + +Top UDP services as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportServicesTopUDPCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportServicesTopUDPCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportServicesTopUDPCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportServicesTopUDPCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportServicesTopUDPCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSitesCSV + +> *os.File ExportSitesCSV(ctx).Oid(oid).Execute() + +Site list as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSitesCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSitesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSitesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSitesCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSitesCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSitesJSON + +> []Site ExportSitesJSON(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Export all sites + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSitesJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSitesJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSitesJSON`: []Site + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSitesJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSitesJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[**[]Site**](Site.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSitesJSONL + +> *os.File ExportSitesJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Site list as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSitesJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSitesJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSitesJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSitesJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSitesJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSoftwareCSV + +> *os.File ExportSoftwareCSV(ctx).Oid(oid).Search(search).Execute() + +Software inventory as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSoftwareCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSoftwareCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSoftwareCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSoftwareCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSoftwareCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSoftwareJSON + +> SoftwareExportResponse ExportSoftwareJSON(ctx).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + +Exports the software inventory + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSoftwareJSON(context.Background()).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSoftwareJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSoftwareJSON`: SoftwareExportResponse + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSoftwareJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSoftwareJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | + +### Return type + +[**SoftwareExportResponse**](SoftwareExportResponse.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSoftwareJSONL + +> *os.File ExportSoftwareJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Software inventory as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSoftwareJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSoftwareJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSoftwareJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSoftwareJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSoftwareJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportSubnetUtilizationStatsCSV + +> *os.File ExportSubnetUtilizationStatsCSV(ctx).Oid(oid).Mask(mask).Execute() + +Subnet utilization statistics as as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + mask := "mask_example" // string | an optional subnet mask size (ex:24) (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportSubnetUtilizationStatsCSV(context.Background()).Oid(oid).Mask(mask).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportSubnetUtilizationStatsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportSubnetUtilizationStatsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportSubnetUtilizationStatsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportSubnetUtilizationStatsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **mask** | **string** | an optional subnet mask size (ex:24) | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportTasksJSON + +> []Task ExportTasksJSON(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Exports organization tasks + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportTasksJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportTasksJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportTasksJSON`: []Task + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportTasksJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportTasksJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[**[]Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportTasksJSONL + +> *os.File ExportTasksJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Organization tasks as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportTasksJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportTasksJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportTasksJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportTasksJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportTasksJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportVulnerabilitiesCSV + +> *os.File ExportVulnerabilitiesCSV(ctx).Oid(oid).Search(search).Execute() + +Export the vulnerability inventory as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportVulnerabilitiesCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportVulnerabilitiesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportVulnerabilitiesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportVulnerabilitiesCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportVulnerabilitiesCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportVulnerabilitiesJSON + +> VulnerabilityExportResponse ExportVulnerabilitiesJSON(ctx).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + +Export the vulnerability inventory as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportVulnerabilitiesJSON(context.Background()).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportVulnerabilitiesJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportVulnerabilitiesJSON`: VulnerabilityExportResponse + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportVulnerabilitiesJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportVulnerabilitiesJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | + +### Return type + +[**VulnerabilityExportResponse**](VulnerabilityExportResponse.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportVulnerabilitiesJSONL + +> *os.File ExportVulnerabilitiesJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Export the vulnerability inventory as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportVulnerabilitiesJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportVulnerabilitiesJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportVulnerabilitiesJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportVulnerabilitiesJSONL`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportVulnerabilitiesJSONLRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportWirelessCSV + +> *os.File ExportWirelessCSV(ctx).Oid(oid).Search(search).Execute() + +Wireless inventory as CSV + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportWirelessCSV(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportWirelessCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportWirelessCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportWirelessCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportWirelessCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportWirelessJSON + +> WirelessExportResponse ExportWirelessJSON(ctx).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + +Wireless inventory as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + pageSize := int32(56) // int32 | The number of results to return per request. (optional) + startKey := "startKey_example" // string | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportWirelessJSON(context.Background()).Oid(oid).Search(search).Fields(fields).PageSize(pageSize).StartKey(startKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportWirelessJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportWirelessJSON`: WirelessExportResponse + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportWirelessJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportWirelessJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + **pageSize** | **int32** | The number of results to return per request. | + **startKey** | **string** | The value to use for requesting the next page when requesting paginated results. This should be the value of the `next_key` attribute returned in the previous response. | + +### Return type + +[**WirelessExportResponse**](WirelessExportResponse.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportWirelessJSONL + +> *os.File ExportWirelessJSONL(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Wireless inventory as JSON line-delimited + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExportAPI.ExportWirelessJSONL(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportAPI.ExportWirelessJSONL``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportWirelessJSONL`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExportAPI.ExportWirelessJSONL`: %v\n", resp) } ``` @@ -980,8 +2967,9 @@ Other parameters are passed through a pointer to a apiExportWirelessJSONLRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | - **fields** | **string** | an optional list of fields to export, comma-separated | + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | ### Return type @@ -989,7 +2977,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/go/docs/ExportToken.md b/go/docs/ExportToken.md new file mode 100644 index 0000000..2959589 --- /dev/null +++ b/go/docs/ExportToken.md @@ -0,0 +1,217 @@ +# ExportToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **interface{}** | | +**Token** | Pointer to **string** | | [optional] +**Comment** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**LastUsedAt** | Pointer to **int64** | | [optional] +**LastUsedBy** | Pointer to **string** | | [optional] +**Counter** | Pointer to **int64** | | [optional] + +## Methods + +### NewExportToken + +`func NewExportToken(id interface{}, ) *ExportToken` + +NewExportToken instantiates a new ExportToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExportTokenWithDefaults + +`func NewExportTokenWithDefaults() *ExportToken` + +NewExportTokenWithDefaults instantiates a new ExportToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ExportToken) GetId() interface{}` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ExportToken) GetIdOk() (*interface{}, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ExportToken) SetId(v interface{})` + +SetId sets Id field to given value. + + +### SetIdNil + +`func (o *ExportToken) SetIdNil(b bool)` + + SetIdNil sets the value for Id to be an explicit nil + +### UnsetId +`func (o *ExportToken) UnsetId()` + +UnsetId ensures that no value is present for Id, not even an explicit nil +### GetToken + +`func (o *ExportToken) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *ExportToken) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *ExportToken) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *ExportToken) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetComment + +`func (o *ExportToken) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *ExportToken) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *ExportToken) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *ExportToken) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ExportToken) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ExportToken) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ExportToken) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ExportToken) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetLastUsedAt + +`func (o *ExportToken) GetLastUsedAt() int64` + +GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. + +### GetLastUsedAtOk + +`func (o *ExportToken) GetLastUsedAtOk() (*int64, bool)` + +GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsedAt + +`func (o *ExportToken) SetLastUsedAt(v int64)` + +SetLastUsedAt sets LastUsedAt field to given value. + +### HasLastUsedAt + +`func (o *ExportToken) HasLastUsedAt() bool` + +HasLastUsedAt returns a boolean if a field has been set. + +### GetLastUsedBy + +`func (o *ExportToken) GetLastUsedBy() string` + +GetLastUsedBy returns the LastUsedBy field if non-nil, zero value otherwise. + +### GetLastUsedByOk + +`func (o *ExportToken) GetLastUsedByOk() (*string, bool)` + +GetLastUsedByOk returns a tuple with the LastUsedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsedBy + +`func (o *ExportToken) SetLastUsedBy(v string)` + +SetLastUsedBy sets LastUsedBy field to given value. + +### HasLastUsedBy + +`func (o *ExportToken) HasLastUsedBy() bool` + +HasLastUsedBy returns a boolean if a field has been set. + +### GetCounter + +`func (o *ExportToken) GetCounter() int64` + +GetCounter returns the Counter field if non-nil, zero value otherwise. + +### GetCounterOk + +`func (o *ExportToken) GetCounterOk() (*int64, bool)` + +GetCounterOk returns a tuple with the Counter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCounter + +`func (o *ExportToken) SetCounter(v int64)` + +SetCounter sets Counter field to given value. + +### HasCounter + +`func (o *ExportToken) HasCounter() bool` + +HasCounter returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ExportTokenOptions.md b/go/docs/ExportTokenOptions.md new file mode 100644 index 0000000..f6f0341 --- /dev/null +++ b/go/docs/ExportTokenOptions.md @@ -0,0 +1,56 @@ +# ExportTokenOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comment** | Pointer to **string** | | [optional] + +## Methods + +### NewExportTokenOptions + +`func NewExportTokenOptions() *ExportTokenOptions` + +NewExportTokenOptions instantiates a new ExportTokenOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExportTokenOptionsWithDefaults + +`func NewExportTokenOptionsWithDefaults() *ExportTokenOptions` + +NewExportTokenOptionsWithDefaults instantiates a new ExportTokenOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetComment + +`func (o *ExportTokenOptions) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *ExportTokenOptions) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *ExportTokenOptions) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *ExportTokenOptions) HasComment() bool` + +HasComment returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Finding.md b/go/docs/Finding.md new file mode 100644 index 0000000..e633e3b --- /dev/null +++ b/go/docs/Finding.md @@ -0,0 +1,384 @@ +# Finding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Category** | Pointer to **string** | | [optional] +**OrganizationId** | **string** | | +**FindingCode** | Pointer to **string** | A runZero-assigned code for the finding. | [optional] +**Name** | Pointer to **string** | The title of the finding. | [optional] +**Description** | Pointer to **string** | Additional information about the finding. | [optional] +**Solution** | Pointer to **string** | Remediation information. | [optional] +**Links** | Pointer to [**FindingLinks**](FindingLinks.md) | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**LastDetectedAt** | Pointer to **int64** | | [optional] +**InstanceCount** | Pointer to **int64** | | [optional] +**RiskRank** | Pointer to **string** | | [optional] +**RiskRankValue** | Pointer to **int32** | 0 = info, 4 = critical | [optional] + +## Methods + +### NewFinding + +`func NewFinding(id string, organizationId string, ) *Finding` + +NewFinding instantiates a new Finding object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFindingWithDefaults + +`func NewFindingWithDefaults() *Finding` + +NewFindingWithDefaults instantiates a new Finding object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Finding) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Finding) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Finding) SetId(v string)` + +SetId sets Id field to given value. + + +### GetCategory + +`func (o *Finding) GetCategory() string` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Finding) GetCategoryOk() (*string, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategory + +`func (o *Finding) SetCategory(v string)` + +SetCategory sets Category field to given value. + +### HasCategory + +`func (o *Finding) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *Finding) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *Finding) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *Finding) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + + +### GetFindingCode + +`func (o *Finding) GetFindingCode() string` + +GetFindingCode returns the FindingCode field if non-nil, zero value otherwise. + +### GetFindingCodeOk + +`func (o *Finding) GetFindingCodeOk() (*string, bool)` + +GetFindingCodeOk returns a tuple with the FindingCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFindingCode + +`func (o *Finding) SetFindingCode(v string)` + +SetFindingCode sets FindingCode field to given value. + +### HasFindingCode + +`func (o *Finding) HasFindingCode() bool` + +HasFindingCode returns a boolean if a field has been set. + +### GetName + +`func (o *Finding) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Finding) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Finding) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Finding) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Finding) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Finding) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Finding) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Finding) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetSolution + +`func (o *Finding) GetSolution() string` + +GetSolution returns the Solution field if non-nil, zero value otherwise. + +### GetSolutionOk + +`func (o *Finding) GetSolutionOk() (*string, bool)` + +GetSolutionOk returns a tuple with the Solution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSolution + +`func (o *Finding) SetSolution(v string)` + +SetSolution sets Solution field to given value. + +### HasSolution + +`func (o *Finding) HasSolution() bool` + +HasSolution returns a boolean if a field has been set. + +### GetLinks + +`func (o *Finding) GetLinks() FindingLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *Finding) GetLinksOk() (*FindingLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *Finding) SetLinks(v FindingLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *Finding) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Finding) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Finding) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Finding) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Finding) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Finding) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Finding) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Finding) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Finding) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetLastDetectedAt + +`func (o *Finding) GetLastDetectedAt() int64` + +GetLastDetectedAt returns the LastDetectedAt field if non-nil, zero value otherwise. + +### GetLastDetectedAtOk + +`func (o *Finding) GetLastDetectedAtOk() (*int64, bool)` + +GetLastDetectedAtOk returns a tuple with the LastDetectedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastDetectedAt + +`func (o *Finding) SetLastDetectedAt(v int64)` + +SetLastDetectedAt sets LastDetectedAt field to given value. + +### HasLastDetectedAt + +`func (o *Finding) HasLastDetectedAt() bool` + +HasLastDetectedAt returns a boolean if a field has been set. + +### GetInstanceCount + +`func (o *Finding) GetInstanceCount() int64` + +GetInstanceCount returns the InstanceCount field if non-nil, zero value otherwise. + +### GetInstanceCountOk + +`func (o *Finding) GetInstanceCountOk() (*int64, bool)` + +GetInstanceCountOk returns a tuple with the InstanceCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceCount + +`func (o *Finding) SetInstanceCount(v int64)` + +SetInstanceCount sets InstanceCount field to given value. + +### HasInstanceCount + +`func (o *Finding) HasInstanceCount() bool` + +HasInstanceCount returns a boolean if a field has been set. + +### GetRiskRank + +`func (o *Finding) GetRiskRank() string` + +GetRiskRank returns the RiskRank field if non-nil, zero value otherwise. + +### GetRiskRankOk + +`func (o *Finding) GetRiskRankOk() (*string, bool)` + +GetRiskRankOk returns a tuple with the RiskRank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskRank + +`func (o *Finding) SetRiskRank(v string)` + +SetRiskRank sets RiskRank field to given value. + +### HasRiskRank + +`func (o *Finding) HasRiskRank() bool` + +HasRiskRank returns a boolean if a field has been set. + +### GetRiskRankValue + +`func (o *Finding) GetRiskRankValue() int32` + +GetRiskRankValue returns the RiskRankValue field if non-nil, zero value otherwise. + +### GetRiskRankValueOk + +`func (o *Finding) GetRiskRankValueOk() (*int32, bool)` + +GetRiskRankValueOk returns a tuple with the RiskRankValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskRankValue + +`func (o *Finding) SetRiskRankValue(v int32)` + +SetRiskRankValue sets RiskRankValue field to given value. + +### HasRiskRankValue + +`func (o *Finding) HasRiskRankValue() bool` + +HasRiskRankValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/FindingLink.md b/go/docs/FindingLink.md new file mode 100644 index 0000000..7d1b9b4 --- /dev/null +++ b/go/docs/FindingLink.md @@ -0,0 +1,82 @@ +# FindingLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | | [optional] + +## Methods + +### NewFindingLink + +`func NewFindingLink() *FindingLink` + +NewFindingLink instantiates a new FindingLink object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFindingLinkWithDefaults + +`func NewFindingLinkWithDefaults() *FindingLink` + +NewFindingLinkWithDefaults instantiates a new FindingLink object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *FindingLink) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *FindingLink) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *FindingLink) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *FindingLink) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetUrl + +`func (o *FindingLink) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *FindingLink) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *FindingLink) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *FindingLink) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/FindingLinks.md b/go/docs/FindingLinks.md new file mode 100644 index 0000000..3296d16 --- /dev/null +++ b/go/docs/FindingLinks.md @@ -0,0 +1,108 @@ +# FindingLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cves** | Pointer to [**[]FindingLink**](FindingLink.md) | URLs of relevant CVE records. | [optional] +**RzBlog** | Pointer to [**[]FindingLink**](FindingLink.md) | URLs of relevant runZero blog postings. | [optional] +**Urls** | Pointer to [**[]FindingLink**](FindingLink.md) | Additional relevant URLs. | [optional] + +## Methods + +### NewFindingLinks + +`func NewFindingLinks() *FindingLinks` + +NewFindingLinks instantiates a new FindingLinks object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFindingLinksWithDefaults + +`func NewFindingLinksWithDefaults() *FindingLinks` + +NewFindingLinksWithDefaults instantiates a new FindingLinks object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCves + +`func (o *FindingLinks) GetCves() []FindingLink` + +GetCves returns the Cves field if non-nil, zero value otherwise. + +### GetCvesOk + +`func (o *FindingLinks) GetCvesOk() (*[]FindingLink, bool)` + +GetCvesOk returns a tuple with the Cves field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCves + +`func (o *FindingLinks) SetCves(v []FindingLink)` + +SetCves sets Cves field to given value. + +### HasCves + +`func (o *FindingLinks) HasCves() bool` + +HasCves returns a boolean if a field has been set. + +### GetRzBlog + +`func (o *FindingLinks) GetRzBlog() []FindingLink` + +GetRzBlog returns the RzBlog field if non-nil, zero value otherwise. + +### GetRzBlogOk + +`func (o *FindingLinks) GetRzBlogOk() (*[]FindingLink, bool)` + +GetRzBlogOk returns a tuple with the RzBlog field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRzBlog + +`func (o *FindingLinks) SetRzBlog(v []FindingLink)` + +SetRzBlog sets RzBlog field to given value. + +### HasRzBlog + +`func (o *FindingLinks) HasRzBlog() bool` + +HasRzBlog returns a boolean if a field has been set. + +### GetUrls + +`func (o *FindingLinks) GetUrls() []FindingLink` + +GetUrls returns the Urls field if non-nil, zero value otherwise. + +### GetUrlsOk + +`func (o *FindingLinks) GetUrlsOk() (*[]FindingLink, bool)` + +GetUrlsOk returns a tuple with the Urls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrls + +`func (o *FindingLinks) SetUrls(v []FindingLink)` + +SetUrls sets Urls field to given value. + +### HasUrls + +`func (o *FindingLinks) HasUrls() bool` + +HasUrls returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/GCPCredentialFields.md b/go/docs/GCPCredentialFields.md new file mode 100644 index 0000000..20449bc --- /dev/null +++ b/go/docs/GCPCredentialFields.md @@ -0,0 +1,342 @@ +# GCPCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CrossProject** | Pointer to **string** | | [optional] +**AuthProviderX509CertUrl** | Pointer to **string** | | [optional] +**AuthUri** | Pointer to **string** | | [optional] +**ClientEmail** | Pointer to **string** | | [optional] +**ClientId** | Pointer to **string** | | [optional] +**ClientX509CertUrl** | Pointer to **string** | | [optional] +**PrivateKey** | Pointer to **string** | base64 encoded private key, beginning with -----BEGIN PRIVATE KEY----- | [optional] +**PrivateKeyId** | Pointer to **string** | | [optional] +**ProjectId** | Pointer to **string** | | [optional] +**TokenUri** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**UniverseDomain** | Pointer to **string** | | [optional] + +## Methods + +### NewGCPCredentialFields + +`func NewGCPCredentialFields() *GCPCredentialFields` + +NewGCPCredentialFields instantiates a new GCPCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGCPCredentialFieldsWithDefaults + +`func NewGCPCredentialFieldsWithDefaults() *GCPCredentialFields` + +NewGCPCredentialFieldsWithDefaults instantiates a new GCPCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCrossProject + +`func (o *GCPCredentialFields) GetCrossProject() string` + +GetCrossProject returns the CrossProject field if non-nil, zero value otherwise. + +### GetCrossProjectOk + +`func (o *GCPCredentialFields) GetCrossProjectOk() (*string, bool)` + +GetCrossProjectOk returns a tuple with the CrossProject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrossProject + +`func (o *GCPCredentialFields) SetCrossProject(v string)` + +SetCrossProject sets CrossProject field to given value. + +### HasCrossProject + +`func (o *GCPCredentialFields) HasCrossProject() bool` + +HasCrossProject returns a boolean if a field has been set. + +### GetAuthProviderX509CertUrl + +`func (o *GCPCredentialFields) GetAuthProviderX509CertUrl() string` + +GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field if non-nil, zero value otherwise. + +### GetAuthProviderX509CertUrlOk + +`func (o *GCPCredentialFields) GetAuthProviderX509CertUrlOk() (*string, bool)` + +GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthProviderX509CertUrl + +`func (o *GCPCredentialFields) SetAuthProviderX509CertUrl(v string)` + +SetAuthProviderX509CertUrl sets AuthProviderX509CertUrl field to given value. + +### HasAuthProviderX509CertUrl + +`func (o *GCPCredentialFields) HasAuthProviderX509CertUrl() bool` + +HasAuthProviderX509CertUrl returns a boolean if a field has been set. + +### GetAuthUri + +`func (o *GCPCredentialFields) GetAuthUri() string` + +GetAuthUri returns the AuthUri field if non-nil, zero value otherwise. + +### GetAuthUriOk + +`func (o *GCPCredentialFields) GetAuthUriOk() (*string, bool)` + +GetAuthUriOk returns a tuple with the AuthUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthUri + +`func (o *GCPCredentialFields) SetAuthUri(v string)` + +SetAuthUri sets AuthUri field to given value. + +### HasAuthUri + +`func (o *GCPCredentialFields) HasAuthUri() bool` + +HasAuthUri returns a boolean if a field has been set. + +### GetClientEmail + +`func (o *GCPCredentialFields) GetClientEmail() string` + +GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. + +### GetClientEmailOk + +`func (o *GCPCredentialFields) GetClientEmailOk() (*string, bool)` + +GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientEmail + +`func (o *GCPCredentialFields) SetClientEmail(v string)` + +SetClientEmail sets ClientEmail field to given value. + +### HasClientEmail + +`func (o *GCPCredentialFields) HasClientEmail() bool` + +HasClientEmail returns a boolean if a field has been set. + +### GetClientId + +`func (o *GCPCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *GCPCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *GCPCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *GCPCredentialFields) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetClientX509CertUrl + +`func (o *GCPCredentialFields) GetClientX509CertUrl() string` + +GetClientX509CertUrl returns the ClientX509CertUrl field if non-nil, zero value otherwise. + +### GetClientX509CertUrlOk + +`func (o *GCPCredentialFields) GetClientX509CertUrlOk() (*string, bool)` + +GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientX509CertUrl + +`func (o *GCPCredentialFields) SetClientX509CertUrl(v string)` + +SetClientX509CertUrl sets ClientX509CertUrl field to given value. + +### HasClientX509CertUrl + +`func (o *GCPCredentialFields) HasClientX509CertUrl() bool` + +HasClientX509CertUrl returns a boolean if a field has been set. + +### GetPrivateKey + +`func (o *GCPCredentialFields) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *GCPCredentialFields) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *GCPCredentialFields) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *GCPCredentialFields) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### GetPrivateKeyId + +`func (o *GCPCredentialFields) GetPrivateKeyId() string` + +GetPrivateKeyId returns the PrivateKeyId field if non-nil, zero value otherwise. + +### GetPrivateKeyIdOk + +`func (o *GCPCredentialFields) GetPrivateKeyIdOk() (*string, bool)` + +GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKeyId + +`func (o *GCPCredentialFields) SetPrivateKeyId(v string)` + +SetPrivateKeyId sets PrivateKeyId field to given value. + +### HasPrivateKeyId + +`func (o *GCPCredentialFields) HasPrivateKeyId() bool` + +HasPrivateKeyId returns a boolean if a field has been set. + +### GetProjectId + +`func (o *GCPCredentialFields) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *GCPCredentialFields) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *GCPCredentialFields) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + +### HasProjectId + +`func (o *GCPCredentialFields) HasProjectId() bool` + +HasProjectId returns a boolean if a field has been set. + +### GetTokenUri + +`func (o *GCPCredentialFields) GetTokenUri() string` + +GetTokenUri returns the TokenUri field if non-nil, zero value otherwise. + +### GetTokenUriOk + +`func (o *GCPCredentialFields) GetTokenUriOk() (*string, bool)` + +GetTokenUriOk returns a tuple with the TokenUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenUri + +`func (o *GCPCredentialFields) SetTokenUri(v string)` + +SetTokenUri sets TokenUri field to given value. + +### HasTokenUri + +`func (o *GCPCredentialFields) HasTokenUri() bool` + +HasTokenUri returns a boolean if a field has been set. + +### GetType + +`func (o *GCPCredentialFields) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GCPCredentialFields) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GCPCredentialFields) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GCPCredentialFields) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUniverseDomain + +`func (o *GCPCredentialFields) GetUniverseDomain() string` + +GetUniverseDomain returns the UniverseDomain field if non-nil, zero value otherwise. + +### GetUniverseDomainOk + +`func (o *GCPCredentialFields) GetUniverseDomainOk() (*string, bool)` + +GetUniverseDomainOk returns a tuple with the UniverseDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUniverseDomain + +`func (o *GCPCredentialFields) SetUniverseDomain(v string)` + +SetUniverseDomain sets UniverseDomain field to given value. + +### HasUniverseDomain + +`func (o *GCPCredentialFields) HasUniverseDomain() bool` + +HasUniverseDomain returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/GoogleWorkspaceCredentialFields.md b/go/docs/GoogleWorkspaceCredentialFields.md new file mode 100644 index 0000000..03caa3d --- /dev/null +++ b/go/docs/GoogleWorkspaceCredentialFields.md @@ -0,0 +1,363 @@ +# GoogleWorkspaceCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Delegate** | **string** | | +**CustomerId** | Pointer to **string** | | [optional] +**AuthProviderX509CertUrl** | Pointer to **string** | | [optional] +**AuthUri** | Pointer to **string** | | [optional] +**ClientEmail** | Pointer to **string** | | [optional] +**ClientId** | Pointer to **string** | | [optional] +**ClientX509CertUrl** | Pointer to **string** | | [optional] +**PrivateKey** | Pointer to **string** | base64 encoded private key, beginning with -----BEGIN PRIVATE KEY----- | [optional] +**PrivateKeyId** | Pointer to **string** | | [optional] +**ProjectId** | Pointer to **string** | | [optional] +**TokenUri** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**UniverseDomain** | Pointer to **string** | | [optional] + +## Methods + +### NewGoogleWorkspaceCredentialFields + +`func NewGoogleWorkspaceCredentialFields(delegate string, ) *GoogleWorkspaceCredentialFields` + +NewGoogleWorkspaceCredentialFields instantiates a new GoogleWorkspaceCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGoogleWorkspaceCredentialFieldsWithDefaults + +`func NewGoogleWorkspaceCredentialFieldsWithDefaults() *GoogleWorkspaceCredentialFields` + +NewGoogleWorkspaceCredentialFieldsWithDefaults instantiates a new GoogleWorkspaceCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDelegate + +`func (o *GoogleWorkspaceCredentialFields) GetDelegate() string` + +GetDelegate returns the Delegate field if non-nil, zero value otherwise. + +### GetDelegateOk + +`func (o *GoogleWorkspaceCredentialFields) GetDelegateOk() (*string, bool)` + +GetDelegateOk returns a tuple with the Delegate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegate + +`func (o *GoogleWorkspaceCredentialFields) SetDelegate(v string)` + +SetDelegate sets Delegate field to given value. + + +### GetCustomerId + +`func (o *GoogleWorkspaceCredentialFields) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *GoogleWorkspaceCredentialFields) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *GoogleWorkspaceCredentialFields) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + +### HasCustomerId + +`func (o *GoogleWorkspaceCredentialFields) HasCustomerId() bool` + +HasCustomerId returns a boolean if a field has been set. + +### GetAuthProviderX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) GetAuthProviderX509CertUrl() string` + +GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field if non-nil, zero value otherwise. + +### GetAuthProviderX509CertUrlOk + +`func (o *GoogleWorkspaceCredentialFields) GetAuthProviderX509CertUrlOk() (*string, bool)` + +GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthProviderX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) SetAuthProviderX509CertUrl(v string)` + +SetAuthProviderX509CertUrl sets AuthProviderX509CertUrl field to given value. + +### HasAuthProviderX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) HasAuthProviderX509CertUrl() bool` + +HasAuthProviderX509CertUrl returns a boolean if a field has been set. + +### GetAuthUri + +`func (o *GoogleWorkspaceCredentialFields) GetAuthUri() string` + +GetAuthUri returns the AuthUri field if non-nil, zero value otherwise. + +### GetAuthUriOk + +`func (o *GoogleWorkspaceCredentialFields) GetAuthUriOk() (*string, bool)` + +GetAuthUriOk returns a tuple with the AuthUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthUri + +`func (o *GoogleWorkspaceCredentialFields) SetAuthUri(v string)` + +SetAuthUri sets AuthUri field to given value. + +### HasAuthUri + +`func (o *GoogleWorkspaceCredentialFields) HasAuthUri() bool` + +HasAuthUri returns a boolean if a field has been set. + +### GetClientEmail + +`func (o *GoogleWorkspaceCredentialFields) GetClientEmail() string` + +GetClientEmail returns the ClientEmail field if non-nil, zero value otherwise. + +### GetClientEmailOk + +`func (o *GoogleWorkspaceCredentialFields) GetClientEmailOk() (*string, bool)` + +GetClientEmailOk returns a tuple with the ClientEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientEmail + +`func (o *GoogleWorkspaceCredentialFields) SetClientEmail(v string)` + +SetClientEmail sets ClientEmail field to given value. + +### HasClientEmail + +`func (o *GoogleWorkspaceCredentialFields) HasClientEmail() bool` + +HasClientEmail returns a boolean if a field has been set. + +### GetClientId + +`func (o *GoogleWorkspaceCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *GoogleWorkspaceCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *GoogleWorkspaceCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *GoogleWorkspaceCredentialFields) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetClientX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) GetClientX509CertUrl() string` + +GetClientX509CertUrl returns the ClientX509CertUrl field if non-nil, zero value otherwise. + +### GetClientX509CertUrlOk + +`func (o *GoogleWorkspaceCredentialFields) GetClientX509CertUrlOk() (*string, bool)` + +GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) SetClientX509CertUrl(v string)` + +SetClientX509CertUrl sets ClientX509CertUrl field to given value. + +### HasClientX509CertUrl + +`func (o *GoogleWorkspaceCredentialFields) HasClientX509CertUrl() bool` + +HasClientX509CertUrl returns a boolean if a field has been set. + +### GetPrivateKey + +`func (o *GoogleWorkspaceCredentialFields) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *GoogleWorkspaceCredentialFields) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *GoogleWorkspaceCredentialFields) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### GetPrivateKeyId + +`func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyId() string` + +GetPrivateKeyId returns the PrivateKeyId field if non-nil, zero value otherwise. + +### GetPrivateKeyIdOk + +`func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyIdOk() (*string, bool)` + +GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKeyId + +`func (o *GoogleWorkspaceCredentialFields) SetPrivateKeyId(v string)` + +SetPrivateKeyId sets PrivateKeyId field to given value. + +### HasPrivateKeyId + +`func (o *GoogleWorkspaceCredentialFields) HasPrivateKeyId() bool` + +HasPrivateKeyId returns a boolean if a field has been set. + +### GetProjectId + +`func (o *GoogleWorkspaceCredentialFields) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *GoogleWorkspaceCredentialFields) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *GoogleWorkspaceCredentialFields) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + +### HasProjectId + +`func (o *GoogleWorkspaceCredentialFields) HasProjectId() bool` + +HasProjectId returns a boolean if a field has been set. + +### GetTokenUri + +`func (o *GoogleWorkspaceCredentialFields) GetTokenUri() string` + +GetTokenUri returns the TokenUri field if non-nil, zero value otherwise. + +### GetTokenUriOk + +`func (o *GoogleWorkspaceCredentialFields) GetTokenUriOk() (*string, bool)` + +GetTokenUriOk returns a tuple with the TokenUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenUri + +`func (o *GoogleWorkspaceCredentialFields) SetTokenUri(v string)` + +SetTokenUri sets TokenUri field to given value. + +### HasTokenUri + +`func (o *GoogleWorkspaceCredentialFields) HasTokenUri() bool` + +HasTokenUri returns a boolean if a field has been set. + +### GetType + +`func (o *GoogleWorkspaceCredentialFields) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GoogleWorkspaceCredentialFields) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GoogleWorkspaceCredentialFields) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GoogleWorkspaceCredentialFields) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUniverseDomain + +`func (o *GoogleWorkspaceCredentialFields) GetUniverseDomain() string` + +GetUniverseDomain returns the UniverseDomain field if non-nil, zero value otherwise. + +### GetUniverseDomainOk + +`func (o *GoogleWorkspaceCredentialFields) GetUniverseDomainOk() (*string, bool)` + +GetUniverseDomainOk returns a tuple with the UniverseDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUniverseDomain + +`func (o *GoogleWorkspaceCredentialFields) SetUniverseDomain(v string)` + +SetUniverseDomain sets UniverseDomain field to given value. + +### HasUniverseDomain + +`func (o *GoogleWorkspaceCredentialFields) HasUniverseDomain() bool` + +HasUniverseDomain returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Group.md b/go/docs/Group.md new file mode 100644 index 0000000..63f86b9 --- /dev/null +++ b/go/docs/Group.md @@ -0,0 +1,311 @@ +# Group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**RoleSummary** | Pointer to **string** | | [optional] +**UserCount** | Pointer to **int64** | | [optional] +**CreatedByEmail** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**ExpiresAt** | Pointer to **int64** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewGroup + +`func NewGroup(id string, ) *Group` + +NewGroup instantiates a new Group object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupWithDefaults + +`func NewGroupWithDefaults() *Group` + +NewGroupWithDefaults instantiates a new Group object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Group) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Group) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Group) SetId(v string)` + +SetId sets Id field to given value. + + +### GetDescription + +`func (o *Group) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Group) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Group) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Group) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *Group) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Group) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Group) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Group) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetRoleSummary + +`func (o *Group) GetRoleSummary() string` + +GetRoleSummary returns the RoleSummary field if non-nil, zero value otherwise. + +### GetRoleSummaryOk + +`func (o *Group) GetRoleSummaryOk() (*string, bool)` + +GetRoleSummaryOk returns a tuple with the RoleSummary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleSummary + +`func (o *Group) SetRoleSummary(v string)` + +SetRoleSummary sets RoleSummary field to given value. + +### HasRoleSummary + +`func (o *Group) HasRoleSummary() bool` + +HasRoleSummary returns a boolean if a field has been set. + +### GetUserCount + +`func (o *Group) GetUserCount() int64` + +GetUserCount returns the UserCount field if non-nil, zero value otherwise. + +### GetUserCountOk + +`func (o *Group) GetUserCountOk() (*int64, bool)` + +GetUserCountOk returns a tuple with the UserCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserCount + +`func (o *Group) SetUserCount(v int64)` + +SetUserCount sets UserCount field to given value. + +### HasUserCount + +`func (o *Group) HasUserCount() bool` + +HasUserCount returns a boolean if a field has been set. + +### GetCreatedByEmail + +`func (o *Group) GetCreatedByEmail() string` + +GetCreatedByEmail returns the CreatedByEmail field if non-nil, zero value otherwise. + +### GetCreatedByEmailOk + +`func (o *Group) GetCreatedByEmailOk() (*string, bool)` + +GetCreatedByEmailOk returns a tuple with the CreatedByEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByEmail + +`func (o *Group) SetCreatedByEmail(v string)` + +SetCreatedByEmail sets CreatedByEmail field to given value. + +### HasCreatedByEmail + +`func (o *Group) HasCreatedByEmail() bool` + +HasCreatedByEmail returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Group) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Group) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Group) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Group) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Group) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Group) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Group) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Group) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *Group) GetExpiresAt() int64` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *Group) GetExpiresAtOk() (*int64, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *Group) SetExpiresAt(v int64)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *Group) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *Group) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *Group) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *Group) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *Group) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *Group) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *Group) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *Group) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *Group) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/GroupMapping.md b/go/docs/GroupMapping.md new file mode 100644 index 0000000..549684a --- /dev/null +++ b/go/docs/GroupMapping.md @@ -0,0 +1,244 @@ +# GroupMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**GroupId** | **string** | | +**GroupName** | Pointer to **string** | | [optional] +**SsoAttribute** | **string** | | +**SsoValue** | **string** | | +**Description** | Pointer to **string** | | [optional] +**CreatedByEmail** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] + +## Methods + +### NewGroupMapping + +`func NewGroupMapping(id string, groupId string, ssoAttribute string, ssoValue string, ) *GroupMapping` + +NewGroupMapping instantiates a new GroupMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupMappingWithDefaults + +`func NewGroupMappingWithDefaults() *GroupMapping` + +NewGroupMappingWithDefaults instantiates a new GroupMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *GroupMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GroupMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GroupMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetGroupId + +`func (o *GroupMapping) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *GroupMapping) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *GroupMapping) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + +### GetGroupName + +`func (o *GroupMapping) GetGroupName() string` + +GetGroupName returns the GroupName field if non-nil, zero value otherwise. + +### GetGroupNameOk + +`func (o *GroupMapping) GetGroupNameOk() (*string, bool)` + +GetGroupNameOk returns a tuple with the GroupName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupName + +`func (o *GroupMapping) SetGroupName(v string)` + +SetGroupName sets GroupName field to given value. + +### HasGroupName + +`func (o *GroupMapping) HasGroupName() bool` + +HasGroupName returns a boolean if a field has been set. + +### GetSsoAttribute + +`func (o *GroupMapping) GetSsoAttribute() string` + +GetSsoAttribute returns the SsoAttribute field if non-nil, zero value otherwise. + +### GetSsoAttributeOk + +`func (o *GroupMapping) GetSsoAttributeOk() (*string, bool)` + +GetSsoAttributeOk returns a tuple with the SsoAttribute field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoAttribute + +`func (o *GroupMapping) SetSsoAttribute(v string)` + +SetSsoAttribute sets SsoAttribute field to given value. + + +### GetSsoValue + +`func (o *GroupMapping) GetSsoValue() string` + +GetSsoValue returns the SsoValue field if non-nil, zero value otherwise. + +### GetSsoValueOk + +`func (o *GroupMapping) GetSsoValueOk() (*string, bool)` + +GetSsoValueOk returns a tuple with the SsoValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoValue + +`func (o *GroupMapping) SetSsoValue(v string)` + +SetSsoValue sets SsoValue field to given value. + + +### GetDescription + +`func (o *GroupMapping) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GroupMapping) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GroupMapping) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GroupMapping) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCreatedByEmail + +`func (o *GroupMapping) GetCreatedByEmail() string` + +GetCreatedByEmail returns the CreatedByEmail field if non-nil, zero value otherwise. + +### GetCreatedByEmailOk + +`func (o *GroupMapping) GetCreatedByEmailOk() (*string, bool)` + +GetCreatedByEmailOk returns a tuple with the CreatedByEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByEmail + +`func (o *GroupMapping) SetCreatedByEmail(v string)` + +SetCreatedByEmail sets CreatedByEmail field to given value. + +### HasCreatedByEmail + +`func (o *GroupMapping) HasCreatedByEmail() bool` + +HasCreatedByEmail returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *GroupMapping) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *GroupMapping) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *GroupMapping) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *GroupMapping) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *GroupMapping) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *GroupMapping) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *GroupMapping) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *GroupMapping) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/GroupPost.md b/go/docs/GroupPost.md new file mode 100644 index 0000000..53b10b6 --- /dev/null +++ b/go/docs/GroupPost.md @@ -0,0 +1,160 @@ +# GroupPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ExpiresAt** | Pointer to **int64** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewGroupPost + +`func NewGroupPost() *GroupPost` + +NewGroupPost instantiates a new GroupPost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupPostWithDefaults + +`func NewGroupPostWithDefaults() *GroupPost` + +NewGroupPostWithDefaults instantiates a new GroupPost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *GroupPost) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GroupPost) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GroupPost) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GroupPost) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *GroupPost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GroupPost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GroupPost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GroupPost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *GroupPost) GetExpiresAt() int64` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *GroupPost) GetExpiresAtOk() (*int64, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *GroupPost) SetExpiresAt(v int64)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *GroupPost) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *GroupPost) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *GroupPost) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *GroupPost) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *GroupPost) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *GroupPost) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *GroupPost) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *GroupPost) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *GroupPost) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/GroupPut.md b/go/docs/GroupPut.md new file mode 100644 index 0000000..41cf1e8 --- /dev/null +++ b/go/docs/GroupPut.md @@ -0,0 +1,186 @@ +# GroupPut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ExpiresAt** | Pointer to **int64** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewGroupPut + +`func NewGroupPut() *GroupPut` + +NewGroupPut instantiates a new GroupPut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupPutWithDefaults + +`func NewGroupPutWithDefaults() *GroupPut` + +NewGroupPutWithDefaults instantiates a new GroupPut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *GroupPut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GroupPut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GroupPut) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GroupPut) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDescription + +`func (o *GroupPut) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GroupPut) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GroupPut) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GroupPut) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *GroupPut) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GroupPut) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GroupPut) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GroupPut) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *GroupPut) GetExpiresAt() int64` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *GroupPut) GetExpiresAtOk() (*int64, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *GroupPut) SetExpiresAt(v int64)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *GroupPut) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *GroupPut) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *GroupPut) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *GroupPut) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *GroupPut) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *GroupPut) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *GroupPut) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *GroupPut) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *GroupPut) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/HealthCheckResponse.md b/go/docs/HealthCheckResponse.md new file mode 100644 index 0000000..c6fc769 --- /dev/null +++ b/go/docs/HealthCheckResponse.md @@ -0,0 +1,72 @@ +# HealthCheckResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | +**Version** | **string** | | + +## Methods + +### NewHealthCheckResponse + +`func NewHealthCheckResponse(status string, version string, ) *HealthCheckResponse` + +NewHealthCheckResponse instantiates a new HealthCheckResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckResponseWithDefaults + +`func NewHealthCheckResponseWithDefaults() *HealthCheckResponse` + +NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *HealthCheckResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *HealthCheckResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetVersion + +`func (o *HealthCheckResponse) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *HealthCheckResponse) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *HealthCheckResponse) SetVersion(v string)` + +SetVersion sets Version field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/HostedZone.md b/go/docs/HostedZone.md new file mode 100644 index 0000000..d99b6a8 --- /dev/null +++ b/go/docs/HostedZone.md @@ -0,0 +1,285 @@ +# HostedZone + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the hosted zone | +**Name** | Pointer to **string** | | [optional] +**Enabled** | Pointer to **bool** | Whether the hosted zone is enabled | [optional] +**UpdatedAt** | Pointer to **time.Time** | The last modification time of the hosted zone | [optional] +**ProcessorId** | Pointer to **string** | The processor ID assigned to the hosted zone | [optional] +**ExplorersConcurrency** | Pointer to **int64** | The number of concurrent explorer tasks that can be executed | [optional] +**ExplorersTotal** | Pointer to **int64** | The number of explorers available in the zone | [optional] +**TasksActive** | Pointer to **int64** | The number of tasks executing in the zone | [optional] +**TasksWaiting** | Pointer to **int64** | The number of tasks waiting to execute in the zone | [optional] +**OrganizationId** | Pointer to **string** | The ID of the organization the hosted zone is assigned to | [optional] + +## Methods + +### NewHostedZone + +`func NewHostedZone(id string, ) *HostedZone` + +NewHostedZone instantiates a new HostedZone object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHostedZoneWithDefaults + +`func NewHostedZoneWithDefaults() *HostedZone` + +NewHostedZoneWithDefaults instantiates a new HostedZone object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *HostedZone) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HostedZone) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *HostedZone) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *HostedZone) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *HostedZone) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *HostedZone) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *HostedZone) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEnabled + +`func (o *HostedZone) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *HostedZone) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *HostedZone) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *HostedZone) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *HostedZone) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *HostedZone) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *HostedZone) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *HostedZone) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetProcessorId + +`func (o *HostedZone) GetProcessorId() string` + +GetProcessorId returns the ProcessorId field if non-nil, zero value otherwise. + +### GetProcessorIdOk + +`func (o *HostedZone) GetProcessorIdOk() (*string, bool)` + +GetProcessorIdOk returns a tuple with the ProcessorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProcessorId + +`func (o *HostedZone) SetProcessorId(v string)` + +SetProcessorId sets ProcessorId field to given value. + +### HasProcessorId + +`func (o *HostedZone) HasProcessorId() bool` + +HasProcessorId returns a boolean if a field has been set. + +### GetExplorersConcurrency + +`func (o *HostedZone) GetExplorersConcurrency() int64` + +GetExplorersConcurrency returns the ExplorersConcurrency field if non-nil, zero value otherwise. + +### GetExplorersConcurrencyOk + +`func (o *HostedZone) GetExplorersConcurrencyOk() (*int64, bool)` + +GetExplorersConcurrencyOk returns a tuple with the ExplorersConcurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExplorersConcurrency + +`func (o *HostedZone) SetExplorersConcurrency(v int64)` + +SetExplorersConcurrency sets ExplorersConcurrency field to given value. + +### HasExplorersConcurrency + +`func (o *HostedZone) HasExplorersConcurrency() bool` + +HasExplorersConcurrency returns a boolean if a field has been set. + +### GetExplorersTotal + +`func (o *HostedZone) GetExplorersTotal() int64` + +GetExplorersTotal returns the ExplorersTotal field if non-nil, zero value otherwise. + +### GetExplorersTotalOk + +`func (o *HostedZone) GetExplorersTotalOk() (*int64, bool)` + +GetExplorersTotalOk returns a tuple with the ExplorersTotal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExplorersTotal + +`func (o *HostedZone) SetExplorersTotal(v int64)` + +SetExplorersTotal sets ExplorersTotal field to given value. + +### HasExplorersTotal + +`func (o *HostedZone) HasExplorersTotal() bool` + +HasExplorersTotal returns a boolean if a field has been set. + +### GetTasksActive + +`func (o *HostedZone) GetTasksActive() int64` + +GetTasksActive returns the TasksActive field if non-nil, zero value otherwise. + +### GetTasksActiveOk + +`func (o *HostedZone) GetTasksActiveOk() (*int64, bool)` + +GetTasksActiveOk returns a tuple with the TasksActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTasksActive + +`func (o *HostedZone) SetTasksActive(v int64)` + +SetTasksActive sets TasksActive field to given value. + +### HasTasksActive + +`func (o *HostedZone) HasTasksActive() bool` + +HasTasksActive returns a boolean if a field has been set. + +### GetTasksWaiting + +`func (o *HostedZone) GetTasksWaiting() int64` + +GetTasksWaiting returns the TasksWaiting field if non-nil, zero value otherwise. + +### GetTasksWaitingOk + +`func (o *HostedZone) GetTasksWaitingOk() (*int64, bool)` + +GetTasksWaitingOk returns a tuple with the TasksWaiting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTasksWaiting + +`func (o *HostedZone) SetTasksWaiting(v int64)` + +SetTasksWaiting sets TasksWaiting field to given value. + +### HasTasksWaiting + +`func (o *HostedZone) HasTasksWaiting() bool` + +HasTasksWaiting returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *HostedZone) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *HostedZone) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *HostedZone) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *HostedZone) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ImportAPI.md b/go/docs/ImportAPI.md new file mode 100644 index 0000000..276ea66 --- /dev/null +++ b/go/docs/ImportAPI.md @@ -0,0 +1,87 @@ +# \ImportAPI + +All URIs are relative to *https://console.runzero.com/api/v1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ImportCustomIntegrationAssets**](ImportAPI.md#ImportCustomIntegrationAssets) | **Post** /import/org/{orgID}/assets | Import assets described by a registered custom integration + + + +## ImportCustomIntegrationAssets + +> Task ImportCustomIntegrationAssets(ctx, orgID).SiteId(siteId).CustomIntegrationId(customIntegrationId).ImportTask(importTask).AssetData(assetData).Execute() + +Import assets described by a registered custom integration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + orgID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the organization to import the assets into + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the site assets are to be imported into. + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registered custom integration which produced the asset data. Uniqueness is not checked/enforced. See /account/custom-integrations api. + importTask := *openapiclient.NewImportTask("my import task") // ImportTask | + assetData := os.NewFile(1234, "some_file") // *os.File | A gzip (not .tar.gz) compressed file containing ImportAsset objects. The file data may be a JSON array of ImportAsset objects, e.g. [{},{},...] or JSONL format, with a single JSON representation of an ImportAsset object on each new line, e.g. {}\\\\n{}\\\\n... + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ImportAPI.ImportCustomIntegrationAssets(context.Background(), orgID).SiteId(siteId).CustomIntegrationId(customIntegrationId).ImportTask(importTask).AssetData(assetData).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ImportAPI.ImportCustomIntegrationAssets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportCustomIntegrationAssets`: Task + fmt.Fprintf(os.Stdout, "Response from `ImportAPI.ImportCustomIntegrationAssets`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgID** | **string** | The ID of the organization to import the assets into | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportCustomIntegrationAssetsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **siteId** | **string** | The ID of the site assets are to be imported into. | + **customIntegrationId** | **string** | The unique ID of the registered custom integration which produced the asset data. Uniqueness is not checked/enforced. See /account/custom-integrations api. | + **importTask** | [**ImportTask**](ImportTask.md) | | + **assetData** | ***os.File** | A gzip (not .tar.gz) compressed file containing ImportAsset objects. The file data may be a JSON array of ImportAsset objects, e.g. [{},{},...] or JSONL format, with a single JSON representation of an ImportAsset object on each new line, e.g. {}\\\\n{}\\\\n... | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/docs/ImportAsset.md b/go/docs/ImportAsset.md new file mode 100644 index 0000000..5ffa60c --- /dev/null +++ b/go/docs/ImportAsset.md @@ -0,0 +1,363 @@ +# ImportAsset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Any value which can uniquely identify the asset within the custom integration. | +**RunZeroID** | Pointer to **string** | The unique identifier of the runZero asset to merge into. | [optional] +**NetworkInterfaces** | Pointer to [**[]NetworkInterface**](NetworkInterface.md) | The asset's networking configuration. | [optional] +**Hostnames** | Pointer to **[]string** | Represents hostnames the asset is assigned or reachable at. These can be fully-qualified hostnames with the domain name, or a short hostname. | [optional] +**Domain** | Pointer to **string** | Represents a single domain name which could be applied to all non-fqdns in the hostnames field. | [optional] +**FirstSeenTS** | Pointer to **time.Time** | Represents the earliest time the asset was seen by the custom integration reporting it, using a date string as defined by RFC 3339, section 5.6. | [optional] +**Os** | Pointer to **string** | The name of the asset's operating system. It is advisable to keep the data clean by normalizing to existing values when possible. | [optional] +**OsVersion** | Pointer to **string** | The version of the asset's operating system. It is advisable to keep the data clean by normalizing to existing values when possible. | [optional] +**Manufacturer** | Pointer to **string** | The manufacturer of the operating system of the asset. It is advisable to keep the data clean by normalizing to existing values when possible. | [optional] +**Model** | Pointer to **string** | The hardware model of the asset. It is advisable to keep the data clean by normalizing to existing values when possible. | [optional] +**Tags** | Pointer to **[]string** | Arbitrary string tags applied to the asset. | [optional] +**DeviceType** | Pointer to **string** | | [optional] +**CustomAttributes** | Pointer to [**map[string]CustomAttributesValue**](CustomAttributesValue.md) | Flat map of arbitrary string key/value pairs representing custom attribute data not described in properties above. Note the maximum number of keys and length of values. Additionally, property names may only be 256 characters long. | [optional] + +## Methods + +### NewImportAsset + +`func NewImportAsset(id string, ) *ImportAsset` + +NewImportAsset instantiates a new ImportAsset object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImportAssetWithDefaults + +`func NewImportAssetWithDefaults() *ImportAsset` + +NewImportAssetWithDefaults instantiates a new ImportAsset object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ImportAsset) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ImportAsset) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ImportAsset) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRunZeroID + +`func (o *ImportAsset) GetRunZeroID() string` + +GetRunZeroID returns the RunZeroID field if non-nil, zero value otherwise. + +### GetRunZeroIDOk + +`func (o *ImportAsset) GetRunZeroIDOk() (*string, bool)` + +GetRunZeroIDOk returns a tuple with the RunZeroID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRunZeroID + +`func (o *ImportAsset) SetRunZeroID(v string)` + +SetRunZeroID sets RunZeroID field to given value. + +### HasRunZeroID + +`func (o *ImportAsset) HasRunZeroID() bool` + +HasRunZeroID returns a boolean if a field has been set. + +### GetNetworkInterfaces + +`func (o *ImportAsset) GetNetworkInterfaces() []NetworkInterface` + +GetNetworkInterfaces returns the NetworkInterfaces field if non-nil, zero value otherwise. + +### GetNetworkInterfacesOk + +`func (o *ImportAsset) GetNetworkInterfacesOk() (*[]NetworkInterface, bool)` + +GetNetworkInterfacesOk returns a tuple with the NetworkInterfaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkInterfaces + +`func (o *ImportAsset) SetNetworkInterfaces(v []NetworkInterface)` + +SetNetworkInterfaces sets NetworkInterfaces field to given value. + +### HasNetworkInterfaces + +`func (o *ImportAsset) HasNetworkInterfaces() bool` + +HasNetworkInterfaces returns a boolean if a field has been set. + +### GetHostnames + +`func (o *ImportAsset) GetHostnames() []string` + +GetHostnames returns the Hostnames field if non-nil, zero value otherwise. + +### GetHostnamesOk + +`func (o *ImportAsset) GetHostnamesOk() (*[]string, bool)` + +GetHostnamesOk returns a tuple with the Hostnames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostnames + +`func (o *ImportAsset) SetHostnames(v []string)` + +SetHostnames sets Hostnames field to given value. + +### HasHostnames + +`func (o *ImportAsset) HasHostnames() bool` + +HasHostnames returns a boolean if a field has been set. + +### GetDomain + +`func (o *ImportAsset) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *ImportAsset) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *ImportAsset) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *ImportAsset) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetFirstSeenTS + +`func (o *ImportAsset) GetFirstSeenTS() time.Time` + +GetFirstSeenTS returns the FirstSeenTS field if non-nil, zero value otherwise. + +### GetFirstSeenTSOk + +`func (o *ImportAsset) GetFirstSeenTSOk() (*time.Time, bool)` + +GetFirstSeenTSOk returns a tuple with the FirstSeenTS field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeenTS + +`func (o *ImportAsset) SetFirstSeenTS(v time.Time)` + +SetFirstSeenTS sets FirstSeenTS field to given value. + +### HasFirstSeenTS + +`func (o *ImportAsset) HasFirstSeenTS() bool` + +HasFirstSeenTS returns a boolean if a field has been set. + +### GetOs + +`func (o *ImportAsset) GetOs() string` + +GetOs returns the Os field if non-nil, zero value otherwise. + +### GetOsOk + +`func (o *ImportAsset) GetOsOk() (*string, bool)` + +GetOsOk returns a tuple with the Os field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOs + +`func (o *ImportAsset) SetOs(v string)` + +SetOs sets Os field to given value. + +### HasOs + +`func (o *ImportAsset) HasOs() bool` + +HasOs returns a boolean if a field has been set. + +### GetOsVersion + +`func (o *ImportAsset) GetOsVersion() string` + +GetOsVersion returns the OsVersion field if non-nil, zero value otherwise. + +### GetOsVersionOk + +`func (o *ImportAsset) GetOsVersionOk() (*string, bool)` + +GetOsVersionOk returns a tuple with the OsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOsVersion + +`func (o *ImportAsset) SetOsVersion(v string)` + +SetOsVersion sets OsVersion field to given value. + +### HasOsVersion + +`func (o *ImportAsset) HasOsVersion() bool` + +HasOsVersion returns a boolean if a field has been set. + +### GetManufacturer + +`func (o *ImportAsset) GetManufacturer() string` + +GetManufacturer returns the Manufacturer field if non-nil, zero value otherwise. + +### GetManufacturerOk + +`func (o *ImportAsset) GetManufacturerOk() (*string, bool)` + +GetManufacturerOk returns a tuple with the Manufacturer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManufacturer + +`func (o *ImportAsset) SetManufacturer(v string)` + +SetManufacturer sets Manufacturer field to given value. + +### HasManufacturer + +`func (o *ImportAsset) HasManufacturer() bool` + +HasManufacturer returns a boolean if a field has been set. + +### GetModel + +`func (o *ImportAsset) GetModel() string` + +GetModel returns the Model field if non-nil, zero value otherwise. + +### GetModelOk + +`func (o *ImportAsset) GetModelOk() (*string, bool)` + +GetModelOk returns a tuple with the Model field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModel + +`func (o *ImportAsset) SetModel(v string)` + +SetModel sets Model field to given value. + +### HasModel + +`func (o *ImportAsset) HasModel() bool` + +HasModel returns a boolean if a field has been set. + +### GetTags + +`func (o *ImportAsset) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ImportAsset) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ImportAsset) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ImportAsset) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetDeviceType + +`func (o *ImportAsset) GetDeviceType() string` + +GetDeviceType returns the DeviceType field if non-nil, zero value otherwise. + +### GetDeviceTypeOk + +`func (o *ImportAsset) GetDeviceTypeOk() (*string, bool)` + +GetDeviceTypeOk returns a tuple with the DeviceType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceType + +`func (o *ImportAsset) SetDeviceType(v string)` + +SetDeviceType sets DeviceType field to given value. + +### HasDeviceType + +`func (o *ImportAsset) HasDeviceType() bool` + +HasDeviceType returns a boolean if a field has been set. + +### GetCustomAttributes + +`func (o *ImportAsset) GetCustomAttributes() map[string]CustomAttributesValue` + +GetCustomAttributes returns the CustomAttributes field if non-nil, zero value otherwise. + +### GetCustomAttributesOk + +`func (o *ImportAsset) GetCustomAttributesOk() (*map[string]CustomAttributesValue, bool)` + +GetCustomAttributesOk returns a tuple with the CustomAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAttributes + +`func (o *ImportAsset) SetCustomAttributes(v map[string]CustomAttributesValue)` + +SetCustomAttributes sets CustomAttributes field to given value. + +### HasCustomAttributes + +`func (o *ImportAsset) HasCustomAttributes() bool` + +HasCustomAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ImportTask.md b/go/docs/ImportTask.md new file mode 100644 index 0000000..43ce916 --- /dev/null +++ b/go/docs/ImportTask.md @@ -0,0 +1,129 @@ +# ImportTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**ExcludeUnknown** | Pointer to **bool** | Instructs the data ingestion process whether to skip assets which do not merge into an existing asset in the asset inventory | [optional] [default to false] +**Tags** | Pointer to **[]string** | Arbitrary string tag values which are applied to the asset data import task created. | [optional] + +## Methods + +### NewImportTask + +`func NewImportTask(name string, ) *ImportTask` + +NewImportTask instantiates a new ImportTask object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImportTaskWithDefaults + +`func NewImportTaskWithDefaults() *ImportTask` + +NewImportTaskWithDefaults instantiates a new ImportTask object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ImportTask) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ImportTask) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ImportTask) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ImportTask) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ImportTask) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ImportTask) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ImportTask) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetExcludeUnknown + +`func (o *ImportTask) GetExcludeUnknown() bool` + +GetExcludeUnknown returns the ExcludeUnknown field if non-nil, zero value otherwise. + +### GetExcludeUnknownOk + +`func (o *ImportTask) GetExcludeUnknownOk() (*bool, bool)` + +GetExcludeUnknownOk returns a tuple with the ExcludeUnknown field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeUnknown + +`func (o *ImportTask) SetExcludeUnknown(v bool)` + +SetExcludeUnknown sets ExcludeUnknown field to given value. + +### HasExcludeUnknown + +`func (o *ImportTask) HasExcludeUnknown() bool` + +HasExcludeUnknown returns a boolean if a field has been set. + +### GetTags + +`func (o *ImportTask) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ImportTask) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ImportTask) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ImportTask) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/InsightVMCredentialFields.md b/go/docs/InsightVMCredentialFields.md new file mode 100644 index 0000000..e020436 --- /dev/null +++ b/go/docs/InsightVMCredentialFields.md @@ -0,0 +1,145 @@ +# InsightVMCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**Username** | **string** | | +**Password** | **string** | | +**Insecure** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] + +## Methods + +### NewInsightVMCredentialFields + +`func NewInsightVMCredentialFields(apiUrl string, username string, password string, ) *InsightVMCredentialFields` + +NewInsightVMCredentialFields instantiates a new InsightVMCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInsightVMCredentialFieldsWithDefaults + +`func NewInsightVMCredentialFieldsWithDefaults() *InsightVMCredentialFields` + +NewInsightVMCredentialFieldsWithDefaults instantiates a new InsightVMCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *InsightVMCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *InsightVMCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *InsightVMCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetUsername + +`func (o *InsightVMCredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *InsightVMCredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *InsightVMCredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *InsightVMCredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *InsightVMCredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *InsightVMCredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetInsecure + +`func (o *InsightVMCredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *InsightVMCredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *InsightVMCredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *InsightVMCredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *InsightVMCredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *InsightVMCredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *InsightVMCredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *InsightVMCredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/LDAPCredentialFields.md b/go/docs/LDAPCredentialFields.md new file mode 100644 index 0000000..58a4661 --- /dev/null +++ b/go/docs/LDAPCredentialFields.md @@ -0,0 +1,192 @@ +# LDAPCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Username** | **string** | | +**Password** | **string** | | +**BaseDn** | **string** | | +**Insecure** | Pointer to **string** | | [optional] +**LegacyTls** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] + +## Methods + +### NewLDAPCredentialFields + +`func NewLDAPCredentialFields(url string, username string, password string, baseDn string, ) *LDAPCredentialFields` + +NewLDAPCredentialFields instantiates a new LDAPCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLDAPCredentialFieldsWithDefaults + +`func NewLDAPCredentialFieldsWithDefaults() *LDAPCredentialFields` + +NewLDAPCredentialFieldsWithDefaults instantiates a new LDAPCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *LDAPCredentialFields) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *LDAPCredentialFields) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *LDAPCredentialFields) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetUsername + +`func (o *LDAPCredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *LDAPCredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *LDAPCredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *LDAPCredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *LDAPCredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *LDAPCredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetBaseDn + +`func (o *LDAPCredentialFields) GetBaseDn() string` + +GetBaseDn returns the BaseDn field if non-nil, zero value otherwise. + +### GetBaseDnOk + +`func (o *LDAPCredentialFields) GetBaseDnOk() (*string, bool)` + +GetBaseDnOk returns a tuple with the BaseDn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBaseDn + +`func (o *LDAPCredentialFields) SetBaseDn(v string)` + +SetBaseDn sets BaseDn field to given value. + + +### GetInsecure + +`func (o *LDAPCredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *LDAPCredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *LDAPCredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *LDAPCredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetLegacyTls + +`func (o *LDAPCredentialFields) GetLegacyTls() string` + +GetLegacyTls returns the LegacyTls field if non-nil, zero value otherwise. + +### GetLegacyTlsOk + +`func (o *LDAPCredentialFields) GetLegacyTlsOk() (*string, bool)` + +GetLegacyTlsOk returns a tuple with the LegacyTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLegacyTls + +`func (o *LDAPCredentialFields) SetLegacyTls(v string)` + +SetLegacyTls sets LegacyTls field to given value. + +### HasLegacyTls + +`func (o *LDAPCredentialFields) HasLegacyTls() bool` + +HasLegacyTls returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *LDAPCredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *LDAPCredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *LDAPCredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *LDAPCredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/License.md b/go/docs/License.md new file mode 100644 index 0000000..cec8c8c --- /dev/null +++ b/go/docs/License.md @@ -0,0 +1,836 @@ +# License + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ActivatedAt** | Pointer to **int64** | | [optional] +**LicenseType** | Pointer to **string** | | [optional] +**LicenseExpiration** | Pointer to **int64** | | [optional] +**LicenseMaxAssets** | Pointer to **int64** | | [optional] +**LicenseLiveAssetCount** | Pointer to **int64** | | [optional] +**LicenseProjectAssetCount** | Pointer to **int64** | | [optional] +**ViaReseller** | Pointer to **bool** | | [optional] +**Phone** | Pointer to **string** | | [optional] +**AddressStreet** | Pointer to **string** | | [optional] +**AddressCountry** | Pointer to **string** | | [optional] +**AddressCity** | Pointer to **string** | | [optional] +**AddressRegion** | Pointer to **string** | | [optional] +**AddressPostal** | Pointer to **string** | | [optional] +**SubscriptionPeriodStart** | Pointer to **int64** | | [optional] +**SubscriptionPeriodEnd** | Pointer to **int64** | | [optional] +**SubscriptionCancelAt** | Pointer to **int64** | | [optional] +**SubscriptionCanceledAt** | Pointer to **int64** | | [optional] +**Settings** | Pointer to **map[string]interface{}** | | [optional] +**SsoType** | Pointer to **string** | | [optional] +**SsoDomain** | Pointer to **string** | | [optional] +**SsoMode** | Pointer to **string** | | [optional] +**SsoLoginMessage** | Pointer to **string** | | [optional] +**SsoLoginIssuerUrl** | Pointer to **string** | | [optional] +**SsoLoginLoginUrl** | Pointer to **string** | | [optional] +**SsoLoginLogoutUrl** | Pointer to **string** | | [optional] +**SsoDefaultRole** | Pointer to **string** | | [optional] +**Partner** | Pointer to **string** | | [optional] + +## Methods + +### NewLicense + +`func NewLicense() *License` + +NewLicense instantiates a new License object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLicenseWithDefaults + +`func NewLicenseWithDefaults() *License` + +NewLicenseWithDefaults instantiates a new License object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *License) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *License) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *License) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *License) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *License) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *License) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *License) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *License) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *License) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *License) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *License) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *License) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetName + +`func (o *License) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *License) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *License) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *License) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActivatedAt + +`func (o *License) GetActivatedAt() int64` + +GetActivatedAt returns the ActivatedAt field if non-nil, zero value otherwise. + +### GetActivatedAtOk + +`func (o *License) GetActivatedAtOk() (*int64, bool)` + +GetActivatedAtOk returns a tuple with the ActivatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActivatedAt + +`func (o *License) SetActivatedAt(v int64)` + +SetActivatedAt sets ActivatedAt field to given value. + +### HasActivatedAt + +`func (o *License) HasActivatedAt() bool` + +HasActivatedAt returns a boolean if a field has been set. + +### GetLicenseType + +`func (o *License) GetLicenseType() string` + +GetLicenseType returns the LicenseType field if non-nil, zero value otherwise. + +### GetLicenseTypeOk + +`func (o *License) GetLicenseTypeOk() (*string, bool)` + +GetLicenseTypeOk returns a tuple with the LicenseType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLicenseType + +`func (o *License) SetLicenseType(v string)` + +SetLicenseType sets LicenseType field to given value. + +### HasLicenseType + +`func (o *License) HasLicenseType() bool` + +HasLicenseType returns a boolean if a field has been set. + +### GetLicenseExpiration + +`func (o *License) GetLicenseExpiration() int64` + +GetLicenseExpiration returns the LicenseExpiration field if non-nil, zero value otherwise. + +### GetLicenseExpirationOk + +`func (o *License) GetLicenseExpirationOk() (*int64, bool)` + +GetLicenseExpirationOk returns a tuple with the LicenseExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLicenseExpiration + +`func (o *License) SetLicenseExpiration(v int64)` + +SetLicenseExpiration sets LicenseExpiration field to given value. + +### HasLicenseExpiration + +`func (o *License) HasLicenseExpiration() bool` + +HasLicenseExpiration returns a boolean if a field has been set. + +### GetLicenseMaxAssets + +`func (o *License) GetLicenseMaxAssets() int64` + +GetLicenseMaxAssets returns the LicenseMaxAssets field if non-nil, zero value otherwise. + +### GetLicenseMaxAssetsOk + +`func (o *License) GetLicenseMaxAssetsOk() (*int64, bool)` + +GetLicenseMaxAssetsOk returns a tuple with the LicenseMaxAssets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLicenseMaxAssets + +`func (o *License) SetLicenseMaxAssets(v int64)` + +SetLicenseMaxAssets sets LicenseMaxAssets field to given value. + +### HasLicenseMaxAssets + +`func (o *License) HasLicenseMaxAssets() bool` + +HasLicenseMaxAssets returns a boolean if a field has been set. + +### GetLicenseLiveAssetCount + +`func (o *License) GetLicenseLiveAssetCount() int64` + +GetLicenseLiveAssetCount returns the LicenseLiveAssetCount field if non-nil, zero value otherwise. + +### GetLicenseLiveAssetCountOk + +`func (o *License) GetLicenseLiveAssetCountOk() (*int64, bool)` + +GetLicenseLiveAssetCountOk returns a tuple with the LicenseLiveAssetCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLicenseLiveAssetCount + +`func (o *License) SetLicenseLiveAssetCount(v int64)` + +SetLicenseLiveAssetCount sets LicenseLiveAssetCount field to given value. + +### HasLicenseLiveAssetCount + +`func (o *License) HasLicenseLiveAssetCount() bool` + +HasLicenseLiveAssetCount returns a boolean if a field has been set. + +### GetLicenseProjectAssetCount + +`func (o *License) GetLicenseProjectAssetCount() int64` + +GetLicenseProjectAssetCount returns the LicenseProjectAssetCount field if non-nil, zero value otherwise. + +### GetLicenseProjectAssetCountOk + +`func (o *License) GetLicenseProjectAssetCountOk() (*int64, bool)` + +GetLicenseProjectAssetCountOk returns a tuple with the LicenseProjectAssetCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLicenseProjectAssetCount + +`func (o *License) SetLicenseProjectAssetCount(v int64)` + +SetLicenseProjectAssetCount sets LicenseProjectAssetCount field to given value. + +### HasLicenseProjectAssetCount + +`func (o *License) HasLicenseProjectAssetCount() bool` + +HasLicenseProjectAssetCount returns a boolean if a field has been set. + +### GetViaReseller + +`func (o *License) GetViaReseller() bool` + +GetViaReseller returns the ViaReseller field if non-nil, zero value otherwise. + +### GetViaResellerOk + +`func (o *License) GetViaResellerOk() (*bool, bool)` + +GetViaResellerOk returns a tuple with the ViaReseller field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViaReseller + +`func (o *License) SetViaReseller(v bool)` + +SetViaReseller sets ViaReseller field to given value. + +### HasViaReseller + +`func (o *License) HasViaReseller() bool` + +HasViaReseller returns a boolean if a field has been set. + +### GetPhone + +`func (o *License) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *License) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *License) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *License) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetAddressStreet + +`func (o *License) GetAddressStreet() string` + +GetAddressStreet returns the AddressStreet field if non-nil, zero value otherwise. + +### GetAddressStreetOk + +`func (o *License) GetAddressStreetOk() (*string, bool)` + +GetAddressStreetOk returns a tuple with the AddressStreet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressStreet + +`func (o *License) SetAddressStreet(v string)` + +SetAddressStreet sets AddressStreet field to given value. + +### HasAddressStreet + +`func (o *License) HasAddressStreet() bool` + +HasAddressStreet returns a boolean if a field has been set. + +### GetAddressCountry + +`func (o *License) GetAddressCountry() string` + +GetAddressCountry returns the AddressCountry field if non-nil, zero value otherwise. + +### GetAddressCountryOk + +`func (o *License) GetAddressCountryOk() (*string, bool)` + +GetAddressCountryOk returns a tuple with the AddressCountry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressCountry + +`func (o *License) SetAddressCountry(v string)` + +SetAddressCountry sets AddressCountry field to given value. + +### HasAddressCountry + +`func (o *License) HasAddressCountry() bool` + +HasAddressCountry returns a boolean if a field has been set. + +### GetAddressCity + +`func (o *License) GetAddressCity() string` + +GetAddressCity returns the AddressCity field if non-nil, zero value otherwise. + +### GetAddressCityOk + +`func (o *License) GetAddressCityOk() (*string, bool)` + +GetAddressCityOk returns a tuple with the AddressCity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressCity + +`func (o *License) SetAddressCity(v string)` + +SetAddressCity sets AddressCity field to given value. + +### HasAddressCity + +`func (o *License) HasAddressCity() bool` + +HasAddressCity returns a boolean if a field has been set. + +### GetAddressRegion + +`func (o *License) GetAddressRegion() string` + +GetAddressRegion returns the AddressRegion field if non-nil, zero value otherwise. + +### GetAddressRegionOk + +`func (o *License) GetAddressRegionOk() (*string, bool)` + +GetAddressRegionOk returns a tuple with the AddressRegion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressRegion + +`func (o *License) SetAddressRegion(v string)` + +SetAddressRegion sets AddressRegion field to given value. + +### HasAddressRegion + +`func (o *License) HasAddressRegion() bool` + +HasAddressRegion returns a boolean if a field has been set. + +### GetAddressPostal + +`func (o *License) GetAddressPostal() string` + +GetAddressPostal returns the AddressPostal field if non-nil, zero value otherwise. + +### GetAddressPostalOk + +`func (o *License) GetAddressPostalOk() (*string, bool)` + +GetAddressPostalOk returns a tuple with the AddressPostal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressPostal + +`func (o *License) SetAddressPostal(v string)` + +SetAddressPostal sets AddressPostal field to given value. + +### HasAddressPostal + +`func (o *License) HasAddressPostal() bool` + +HasAddressPostal returns a boolean if a field has been set. + +### GetSubscriptionPeriodStart + +`func (o *License) GetSubscriptionPeriodStart() int64` + +GetSubscriptionPeriodStart returns the SubscriptionPeriodStart field if non-nil, zero value otherwise. + +### GetSubscriptionPeriodStartOk + +`func (o *License) GetSubscriptionPeriodStartOk() (*int64, bool)` + +GetSubscriptionPeriodStartOk returns a tuple with the SubscriptionPeriodStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionPeriodStart + +`func (o *License) SetSubscriptionPeriodStart(v int64)` + +SetSubscriptionPeriodStart sets SubscriptionPeriodStart field to given value. + +### HasSubscriptionPeriodStart + +`func (o *License) HasSubscriptionPeriodStart() bool` + +HasSubscriptionPeriodStart returns a boolean if a field has been set. + +### GetSubscriptionPeriodEnd + +`func (o *License) GetSubscriptionPeriodEnd() int64` + +GetSubscriptionPeriodEnd returns the SubscriptionPeriodEnd field if non-nil, zero value otherwise. + +### GetSubscriptionPeriodEndOk + +`func (o *License) GetSubscriptionPeriodEndOk() (*int64, bool)` + +GetSubscriptionPeriodEndOk returns a tuple with the SubscriptionPeriodEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionPeriodEnd + +`func (o *License) SetSubscriptionPeriodEnd(v int64)` + +SetSubscriptionPeriodEnd sets SubscriptionPeriodEnd field to given value. + +### HasSubscriptionPeriodEnd + +`func (o *License) HasSubscriptionPeriodEnd() bool` + +HasSubscriptionPeriodEnd returns a boolean if a field has been set. + +### GetSubscriptionCancelAt + +`func (o *License) GetSubscriptionCancelAt() int64` + +GetSubscriptionCancelAt returns the SubscriptionCancelAt field if non-nil, zero value otherwise. + +### GetSubscriptionCancelAtOk + +`func (o *License) GetSubscriptionCancelAtOk() (*int64, bool)` + +GetSubscriptionCancelAtOk returns a tuple with the SubscriptionCancelAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionCancelAt + +`func (o *License) SetSubscriptionCancelAt(v int64)` + +SetSubscriptionCancelAt sets SubscriptionCancelAt field to given value. + +### HasSubscriptionCancelAt + +`func (o *License) HasSubscriptionCancelAt() bool` + +HasSubscriptionCancelAt returns a boolean if a field has been set. + +### GetSubscriptionCanceledAt + +`func (o *License) GetSubscriptionCanceledAt() int64` + +GetSubscriptionCanceledAt returns the SubscriptionCanceledAt field if non-nil, zero value otherwise. + +### GetSubscriptionCanceledAtOk + +`func (o *License) GetSubscriptionCanceledAtOk() (*int64, bool)` + +GetSubscriptionCanceledAtOk returns a tuple with the SubscriptionCanceledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionCanceledAt + +`func (o *License) SetSubscriptionCanceledAt(v int64)` + +SetSubscriptionCanceledAt sets SubscriptionCanceledAt field to given value. + +### HasSubscriptionCanceledAt + +`func (o *License) HasSubscriptionCanceledAt() bool` + +HasSubscriptionCanceledAt returns a boolean if a field has been set. + +### GetSettings + +`func (o *License) GetSettings() map[string]interface{}` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *License) GetSettingsOk() (*map[string]interface{}, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *License) SetSettings(v map[string]interface{})` + +SetSettings sets Settings field to given value. + +### HasSettings + +`func (o *License) HasSettings() bool` + +HasSettings returns a boolean if a field has been set. + +### GetSsoType + +`func (o *License) GetSsoType() string` + +GetSsoType returns the SsoType field if non-nil, zero value otherwise. + +### GetSsoTypeOk + +`func (o *License) GetSsoTypeOk() (*string, bool)` + +GetSsoTypeOk returns a tuple with the SsoType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoType + +`func (o *License) SetSsoType(v string)` + +SetSsoType sets SsoType field to given value. + +### HasSsoType + +`func (o *License) HasSsoType() bool` + +HasSsoType returns a boolean if a field has been set. + +### GetSsoDomain + +`func (o *License) GetSsoDomain() string` + +GetSsoDomain returns the SsoDomain field if non-nil, zero value otherwise. + +### GetSsoDomainOk + +`func (o *License) GetSsoDomainOk() (*string, bool)` + +GetSsoDomainOk returns a tuple with the SsoDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoDomain + +`func (o *License) SetSsoDomain(v string)` + +SetSsoDomain sets SsoDomain field to given value. + +### HasSsoDomain + +`func (o *License) HasSsoDomain() bool` + +HasSsoDomain returns a boolean if a field has been set. + +### GetSsoMode + +`func (o *License) GetSsoMode() string` + +GetSsoMode returns the SsoMode field if non-nil, zero value otherwise. + +### GetSsoModeOk + +`func (o *License) GetSsoModeOk() (*string, bool)` + +GetSsoModeOk returns a tuple with the SsoMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoMode + +`func (o *License) SetSsoMode(v string)` + +SetSsoMode sets SsoMode field to given value. + +### HasSsoMode + +`func (o *License) HasSsoMode() bool` + +HasSsoMode returns a boolean if a field has been set. + +### GetSsoLoginMessage + +`func (o *License) GetSsoLoginMessage() string` + +GetSsoLoginMessage returns the SsoLoginMessage field if non-nil, zero value otherwise. + +### GetSsoLoginMessageOk + +`func (o *License) GetSsoLoginMessageOk() (*string, bool)` + +GetSsoLoginMessageOk returns a tuple with the SsoLoginMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoLoginMessage + +`func (o *License) SetSsoLoginMessage(v string)` + +SetSsoLoginMessage sets SsoLoginMessage field to given value. + +### HasSsoLoginMessage + +`func (o *License) HasSsoLoginMessage() bool` + +HasSsoLoginMessage returns a boolean if a field has been set. + +### GetSsoLoginIssuerUrl + +`func (o *License) GetSsoLoginIssuerUrl() string` + +GetSsoLoginIssuerUrl returns the SsoLoginIssuerUrl field if non-nil, zero value otherwise. + +### GetSsoLoginIssuerUrlOk + +`func (o *License) GetSsoLoginIssuerUrlOk() (*string, bool)` + +GetSsoLoginIssuerUrlOk returns a tuple with the SsoLoginIssuerUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoLoginIssuerUrl + +`func (o *License) SetSsoLoginIssuerUrl(v string)` + +SetSsoLoginIssuerUrl sets SsoLoginIssuerUrl field to given value. + +### HasSsoLoginIssuerUrl + +`func (o *License) HasSsoLoginIssuerUrl() bool` + +HasSsoLoginIssuerUrl returns a boolean if a field has been set. + +### GetSsoLoginLoginUrl + +`func (o *License) GetSsoLoginLoginUrl() string` + +GetSsoLoginLoginUrl returns the SsoLoginLoginUrl field if non-nil, zero value otherwise. + +### GetSsoLoginLoginUrlOk + +`func (o *License) GetSsoLoginLoginUrlOk() (*string, bool)` + +GetSsoLoginLoginUrlOk returns a tuple with the SsoLoginLoginUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoLoginLoginUrl + +`func (o *License) SetSsoLoginLoginUrl(v string)` + +SetSsoLoginLoginUrl sets SsoLoginLoginUrl field to given value. + +### HasSsoLoginLoginUrl + +`func (o *License) HasSsoLoginLoginUrl() bool` + +HasSsoLoginLoginUrl returns a boolean if a field has been set. + +### GetSsoLoginLogoutUrl + +`func (o *License) GetSsoLoginLogoutUrl() string` + +GetSsoLoginLogoutUrl returns the SsoLoginLogoutUrl field if non-nil, zero value otherwise. + +### GetSsoLoginLogoutUrlOk + +`func (o *License) GetSsoLoginLogoutUrlOk() (*string, bool)` + +GetSsoLoginLogoutUrlOk returns a tuple with the SsoLoginLogoutUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoLoginLogoutUrl + +`func (o *License) SetSsoLoginLogoutUrl(v string)` + +SetSsoLoginLogoutUrl sets SsoLoginLogoutUrl field to given value. + +### HasSsoLoginLogoutUrl + +`func (o *License) HasSsoLoginLogoutUrl() bool` + +HasSsoLoginLogoutUrl returns a boolean if a field has been set. + +### GetSsoDefaultRole + +`func (o *License) GetSsoDefaultRole() string` + +GetSsoDefaultRole returns the SsoDefaultRole field if non-nil, zero value otherwise. + +### GetSsoDefaultRoleOk + +`func (o *License) GetSsoDefaultRoleOk() (*string, bool)` + +GetSsoDefaultRoleOk returns a tuple with the SsoDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoDefaultRole + +`func (o *License) SetSsoDefaultRole(v string)` + +SetSsoDefaultRole sets SsoDefaultRole field to given value. + +### HasSsoDefaultRole + +`func (o *License) HasSsoDefaultRole() bool` + +HasSsoDefaultRole returns a boolean if a field has been set. + +### GetPartner + +`func (o *License) GetPartner() string` + +GetPartner returns the Partner field if non-nil, zero value otherwise. + +### GetPartnerOk + +`func (o *License) GetPartnerOk() (*string, bool)` + +GetPartnerOk returns a tuple with the Partner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPartner + +`func (o *License) SetPartner(v string)` + +SetPartner sets Partner field to given value. + +### HasPartner + +`func (o *License) HasPartner() bool` + +HasPartner returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/MECMCredentialFields.md b/go/docs/MECMCredentialFields.md new file mode 100644 index 0000000..8e22fb5 --- /dev/null +++ b/go/docs/MECMCredentialFields.md @@ -0,0 +1,51 @@ +# MECMCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DbConnectionString** | **string** | | + +## Methods + +### NewMECMCredentialFields + +`func NewMECMCredentialFields(dbConnectionString string, ) *MECMCredentialFields` + +NewMECMCredentialFields instantiates a new MECMCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMECMCredentialFieldsWithDefaults + +`func NewMECMCredentialFieldsWithDefaults() *MECMCredentialFields` + +NewMECMCredentialFieldsWithDefaults instantiates a new MECMCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDbConnectionString + +`func (o *MECMCredentialFields) GetDbConnectionString() string` + +GetDbConnectionString returns the DbConnectionString field if non-nil, zero value otherwise. + +### GetDbConnectionStringOk + +`func (o *MECMCredentialFields) GetDbConnectionStringOk() (*string, bool)` + +GetDbConnectionStringOk returns a tuple with the DbConnectionString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDbConnectionString + +`func (o *MECMCredentialFields) SetDbConnectionString(v string)` + +SetDbConnectionString sets DbConnectionString field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/MiradoreCredentialFields.md b/go/docs/MiradoreCredentialFields.md new file mode 100644 index 0000000..54ccb3c --- /dev/null +++ b/go/docs/MiradoreCredentialFields.md @@ -0,0 +1,72 @@ +# MiradoreCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hostname** | **string** | | +**ApiKey** | **string** | | + +## Methods + +### NewMiradoreCredentialFields + +`func NewMiradoreCredentialFields(hostname string, apiKey string, ) *MiradoreCredentialFields` + +NewMiradoreCredentialFields instantiates a new MiradoreCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMiradoreCredentialFieldsWithDefaults + +`func NewMiradoreCredentialFieldsWithDefaults() *MiradoreCredentialFields` + +NewMiradoreCredentialFieldsWithDefaults instantiates a new MiradoreCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHostname + +`func (o *MiradoreCredentialFields) GetHostname() string` + +GetHostname returns the Hostname field if non-nil, zero value otherwise. + +### GetHostnameOk + +`func (o *MiradoreCredentialFields) GetHostnameOk() (*string, bool)` + +GetHostnameOk returns a tuple with the Hostname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostname + +`func (o *MiradoreCredentialFields) SetHostname(v string)` + +SetHostname sets Hostname field to given value. + + +### GetApiKey + +`func (o *MiradoreCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *MiradoreCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *MiradoreCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/MirakiCredentialFields.md b/go/docs/MirakiCredentialFields.md new file mode 100644 index 0000000..be02950 --- /dev/null +++ b/go/docs/MirakiCredentialFields.md @@ -0,0 +1,72 @@ +# MirakiCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**ApiKey** | **string** | | + +## Methods + +### NewMirakiCredentialFields + +`func NewMirakiCredentialFields(apiUrl string, apiKey string, ) *MirakiCredentialFields` + +NewMirakiCredentialFields instantiates a new MirakiCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMirakiCredentialFieldsWithDefaults + +`func NewMirakiCredentialFieldsWithDefaults() *MirakiCredentialFields` + +NewMirakiCredentialFieldsWithDefaults instantiates a new MirakiCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *MirakiCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *MirakiCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *MirakiCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetApiKey + +`func (o *MirakiCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *MirakiCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *MirakiCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/NessusCredentialFields.md b/go/docs/NessusCredentialFields.md new file mode 100644 index 0000000..544bcb7 --- /dev/null +++ b/go/docs/NessusCredentialFields.md @@ -0,0 +1,145 @@ +# NessusCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Insecure** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] + +## Methods + +### NewNessusCredentialFields + +`func NewNessusCredentialFields(apiUrl string, accessKey string, secretKey string, ) *NessusCredentialFields` + +NewNessusCredentialFields instantiates a new NessusCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNessusCredentialFieldsWithDefaults + +`func NewNessusCredentialFieldsWithDefaults() *NessusCredentialFields` + +NewNessusCredentialFieldsWithDefaults instantiates a new NessusCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *NessusCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *NessusCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *NessusCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetAccessKey + +`func (o *NessusCredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *NessusCredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *NessusCredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *NessusCredentialFields) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *NessusCredentialFields) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *NessusCredentialFields) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetInsecure + +`func (o *NessusCredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *NessusCredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *NessusCredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *NessusCredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *NessusCredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *NessusCredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *NessusCredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *NessusCredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/NetboxCredentialFields.md b/go/docs/NetboxCredentialFields.md new file mode 100644 index 0000000..a4a1227 --- /dev/null +++ b/go/docs/NetboxCredentialFields.md @@ -0,0 +1,72 @@ +# NetboxCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**ApiKey** | **string** | | + +## Methods + +### NewNetboxCredentialFields + +`func NewNetboxCredentialFields(apiUrl string, apiKey string, ) *NetboxCredentialFields` + +NewNetboxCredentialFields instantiates a new NetboxCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetboxCredentialFieldsWithDefaults + +`func NewNetboxCredentialFieldsWithDefaults() *NetboxCredentialFields` + +NewNetboxCredentialFieldsWithDefaults instantiates a new NetboxCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *NetboxCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *NetboxCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *NetboxCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetApiKey + +`func (o *NetboxCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *NetboxCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *NetboxCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/NetworkInterface.md b/go/docs/NetworkInterface.md new file mode 100644 index 0000000..73fcce8 --- /dev/null +++ b/go/docs/NetworkInterface.md @@ -0,0 +1,108 @@ +# NetworkInterface + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ipv4Addresses** | Pointer to **[]string** | Represents IPV4 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. | [optional] +**Ipv6Addresses** | Pointer to **[]string** | Represents the IPV6 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. | [optional] +**MacAddress** | Pointer to **string** | Represents a MAC address in IEEE 802 MAC/EUI-48, or EUI-64 form in one of the following formats: 01:23:45:67:89:AB 01:23:45:67:89:ab:cd:ef 01-23-45-67-89-ab 01-23-45-67-89-ab-cd-ef 0123.4567.89ab 0123.4567.89ab.cdef 0123 4567 89ab cdEF | [optional] + +## Methods + +### NewNetworkInterface + +`func NewNetworkInterface() *NetworkInterface` + +NewNetworkInterface instantiates a new NetworkInterface object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetworkInterfaceWithDefaults + +`func NewNetworkInterfaceWithDefaults() *NetworkInterface` + +NewNetworkInterfaceWithDefaults instantiates a new NetworkInterface object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIpv4Addresses + +`func (o *NetworkInterface) GetIpv4Addresses() []string` + +GetIpv4Addresses returns the Ipv4Addresses field if non-nil, zero value otherwise. + +### GetIpv4AddressesOk + +`func (o *NetworkInterface) GetIpv4AddressesOk() (*[]string, bool)` + +GetIpv4AddressesOk returns a tuple with the Ipv4Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpv4Addresses + +`func (o *NetworkInterface) SetIpv4Addresses(v []string)` + +SetIpv4Addresses sets Ipv4Addresses field to given value. + +### HasIpv4Addresses + +`func (o *NetworkInterface) HasIpv4Addresses() bool` + +HasIpv4Addresses returns a boolean if a field has been set. + +### GetIpv6Addresses + +`func (o *NetworkInterface) GetIpv6Addresses() []string` + +GetIpv6Addresses returns the Ipv6Addresses field if non-nil, zero value otherwise. + +### GetIpv6AddressesOk + +`func (o *NetworkInterface) GetIpv6AddressesOk() (*[]string, bool)` + +GetIpv6AddressesOk returns a tuple with the Ipv6Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpv6Addresses + +`func (o *NetworkInterface) SetIpv6Addresses(v []string)` + +SetIpv6Addresses sets Ipv6Addresses field to given value. + +### HasIpv6Addresses + +`func (o *NetworkInterface) HasIpv6Addresses() bool` + +HasIpv6Addresses returns a boolean if a field has been set. + +### GetMacAddress + +`func (o *NetworkInterface) GetMacAddress() string` + +GetMacAddress returns the MacAddress field if non-nil, zero value otherwise. + +### GetMacAddressOk + +`func (o *NetworkInterface) GetMacAddressOk() (*string, bool)` + +GetMacAddressOk returns a tuple with the MacAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacAddress + +`func (o *NetworkInterface) SetMacAddress(v string)` + +SetMacAddress sets MacAddress field to given value. + +### HasMacAddress + +`func (o *NetworkInterface) HasMacAddress() bool` + +HasMacAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/OrgOptions.md b/go/docs/OrgOptions.md index 3526915..e9e36e8 100644 --- a/go/docs/OrgOptions.md +++ b/go/docs/OrgOptions.md @@ -6,6 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | | [optional] **Description** | Pointer to **string** | | [optional] +**ParentId** | Pointer to **string** | | [optional] +**ExpirationAssetsStale** | Pointer to **string** | Number of days before stale assets are expired, as a decimal string. | [optional] +**ExpirationAssetsOffline** | Pointer to **string** | Number of days before offline assets are expired, as a decimal string. | [optional] +**ExpirationIntegrationAttributes** | Pointer to **string** | Number of days before integration attributes are expired, as a decimal string. | [optional] +**ExpirationScans** | Pointer to **string** | Number of days before scan data is expired, as a decimal string. | [optional] +**ExpirationVulnerabilities** | Pointer to **string** | Number of days before vulnerabilities are expired, as a decimal string. | [optional] +**KeepLatestIntegrationAttributes** | Pointer to **string** | Whether to retain only the latest integration attribute values, as a boolean string (\"true\"/\"false\"). | [optional] ## Methods @@ -76,6 +83,181 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. +### GetParentId + +`func (o *OrgOptions) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *OrgOptions) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *OrgOptions) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *OrgOptions) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### GetExpirationAssetsStale + +`func (o *OrgOptions) GetExpirationAssetsStale() string` + +GetExpirationAssetsStale returns the ExpirationAssetsStale field if non-nil, zero value otherwise. + +### GetExpirationAssetsStaleOk + +`func (o *OrgOptions) GetExpirationAssetsStaleOk() (*string, bool)` + +GetExpirationAssetsStaleOk returns a tuple with the ExpirationAssetsStale field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationAssetsStale + +`func (o *OrgOptions) SetExpirationAssetsStale(v string)` + +SetExpirationAssetsStale sets ExpirationAssetsStale field to given value. + +### HasExpirationAssetsStale + +`func (o *OrgOptions) HasExpirationAssetsStale() bool` + +HasExpirationAssetsStale returns a boolean if a field has been set. + +### GetExpirationAssetsOffline + +`func (o *OrgOptions) GetExpirationAssetsOffline() string` + +GetExpirationAssetsOffline returns the ExpirationAssetsOffline field if non-nil, zero value otherwise. + +### GetExpirationAssetsOfflineOk + +`func (o *OrgOptions) GetExpirationAssetsOfflineOk() (*string, bool)` + +GetExpirationAssetsOfflineOk returns a tuple with the ExpirationAssetsOffline field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationAssetsOffline + +`func (o *OrgOptions) SetExpirationAssetsOffline(v string)` + +SetExpirationAssetsOffline sets ExpirationAssetsOffline field to given value. + +### HasExpirationAssetsOffline + +`func (o *OrgOptions) HasExpirationAssetsOffline() bool` + +HasExpirationAssetsOffline returns a boolean if a field has been set. + +### GetExpirationIntegrationAttributes + +`func (o *OrgOptions) GetExpirationIntegrationAttributes() string` + +GetExpirationIntegrationAttributes returns the ExpirationIntegrationAttributes field if non-nil, zero value otherwise. + +### GetExpirationIntegrationAttributesOk + +`func (o *OrgOptions) GetExpirationIntegrationAttributesOk() (*string, bool)` + +GetExpirationIntegrationAttributesOk returns a tuple with the ExpirationIntegrationAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationIntegrationAttributes + +`func (o *OrgOptions) SetExpirationIntegrationAttributes(v string)` + +SetExpirationIntegrationAttributes sets ExpirationIntegrationAttributes field to given value. + +### HasExpirationIntegrationAttributes + +`func (o *OrgOptions) HasExpirationIntegrationAttributes() bool` + +HasExpirationIntegrationAttributes returns a boolean if a field has been set. + +### GetExpirationScans + +`func (o *OrgOptions) GetExpirationScans() string` + +GetExpirationScans returns the ExpirationScans field if non-nil, zero value otherwise. + +### GetExpirationScansOk + +`func (o *OrgOptions) GetExpirationScansOk() (*string, bool)` + +GetExpirationScansOk returns a tuple with the ExpirationScans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationScans + +`func (o *OrgOptions) SetExpirationScans(v string)` + +SetExpirationScans sets ExpirationScans field to given value. + +### HasExpirationScans + +`func (o *OrgOptions) HasExpirationScans() bool` + +HasExpirationScans returns a boolean if a field has been set. + +### GetExpirationVulnerabilities + +`func (o *OrgOptions) GetExpirationVulnerabilities() string` + +GetExpirationVulnerabilities returns the ExpirationVulnerabilities field if non-nil, zero value otherwise. + +### GetExpirationVulnerabilitiesOk + +`func (o *OrgOptions) GetExpirationVulnerabilitiesOk() (*string, bool)` + +GetExpirationVulnerabilitiesOk returns a tuple with the ExpirationVulnerabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationVulnerabilities + +`func (o *OrgOptions) SetExpirationVulnerabilities(v string)` + +SetExpirationVulnerabilities sets ExpirationVulnerabilities field to given value. + +### HasExpirationVulnerabilities + +`func (o *OrgOptions) HasExpirationVulnerabilities() bool` + +HasExpirationVulnerabilities returns a boolean if a field has been set. + +### GetKeepLatestIntegrationAttributes + +`func (o *OrgOptions) GetKeepLatestIntegrationAttributes() string` + +GetKeepLatestIntegrationAttributes returns the KeepLatestIntegrationAttributes field if non-nil, zero value otherwise. + +### GetKeepLatestIntegrationAttributesOk + +`func (o *OrgOptions) GetKeepLatestIntegrationAttributesOk() (*string, bool)` + +GetKeepLatestIntegrationAttributesOk returns a tuple with the KeepLatestIntegrationAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeepLatestIntegrationAttributes + +`func (o *OrgOptions) SetKeepLatestIntegrationAttributes(v string)` + +SetKeepLatestIntegrationAttributes sets KeepLatestIntegrationAttributes field to given value. + +### HasKeepLatestIntegrationAttributes + +`func (o *OrgOptions) HasKeepLatestIntegrationAttributes() bool` + +HasKeepLatestIntegrationAttributes returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/Organization.md b/go/docs/Organization.md index 2fe19e5..9946ece 100644 --- a/go/docs/Organization.md +++ b/go/docs/Organization.md @@ -4,14 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **CreatedAt** | Pointer to **int64** | | [optional] **UpdatedAt** | Pointer to **int64** | | [optional] **ClientId** | Pointer to **string** | | [optional] **DownloadToken** | Pointer to **string** | | [optional] **DownloadTokenCreatedAt** | Pointer to **int64** | | [optional] -**Permanent** | Pointer to **bool** | | [optional] -**Name** | Pointer to **string** | | +**Name** | **string** | | **Description** | Pointer to **string** | | [optional] **Inactive** | Pointer to **bool** | | [optional] **DeactivatedAt** | Pointer to **int64** | | [optional] @@ -21,11 +20,19 @@ Name | Type | Description | Notes **ServiceCountArp** | Pointer to **int64** | | [optional] **ServiceCountIcmp** | Pointer to **int64** | | [optional] **AssetCount** | Pointer to **int64** | | [optional] +**Project** | Pointer to **bool** | | [optional] +**ParentId** | Pointer to **string** | | [optional] +**ExpirationAssetsStale** | Pointer to **int64** | | [optional] +**ExpirationAssetsOffline** | Pointer to **int64** | | [optional] +**ExpirationIntegrationAttributes** | Pointer to **int64** | | [optional] +**ExpirationScans** | Pointer to **int64** | | [optional] +**ExpirationVulnerabilities** | Pointer to **int64** | | [optional] **ExportToken** | Pointer to **string** | | [optional] **ExportTokenCreatedAt** | Pointer to **int64** | | [optional] **ExportTokenLastUsedAt** | Pointer to **int64** | | [optional] **ExportTokenLastUsedBy** | Pointer to **string** | | [optional] **ExportTokenCounter** | Pointer to **int64** | | [optional] +**KeepLatestIntegrationAttributes** | Pointer to **bool** | | [optional] ## Methods @@ -191,31 +198,6 @@ SetDownloadTokenCreatedAt sets DownloadTokenCreatedAt field to given value. HasDownloadTokenCreatedAt returns a boolean if a field has been set. -### GetPermanent - -`func (o *Organization) GetPermanent() bool` - -GetPermanent returns the Permanent field if non-nil, zero value otherwise. - -### GetPermanentOk - -`func (o *Organization) GetPermanentOk() (*bool, bool)` - -GetPermanentOk returns a tuple with the Permanent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermanent - -`func (o *Organization) SetPermanent(v bool)` - -SetPermanent sets Permanent field to given value. - -### HasPermanent - -`func (o *Organization) HasPermanent() bool` - -HasPermanent returns a boolean if a field has been set. - ### GetName `func (o *Organization) GetName() string` @@ -461,6 +443,181 @@ SetAssetCount sets AssetCount field to given value. HasAssetCount returns a boolean if a field has been set. +### GetProject + +`func (o *Organization) GetProject() bool` + +GetProject returns the Project field if non-nil, zero value otherwise. + +### GetProjectOk + +`func (o *Organization) GetProjectOk() (*bool, bool)` + +GetProjectOk returns a tuple with the Project field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProject + +`func (o *Organization) SetProject(v bool)` + +SetProject sets Project field to given value. + +### HasProject + +`func (o *Organization) HasProject() bool` + +HasProject returns a boolean if a field has been set. + +### GetParentId + +`func (o *Organization) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Organization) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Organization) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *Organization) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### GetExpirationAssetsStale + +`func (o *Organization) GetExpirationAssetsStale() int64` + +GetExpirationAssetsStale returns the ExpirationAssetsStale field if non-nil, zero value otherwise. + +### GetExpirationAssetsStaleOk + +`func (o *Organization) GetExpirationAssetsStaleOk() (*int64, bool)` + +GetExpirationAssetsStaleOk returns a tuple with the ExpirationAssetsStale field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationAssetsStale + +`func (o *Organization) SetExpirationAssetsStale(v int64)` + +SetExpirationAssetsStale sets ExpirationAssetsStale field to given value. + +### HasExpirationAssetsStale + +`func (o *Organization) HasExpirationAssetsStale() bool` + +HasExpirationAssetsStale returns a boolean if a field has been set. + +### GetExpirationAssetsOffline + +`func (o *Organization) GetExpirationAssetsOffline() int64` + +GetExpirationAssetsOffline returns the ExpirationAssetsOffline field if non-nil, zero value otherwise. + +### GetExpirationAssetsOfflineOk + +`func (o *Organization) GetExpirationAssetsOfflineOk() (*int64, bool)` + +GetExpirationAssetsOfflineOk returns a tuple with the ExpirationAssetsOffline field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationAssetsOffline + +`func (o *Organization) SetExpirationAssetsOffline(v int64)` + +SetExpirationAssetsOffline sets ExpirationAssetsOffline field to given value. + +### HasExpirationAssetsOffline + +`func (o *Organization) HasExpirationAssetsOffline() bool` + +HasExpirationAssetsOffline returns a boolean if a field has been set. + +### GetExpirationIntegrationAttributes + +`func (o *Organization) GetExpirationIntegrationAttributes() int64` + +GetExpirationIntegrationAttributes returns the ExpirationIntegrationAttributes field if non-nil, zero value otherwise. + +### GetExpirationIntegrationAttributesOk + +`func (o *Organization) GetExpirationIntegrationAttributesOk() (*int64, bool)` + +GetExpirationIntegrationAttributesOk returns a tuple with the ExpirationIntegrationAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationIntegrationAttributes + +`func (o *Organization) SetExpirationIntegrationAttributes(v int64)` + +SetExpirationIntegrationAttributes sets ExpirationIntegrationAttributes field to given value. + +### HasExpirationIntegrationAttributes + +`func (o *Organization) HasExpirationIntegrationAttributes() bool` + +HasExpirationIntegrationAttributes returns a boolean if a field has been set. + +### GetExpirationScans + +`func (o *Organization) GetExpirationScans() int64` + +GetExpirationScans returns the ExpirationScans field if non-nil, zero value otherwise. + +### GetExpirationScansOk + +`func (o *Organization) GetExpirationScansOk() (*int64, bool)` + +GetExpirationScansOk returns a tuple with the ExpirationScans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationScans + +`func (o *Organization) SetExpirationScans(v int64)` + +SetExpirationScans sets ExpirationScans field to given value. + +### HasExpirationScans + +`func (o *Organization) HasExpirationScans() bool` + +HasExpirationScans returns a boolean if a field has been set. + +### GetExpirationVulnerabilities + +`func (o *Organization) GetExpirationVulnerabilities() int64` + +GetExpirationVulnerabilities returns the ExpirationVulnerabilities field if non-nil, zero value otherwise. + +### GetExpirationVulnerabilitiesOk + +`func (o *Organization) GetExpirationVulnerabilitiesOk() (*int64, bool)` + +GetExpirationVulnerabilitiesOk returns a tuple with the ExpirationVulnerabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationVulnerabilities + +`func (o *Organization) SetExpirationVulnerabilities(v int64)` + +SetExpirationVulnerabilities sets ExpirationVulnerabilities field to given value. + +### HasExpirationVulnerabilities + +`func (o *Organization) HasExpirationVulnerabilities() bool` + +HasExpirationVulnerabilities returns a boolean if a field has been set. + ### GetExportToken `func (o *Organization) GetExportToken() string` @@ -586,6 +743,31 @@ SetExportTokenCounter sets ExportTokenCounter field to given value. HasExportTokenCounter returns a boolean if a field has been set. +### GetKeepLatestIntegrationAttributes + +`func (o *Organization) GetKeepLatestIntegrationAttributes() bool` + +GetKeepLatestIntegrationAttributes returns the KeepLatestIntegrationAttributes field if non-nil, zero value otherwise. + +### GetKeepLatestIntegrationAttributesOk + +`func (o *Organization) GetKeepLatestIntegrationAttributesOk() (*bool, bool)` + +GetKeepLatestIntegrationAttributesOk returns a tuple with the KeepLatestIntegrationAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeepLatestIntegrationAttributes + +`func (o *Organization) SetKeepLatestIntegrationAttributes(v bool)` + +SetKeepLatestIntegrationAttributes sets KeepLatestIntegrationAttributes field to given value. + +### HasKeepLatestIntegrationAttributes + +`func (o *Organization) HasKeepLatestIntegrationAttributes() bool` + +HasKeepLatestIntegrationAttributes returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/OrganizationAPI.md b/go/docs/OrganizationAPI.md index 972bf7a..45c10a2 100644 --- a/go/docs/OrganizationAPI.md +++ b/go/docs/OrganizationAPI.md @@ -1,50 +1,349 @@ -# \OrganizationApi +# \OrganizationAPI All URIs are relative to *https://console.runzero.com/api/v1.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateScan**](OrganizationApi.md#CreateScan) | **Put** /org/sites/{site_id}/scan | Create a scan task for a given site. -[**CreateSite**](OrganizationApi.md#CreateSite) | **Put** /org/sites | Create a new site. -[**GetAgent**](OrganizationApi.md#GetAgent) | **Get** /org/agents/{agent_id} | Get details for a single agent. -[**GetAgents**](OrganizationApi.md#GetAgents) | **Get** /org/agents | Get all agents. -[**GetAsset**](OrganizationApi.md#GetAsset) | **Get** /org/assets/{asset_id} | Get asset details. -[**GetAssets**](OrganizationApi.md#GetAssets) | **Get** /org/assets | Get all assets. -[**GetKey**](OrganizationApi.md#GetKey) | **Get** /org/key | Get API key details. -[**GetOrganization**](OrganizationApi.md#GetOrganization) | **Get** /org | Get organization details. -[**GetService**](OrganizationApi.md#GetService) | **Get** /org/services/{service_id} | Get service details. -[**GetServices**](OrganizationApi.md#GetServices) | **Get** /org/services | Get all services. -[**GetSite**](OrganizationApi.md#GetSite) | **Get** /org/sites/{site_id} | Get site details. -[**GetSites**](OrganizationApi.md#GetSites) | **Get** /org/sites | Get all sites. -[**GetTask**](OrganizationApi.md#GetTask) | **Get** /org/tasks/{task_id} | Get task details. -[**GetTaskChangeReport**](OrganizationApi.md#GetTaskChangeReport) | **Get** /org/tasks/{task_id}/changes | Returns a temporary task change report data url. -[**GetTaskScanData**](OrganizationApi.md#GetTaskScanData) | **Get** /org/tasks/{task_id}/data | Returns a temporary task scan data url. -[**GetTasks**](OrganizationApi.md#GetTasks) | **Get** /org/tasks | Get all tasks (last 1000). -[**GetWirelessLAN**](OrganizationApi.md#GetWirelessLAN) | **Get** /org/wirelesss/{wireless_id} | Get wireless LAN details. -[**GetWirelessLANs**](OrganizationApi.md#GetWirelessLANs) | **Get** /org/wireless | Get all wireless LANs. -[**HideTask**](OrganizationApi.md#HideTask) | **Post** /org/tasks/{task_id}/hide | Signal that a completed task should be hidden. -[**ImportScanData**](OrganizationApi.md#ImportScanData) | **Put** /org/sites/{site_id}/import | Import a scan data file into a site. -[**RemoveAgent**](OrganizationApi.md#RemoveAgent) | **Delete** /org/agents/{agent_id} | Remove and uninstall an agent. -[**RemoveAsset**](OrganizationApi.md#RemoveAsset) | **Delete** /org/assets/{asset_id} | Remove an asset. -[**RemoveService**](OrganizationApi.md#RemoveService) | **Delete** /org/services/{service_id} | Remove a service. -[**RemoveSite**](OrganizationApi.md#RemoveSite) | **Delete** /org/sites/{site_id} | Remove a site and associated assets. -[**RemoveWirelessLAN**](OrganizationApi.md#RemoveWirelessLAN) | **Delete** /org/wirelesss/{wireless_id} | Remove a wireless LAN. -[**StopTask**](OrganizationApi.md#StopTask) | **Post** /org/tasks/{task_id}/stop | Signal that a task should be stopped or canceled. -[**UpdateAgentSite**](OrganizationApi.md#UpdateAgentSite) | **Patch** /org/agents/{agent_id} | Update the site associated with agent. -[**UpdateAssetComments**](OrganizationApi.md#UpdateAssetComments) | **Patch** /org/assets/{asset_id}/comments | Update asset comments. -[**UpdateAssetTags**](OrganizationApi.md#UpdateAssetTags) | **Patch** /org/assets/{asset_id}/tags | Update asset tags. -[**UpdateOrganization**](OrganizationApi.md#UpdateOrganization) | **Patch** /org | Update organization details. -[**UpdateSite**](OrganizationApi.md#UpdateSite) | **Patch** /org/sites/{site_id} | Update a site definition. -[**UpdateTask**](OrganizationApi.md#UpdateTask) | **Patch** /org/tasks/{task_id} | Update task parameters. -[**UpgradeAgent**](OrganizationApi.md#UpgradeAgent) | **Post** /org/agents/{agent_id}/update | Force an agent to update and restart. +[**BulkRemoveCustomIntegration**](OrganizationAPI.md#BulkRemoveCustomIntegration) | **Post** /org/custom-integrations/{custom_integration_id}/bulk/remove | Remove custom integration from a list of assets +[**ClearBulkAssetOwners**](OrganizationAPI.md#ClearBulkAssetOwners) | **Post** /org/assets/bulk/clearOwners | Clear all owners across multiple assets based on a search query +[**ClearBulkAssetTags**](OrganizationAPI.md#ClearBulkAssetTags) | **Post** /org/assets/bulk/clearTags | Clear all tags across multiple assets based on a search query +[**CreateSample**](OrganizationAPI.md#CreateSample) | **Put** /org/sites/{site_id}/sample | Create a traffic sampling task for a given site +[**CreateScan**](OrganizationAPI.md#CreateScan) | **Put** /org/sites/{site_id}/scan | Create a scan task for a given site +[**CreateSite**](OrganizationAPI.md#CreateSite) | **Put** /org/sites | Create a new site +[**GetAgent**](OrganizationAPI.md#GetAgent) | **Get** /org/agents/{agent_id} | Get details for a single agent. Legacy path for /org/explorers/{explorer_id} +[**GetAgents**](OrganizationAPI.md#GetAgents) | **Get** /org/agents | Get all agents. Legacy path for /org/explorers +[**GetAsset**](OrganizationAPI.md#GetAsset) | **Get** /org/assets/{asset_id} | Get asset details +[**GetAssets**](OrganizationAPI.md#GetAssets) | **Get** /org/assets | Get all assets +[**GetExplorer**](OrganizationAPI.md#GetExplorer) | **Get** /org/explorers/{explorer_id} | Get details for a single explorer. +[**GetExplorers**](OrganizationAPI.md#GetExplorers) | **Get** /org/explorers | Get all explorers +[**GetHostedZone**](OrganizationAPI.md#GetHostedZone) | **Get** /org/hosted-zones/{hosted_zone_id} | Get details for a single hosted zone. +[**GetHostedZones**](OrganizationAPI.md#GetHostedZones) | **Get** /org/hosted-zones | Get all hosted zones +[**GetKey**](OrganizationAPI.md#GetKey) | **Get** /org/key | Get API key details +[**GetOrgCustomIntegration**](OrganizationAPI.md#GetOrgCustomIntegration) | **Get** /org/custom-integrations/{customIntegrationId} | Get single custom integration +[**GetOrgCustomIntegrations**](OrganizationAPI.md#GetOrgCustomIntegrations) | **Get** /org/custom-integrations | Get all custom integrations +[**GetOrganization**](OrganizationAPI.md#GetOrganization) | **Get** /org | Get organization details +[**GetService**](OrganizationAPI.md#GetService) | **Get** /org/services/{service_id} | Get service details +[**GetServices**](OrganizationAPI.md#GetServices) | **Get** /org/services | Get all services +[**GetSite**](OrganizationAPI.md#GetSite) | **Get** /org/sites/{site_id} | Get site details +[**GetSites**](OrganizationAPI.md#GetSites) | **Get** /org/sites | Get all sites +[**GetTask**](OrganizationAPI.md#GetTask) | **Get** /org/tasks/{task_id} | Get task details +[**GetTaskChangeReport**](OrganizationAPI.md#GetTaskChangeReport) | **Get** /org/tasks/{task_id}/changes | Returns a temporary task change report data url +[**GetTaskLog**](OrganizationAPI.md#GetTaskLog) | **Get** /org/tasks/{task_id}/log | Returns a temporary task log data url +[**GetTaskScanData**](OrganizationAPI.md#GetTaskScanData) | **Get** /org/tasks/{task_id}/data | Returns a temporary task scan data url +[**GetTasks**](OrganizationAPI.md#GetTasks) | **Get** /org/tasks | Get all tasks (last 1000) +[**GetWirelessLAN**](OrganizationAPI.md#GetWirelessLAN) | **Get** /org/wireless/{wireless_id} | Get wireless LAN details +[**GetWirelessLANs**](OrganizationAPI.md#GetWirelessLANs) | **Get** /org/wireless | Get all wireless LANs +[**HideTask**](OrganizationAPI.md#HideTask) | **Post** /org/tasks/{task_id}/hide | Signal that a completed task should be hidden +[**ImportNessusScanData**](OrganizationAPI.md#ImportNessusScanData) | **Put** /org/sites/{site_id}/import/nessus | Import a Nessus scan data file into a site +[**ImportPacketData**](OrganizationAPI.md#ImportPacketData) | **Put** /org/sites/{site_id}/import/packet | Import a packet capture file into a site +[**ImportScanData**](OrganizationAPI.md#ImportScanData) | **Put** /org/sites/{site_id}/import | Import a scan data file into a site +[**MergeAssets**](OrganizationAPI.md#MergeAssets) | **Patch** /org/assets/merge | Merge multiple assets +[**RemoveAgent**](OrganizationAPI.md#RemoveAgent) | **Delete** /org/agents/{agent_id} | Remove and uninstall an agent. Legacy path for /org/explorers/{explorer_id} +[**RemoveAsset**](OrganizationAPI.md#RemoveAsset) | **Delete** /org/assets/{asset_id} | Remove an asset +[**RemoveAssetSource**](OrganizationAPI.md#RemoveAssetSource) | **Delete** /org/assets/{asset_id}/sources/{source_id}/remove | Remove single source from asset +[**RemoveBulkAssets**](OrganizationAPI.md#RemoveBulkAssets) | **Post** /org/assets/bulk/delete | Removes multiple assets by ID +[**RemoveCustomIntegration**](OrganizationAPI.md#RemoveCustomIntegration) | **Delete** /org/assets/{asset_id}/custom-integrations/{custom_integration_id}/remove | Remove single custom integration from asset +[**RemoveExplorer**](OrganizationAPI.md#RemoveExplorer) | **Delete** /org/explorers/{explorer_id} | Remove and uninstall an explorer +[**RemoveKey**](OrganizationAPI.md#RemoveKey) | **Delete** /org/key | Remove the current API key +[**RemoveService**](OrganizationAPI.md#RemoveService) | **Delete** /org/services/{service_id} | Remove a service +[**RemoveSite**](OrganizationAPI.md#RemoveSite) | **Delete** /org/sites/{site_id} | Remove a site and associated assets +[**RemoveWirelessLAN**](OrganizationAPI.md#RemoveWirelessLAN) | **Delete** /org/wireless/{wireless_id} | Remove a wireless LAN +[**RotateKey**](OrganizationAPI.md#RotateKey) | **Patch** /org/key/rotate | Rotate the API key secret and return the updated key +[**StopTask**](OrganizationAPI.md#StopTask) | **Post** /org/tasks/{task_id}/stop | Signal that a task should be stopped or canceled.This will also remove recurring and scheduled tasks +[**UpdateAgentSettings**](OrganizationAPI.md#UpdateAgentSettings) | **Patch** /org/agents/{agent_id} | Update the settings associated with the agent. Legacy path for /org/explorers/{explorer_id} +[**UpdateAssetComments**](OrganizationAPI.md#UpdateAssetComments) | **Patch** /org/assets/{asset_id}/comments | Update asset comments +[**UpdateAssetCriticality**](OrganizationAPI.md#UpdateAssetCriticality) | **Patch** /org/assets/{asset_id}/criticality | Update asset criticality +[**UpdateAssetOwners**](OrganizationAPI.md#UpdateAssetOwners) | **Patch** /org/assets/{asset_id}/owners | Update asset owners +[**UpdateAssetTags**](OrganizationAPI.md#UpdateAssetTags) | **Patch** /org/assets/{asset_id}/tags | Update asset tags +[**UpdateBulkAssetCriticality**](OrganizationAPI.md#UpdateBulkAssetCriticality) | **Patch** /org/assets/bulk/criticality | Update criticality across multiple assets based on a search query +[**UpdateBulkAssetOwners**](OrganizationAPI.md#UpdateBulkAssetOwners) | **Patch** /org/assets/bulk/owners | Update asset owners across multiple assets based on a search query +[**UpdateBulkAssetTags**](OrganizationAPI.md#UpdateBulkAssetTags) | **Patch** /org/assets/bulk/tags | Update tags across multiple assets based on a search query +[**UpdateExplorerSettings**](OrganizationAPI.md#UpdateExplorerSettings) | **Patch** /org/explorers/{explorer_id} | Update the settings associated with the Explorer +[**UpdateOrganization**](OrganizationAPI.md#UpdateOrganization) | **Patch** /org | Update organization details +[**UpdateSite**](OrganizationAPI.md#UpdateSite) | **Patch** /org/sites/{site_id} | Update a site definition +[**UpdateTask**](OrganizationAPI.md#UpdateTask) | **Patch** /org/tasks/{task_id} | Update task parameters +[**UpgradeAgent**](OrganizationAPI.md#UpgradeAgent) | **Post** /org/agents/{agent_id}/update | Force an agent to update and restart. Legacy path for /org/explorers/{explorer_id}/update +[**UpgradeExplorer**](OrganizationAPI.md#UpgradeExplorer) | **Post** /org/explorers/{explorer_id}/update | Force an explorer to update and restart + + + +## BulkRemoveCustomIntegration + +> BulkRemoveCustomIntegration(ctx, customIntegrationId).AssetIDs(assetIDs).Execute() + +Remove custom integration from a list of assets +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + assetIDs := *openapiclient.NewAssetIDs([]string{"453C191F-644E-4EA8-9727-0E81E5275C35"}) // AssetIDs | list of asset IDs to remove + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.BulkRemoveCustomIntegration(context.Background(), customIntegrationId).AssetIDs(assetIDs).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.BulkRemoveCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkRemoveCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **assetIDs** | [**AssetIDs**](AssetIDs.md) | list of asset IDs to remove | + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ClearBulkAssetOwners + +> BulkAssetUpdateResult ClearBulkAssetOwners(ctx).SearchQuery(searchQuery).Oid(oid).Execute() + +Clear all owners across multiple assets based on a search query + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + searchQuery := *openapiclient.NewSearchQuery("alive:true and os:windows") // SearchQuery | search query to filter + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.ClearBulkAssetOwners(context.Background()).SearchQuery(searchQuery).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ClearBulkAssetOwners``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ClearBulkAssetOwners`: BulkAssetUpdateResult + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.ClearBulkAssetOwners`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiClearBulkAssetOwnersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchQuery** | [**SearchQuery**](SearchQuery.md) | search query to filter | + **oid** | **string** | The current Organization | + +### Return type + +[**BulkAssetUpdateResult**](BulkAssetUpdateResult.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ClearBulkAssetTags + +> map[string]interface{} ClearBulkAssetTags(ctx).SearchQuery(searchQuery).Oid(oid).Execute() + +Clear all tags across multiple assets based on a search query + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + searchQuery := *openapiclient.NewSearchQuery("alive:true and os:windows") // SearchQuery | search query to filter + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.ClearBulkAssetTags(context.Background()).SearchQuery(searchQuery).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ClearBulkAssetTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ClearBulkAssetTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.ClearBulkAssetTags`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiClearBulkAssetTagsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchQuery** | [**SearchQuery**](SearchQuery.md) | search query to filter | + **oid** | **string** | The current Organization | + +### Return type + +**map[string]interface{}** + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSample + +> Task CreateSample(ctx, siteId).SampleOptions(sampleOptions).Oid(oid).Execute() + +Create a traffic sampling task for a given site + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to scan + sampleOptions := *openapiclient.NewSampleOptions("eth0,wlan0") // SampleOptions | + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.CreateSample(context.Background(), siteId).SampleOptions(sampleOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.CreateSample``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateSample`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.CreateSample`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site to scan | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateSampleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **sampleOptions** | [**SampleOptions**](SampleOptions.md) | | + **oid** | **string** | The current Organization | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## CreateScan -> Task CreateScan(ctx, siteId).ScanOptions(scanOptions).Execute() +> Task CreateScan(ctx, siteId).ScanOptions(scanOptions).Oid(oid).Execute() -Create a scan task for a given site. +Create a scan task for a given site ### Example @@ -52,25 +351,26 @@ Create a scan task for a given site. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteId := TODO // string | UUID or name of the site to scan - scanOptions := openapiclient.ScanOptions{Targets: "Targets_example", Excludes: "Excludes_example", ScanName: "ScanName_example", ScanDescription: "ScanDescription_example", ScanFrequency: "ScanFrequency_example", ScanStart: 123, Agent: "Agent_example", Rate: 123, MaxHostRate: 123, Passes: 123, MaxSockets: 123, MaxGroupSize: 123, TcpPorts: "TcpPorts_example", Screenshots: true, Nameservers: "Nameservers_example", Probes: "Probes_example"} // ScanOptions | (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.CreateScan(context.Background(), siteId).ScanOptions(scanOptions).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.CreateScan``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateScan`: Task - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.CreateScan`: %v\n", resp) + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to scan + scanOptions := *openapiclient.NewScanOptions("defaults") // ScanOptions | + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.CreateScan(context.Background(), siteId).ScanOptions(scanOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.CreateScan``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateScan`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.CreateScan`: %v\n", resp) } ``` @@ -80,7 +380,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**siteId** | [**string**](.md) | UUID or name of the site to scan | +**siteId** | **string** | UUID or name of the site to scan | ### Other Parameters @@ -91,6 +391,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **scanOptions** | [**ScanOptions**](ScanOptions.md) | | + **oid** | **string** | The current Organization | ### Return type @@ -98,11 +399,11 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: text/json +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -112,9 +413,9 @@ Name | Type | Description | Notes ## CreateSite -> Site CreateSite(ctx).SiteOptions(siteOptions).Execute() +> Site CreateSite(ctx).SiteOptions(siteOptions).Oid(oid).Execute() -Create a new site. +Create a new site ### Example @@ -122,24 +423,25 @@ Create a new site. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteOptions := openapiclient.SiteOptions{Name: "Name_example", Description: "Description_example", Scope: "Scope_example", Excludes: "Excludes_example"} // SiteOptions | site definition - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.CreateSite(context.Background(), siteOptions).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.CreateSite``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateSite`: Site - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.CreateSite`: %v\n", resp) + siteOptions := *openapiclient.NewSiteOptions("New Site") // SiteOptions | site definition + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.CreateSite(context.Background()).SiteOptions(siteOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.CreateSite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateSite`: Site + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.CreateSite`: %v\n", resp) } ``` @@ -155,6 +457,7 @@ Other parameters are passed through a pointer to a apiCreateSiteRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **siteOptions** | [**SiteOptions**](SiteOptions.md) | site definition | + **oid** | **string** | The current Organization | ### Return type @@ -162,7 +465,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -176,9 +479,9 @@ Name | Type | Description | Notes ## GetAgent -> Agent GetAgent(ctx, agentId).Execute() +> Agent GetAgent(ctx, agentId).Oid(oid).Execute() -Get details for a single agent. +Get details for a single agent. Legacy path for /org/explorers/{explorer_id} ### Example @@ -186,24 +489,25 @@ Get details for a single agent. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - agentId := TODO // string | UUID of the agent - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetAgent(context.Background(), agentId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetAgent``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAgent`: Agent - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetAgent`: %v\n", resp) + agentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the agent + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetAgent(context.Background(), agentId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetAgent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAgent`: Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetAgent`: %v\n", resp) } ``` @@ -213,7 +517,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**agentId** | [**string**](.md) | UUID of the agent | +**agentId** | **string** | UUID of the agent | ### Other Parameters @@ -223,6 +527,7 @@ Other parameters are passed through a pointer to a apiGetAgentRequest struct via Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type @@ -230,7 +535,7 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -244,9 +549,9 @@ Name | Type | Description | Notes ## GetAgents -> []Agent GetAgents(ctx).Execute() +> []Agent GetAgents(ctx).Oid(oid).Execute() -Get all agents. +Get all agents. Legacy path for /org/explorers ### Example @@ -254,46 +559,1610 @@ Get all agents. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetAgents(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetAgents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAgents`: []Agent - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetAgents`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetAgents(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetAgents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAgents`: []Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetAgents`: %v\n", resp) } ``` ### Path Parameters -This endpoint does not need any parameter. + ### Other Parameters Other parameters are passed through a pointer to a apiGetAgentsRequest struct via the builder pattern +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**[]Agent**](Agent.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAsset + +> Asset GetAsset(ctx, assetId).Oid(oid).Execute() + +Get asset details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to retrieve + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetAsset(context.Background(), assetId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetAsset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAsset`: Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetAsset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**assetId** | **string** | UUID of the asset to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Asset**](Asset.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAssets + +> []Asset GetAssets(ctx).Oid(oid).Search(search).Fields(fields).Execute() + +Get all assets + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | A search query in runZero search query syntax (optional) + fields := "fields_example" // string | A list of fields to export, comma-separated (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetAssets(context.Background()).Oid(oid).Search(search).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetAssets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAssets`: []Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetAssets`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | A search query in runZero search query syntax | + **fields** | **string** | A list of fields to export, comma-separated | + +### Return type + +[**[]Asset**](Asset.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExplorer + +> Agent GetExplorer(ctx, explorerId).Oid(oid).Execute() + +Get details for a single explorer. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + explorerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the explorer + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetExplorer(context.Background(), explorerId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetExplorer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExplorer`: Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetExplorer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**explorerId** | **string** | UUID of the explorer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExplorerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Agent**](Agent.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExplorers + +> []Agent GetExplorers(ctx).Oid(oid).Execute() + +Get all explorers + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetExplorers(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetExplorers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExplorers`: []Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetExplorers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExplorersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**[]Agent**](Agent.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHostedZone + +> HostedZone GetHostedZone(ctx, hostedZoneId).Oid(oid).Execute() + +Get details for a single hosted zone. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + hostedZoneId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the hosted zone + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetHostedZone(context.Background(), hostedZoneId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetHostedZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHostedZone`: HostedZone + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetHostedZone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hostedZoneId** | **string** | UUID of the hosted zone | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHostedZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**HostedZone**](HostedZone.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHostedZones + +> []HostedZone GetHostedZones(ctx).Oid(oid).Execute() + +Get all hosted zones + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetHostedZones(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetHostedZones``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHostedZones`: []HostedZone + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetHostedZones`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHostedZonesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**[]HostedZone**](HostedZone.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetKey + +> OrganizationAPIKey GetKey(ctx).Oid(oid).Execute() + +Get API key details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetKey(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetKey`: OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetKey`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**OrganizationAPIKey**](OrganizationAPIKey.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrgCustomIntegration + +> CustomIntegration GetOrgCustomIntegration(ctx, customIntegrationId).Execute() + +Get single custom integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetOrgCustomIntegration(context.Background(), customIntegrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrgCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOrgCustomIntegration`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetOrgCustomIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customIntegrationId** | **string** | UUID of the custom integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrgCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrgCustomIntegrations + +> CustomIntegration GetOrgCustomIntegrations(ctx).Execute() + +Get all custom integrations + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetOrgCustomIntegrations(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrgCustomIntegrations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOrgCustomIntegrations`: CustomIntegration + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetOrgCustomIntegrations`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrgCustomIntegrationsRequest struct via the builder pattern + + +### Return type + +[**CustomIntegration**](CustomIntegration.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOrganization + +> Organization GetOrganization(ctx).Oid(oid).Execute() + +Get organization details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetOrganization(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOrganization`: Organization + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetOrganization`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetService + +> Service GetService(ctx, serviceId).Oid(oid).Execute() + +Get service details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the service to retrieve + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetService(context.Background(), serviceId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetService`: Service + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **string** | UUID of the service to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Service**](Service.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetServices + +> []Service GetServices(ctx).Oid(oid).Search(search).Execute() + +Get all services + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetServices(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetServices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServices`: []Service + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetServices`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Service**](Service.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetSite + +> Site GetSite(ctx, siteId).Oid(oid).Execute() + +Get site details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetSite(context.Background(), siteId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetSite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSite`: Site + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetSite`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSiteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Site**](Site.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetSites + +> []Site GetSites(ctx).Oid(oid).Execute() + +Get all sites + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetSites(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetSites``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSites`: []Site + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetSites`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSitesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**[]Site**](Site.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTask + +> Task GetTask(ctx, taskId).Oid(oid).Execute() + +Get task details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task to retrieve + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetTask(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetTask``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTask`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetTask`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskId** | **string** | UUID of the task to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTaskRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTaskChangeReport + +> GetTaskChangeReport(ctx, taskId).Oid(oid).Execute() + +Returns a temporary task change report data url + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetTaskChangeReport(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetTaskChangeReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskId** | **string** | UUID of the task | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTaskChangeReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTaskLog + +> GetTaskLog(ctx, taskId).Oid(oid).Execute() + +Returns a temporary task log data url + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetTaskLog(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetTaskLog``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskId** | **string** | UUID of the task | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTaskLogRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTaskScanData + +> GetTaskScanData(ctx, taskId).Oid(oid).Execute() + +Returns a temporary task scan data url + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetTaskScanData(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetTaskScanData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskId** | **string** | UUID of the task | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTaskScanDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + + (empty response body) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTasks + +> []Task GetTasks(ctx).Oid(oid).Status(status).Search(search).Execute() + +Get all tasks (last 1000) + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + status := "status_example" // string | an optional status string for filtering results (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetTasks(context.Background()).Oid(oid).Status(status).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetTasks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTasks`: []Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetTasks`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTasksRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **status** | **string** | an optional status string for filtering results | + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetWirelessLAN + +> Wireless GetWirelessLAN(ctx, wirelessId).Oid(oid).Execute() + +Get wireless LAN details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wirelessId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the wireless LAN to retrieve + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetWirelessLAN(context.Background(), wirelessId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetWirelessLAN``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWirelessLAN`: Wireless + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetWirelessLAN`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wirelessId** | **string** | UUID of the wireless LAN to retrieve | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetWirelessLANRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Wireless**](Wireless.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetWirelessLANs + +> []Wireless GetWirelessLANs(ctx).Oid(oid).Search(search).Execute() + +Get all wireless LANs + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.GetWirelessLANs(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetWirelessLANs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWirelessLANs`: []Wireless + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.GetWirelessLANs`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetWirelessLANsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]Wireless**](Wireless.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## HideTask + +> Task HideTask(ctx, taskId).Oid(oid).Execute() + +Signal that a completed task should be hidden + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task to hide + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.HideTask(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.HideTask``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HideTask`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.HideTask`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**taskId** | **string** | UUID of the task to hide | + +### Other Parameters + +Other parameters are passed through a pointer to a apiHideTaskRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oid** | **string** | The current Organization | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ImportNessusScanData + +> Task ImportNessusScanData(ctx, siteId).Body(body).Oid(oid).Execute() + +Import a Nessus scan data file into a site + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to import Nessus scan data into + body := os.NewFile(1234, "some_file") // *os.File | + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.ImportNessusScanData(context.Background(), siteId).Body(body).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ImportNessusScanData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportNessusScanData`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.ImportNessusScanData`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site to import Nessus scan data into | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportNessusScanDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | ***os.File** | | + **oid** | **string** | The current Organization | + ### Return type -[**[]Agent**](Agent.md) +[**Task**](Task.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/octet-stream - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -301,11 +2170,11 @@ Other parameters are passed through a pointer to a apiGetAgentsRequest struct vi [[Back to README]](../README.md) -## GetAsset +## ImportPacketData -> Asset GetAsset(ctx, assetId).Execute() +> Task ImportPacketData(ctx, siteId).Body(body).Oid(oid).Execute() -Get asset details. +Import a packet capture file into a site ### Example @@ -313,24 +2182,26 @@ Get asset details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - assetId := TODO // string | UUID of the asset to retrieve - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetAsset(context.Background(), assetId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetAsset``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAsset`: Asset - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetAsset`: %v\n", resp) + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to import packet capture into + body := os.NewFile(1234, "some_file") // *os.File | + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.ImportPacketData(context.Background(), siteId).Body(body).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ImportPacketData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportPacketData`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.ImportPacketData`: %v\n", resp) } ``` @@ -340,28 +2211,30 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**assetId** | [**string**](.md) | UUID of the asset to retrieve | +**siteId** | **string** | UUID or name of the site to import packet capture into | ### Other Parameters -Other parameters are passed through a pointer to a apiGetAssetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiImportPacketDataRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **body** | ***os.File** | | + **oid** | **string** | The current Organization | ### Return type -[**Asset**](Asset.md) +[**Task**](Task.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/octet-stream - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -369,11 +2242,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetAssets +## ImportScanData -> []Asset GetAssets(ctx).Search(search).Execute() +> Task ImportScanData(ctx, siteId).Body(body).Oid(oid).Execute() -Get all assets. +Import a scan data file into a site ### Example @@ -381,51 +2254,59 @@ Get all assets. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetAssets(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetAssets``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAssets`: []Asset - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetAssets`: %v\n", resp) + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to import scan data into + body := os.NewFile(1234, "some_file") // *os.File | + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.ImportScanData(context.Background(), siteId).Body(body).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ImportScanData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportScanData`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.ImportScanData`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site to import scan data into | ### Other Parameters -Other parameters are passed through a pointer to a apiGetAssetsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiImportScanDataRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + + **body** | ***os.File** | | + **oid** | **string** | The current Organization | ### Return type -[**[]Asset**](Asset.md) +[**Task**](Task.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/octet-stream - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -433,11 +2314,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetKey +## MergeAssets -> APIKey GetKey(ctx).Execute() +> map[string]interface{} MergeAssets(ctx).AssetIDs(assetIDs).Oid(oid).Execute() -Get API key details. +Merge multiple assets ### Example @@ -445,46 +2326,53 @@ Get API key details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetKey(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetKey`: APIKey - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetKey`: %v\n", resp) + assetIDs := *openapiclient.NewAssetIDs([]string{"453C191F-644E-4EA8-9727-0E81E5275C35"}) // AssetIDs | List of Asset IDs to merge + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.MergeAssets(context.Background()).AssetIDs(assetIDs).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.MergeAssets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `MergeAssets`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.MergeAssets`: %v\n", resp) } ``` ### Path Parameters -This endpoint does not need any parameter. + ### Other Parameters -Other parameters are passed through a pointer to a apiGetKeyRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiMergeAssetsRequest struct via the builder pattern + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assetIDs** | [**AssetIDs**](AssetIDs.md) | List of Asset IDs to merge | + **oid** | **string** | The current Organization | ### Return type -[**APIKey**](APIKey.md) +**map[string]interface{}** ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -492,11 +2380,11 @@ Other parameters are passed through a pointer to a apiGetKeyRequest struct via t [[Back to README]](../README.md) -## GetOrganization +## RemoveAgent -> Organization GetOrganization(ctx).Execute() +> RemoveAgent(ctx, agentId).Oid(oid).Execute() -Get organization details. +Remove and uninstall an agent. Legacy path for /org/explorers/{explorer_id} ### Example @@ -504,42 +2392,51 @@ Get organization details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetOrganization(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetOrganization``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOrganization`: Organization - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetOrganization`: %v\n", resp) + agentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the agent to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveAgent(context.Background(), agentId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveAgent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | UUID of the agent to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetOrganizationRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveAgentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type -[**Organization**](Organization.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -551,11 +2448,11 @@ Other parameters are passed through a pointer to a apiGetOrganizationRequest str [[Back to README]](../README.md) -## GetService +## RemoveAsset -> Service GetService(ctx, serviceId).Execute() +> RemoveAsset(ctx, assetId).Oid(oid).Execute() -Get service details. +Remove an asset ### Example @@ -563,24 +2460,23 @@ Get service details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - serviceId := TODO // string | UUID of the service to retrieve - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetService(context.Background(), serviceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetService``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetService`: Service - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetService`: %v\n", resp) + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveAsset(context.Background(), assetId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveAsset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -590,24 +2486,25 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceId** | [**string**](.md) | UUID of the service to retrieve | +**assetId** | **string** | UUID of the asset to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetServiceRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveAssetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type -[**Service**](Service.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -619,11 +2516,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetServices +## RemoveAssetSource -> []Service GetServices(ctx).Search(search).Execute() +> RemoveAssetSource(ctx, assetId, sourceId).Execute() -Get all services. +Remove single source from asset ### Example @@ -631,47 +2528,52 @@ Get all services. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetServices(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetServices``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServices`: []Service - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetServices`: %v\n", resp) + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + sourceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the source + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveAssetSource(context.Background(), assetId, sourceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveAssetSource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**assetId** | **string** | UUID of the asset to update | +**sourceId** | **string** | UUID of the source | ### Other Parameters -Other parameters are passed through a pointer to a apiGetServicesRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveAssetSourceRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + + ### Return type -[**[]Service**](Service.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -683,11 +2585,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetSite +## RemoveBulkAssets -> Site GetSite(ctx, siteId).Execute() +> RemoveBulkAssets(ctx).AssetIDs(assetIDs).Oid(oid).Execute() -Get site details. +Removes multiple assets by ID ### Example @@ -695,55 +2597,51 @@ Get site details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteId := TODO // string | UUID or name of the site - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetSite(context.Background(), siteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetSite``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSite`: Site - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetSite`: %v\n", resp) + assetIDs := *openapiclient.NewAssetIDs([]string{"453C191F-644E-4EA8-9727-0E81E5275C35"}) // AssetIDs | list of asset IDs to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveBulkAssets(context.Background()).AssetIDs(assetIDs).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveBulkAssets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**siteId** | [**string**](.md) | UUID or name of the site | ### Other Parameters -Other parameters are passed through a pointer to a apiGetSiteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveBulkAssetsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **assetIDs** | [**AssetIDs**](AssetIDs.md) | list of asset IDs to remove | + **oid** | **string** | The current Organization | ### Return type -[**Site**](Site.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -751,11 +2649,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetSites +## RemoveCustomIntegration -> []Site GetSites(ctx).Execute() +> RemoveCustomIntegration(ctx, assetId, customIntegrationId).Execute() -Get all sites. +Remove single custom integration from asset ### Example @@ -763,42 +2661,52 @@ Get all sites. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetSites(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetSites``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSites`: []Site - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetSites`: %v\n", resp) + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + customIntegrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the custom integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveCustomIntegration(context.Background(), assetId, customIntegrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveCustomIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**assetId** | **string** | UUID of the asset to update | +**customIntegrationId** | **string** | UUID of the custom integration | ### Other Parameters -Other parameters are passed through a pointer to a apiGetSitesRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveCustomIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type -[**[]Site**](Site.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -810,11 +2718,13 @@ Other parameters are passed through a pointer to a apiGetSitesRequest struct via [[Back to README]](../README.md) -## GetTask +## RemoveExplorer + +> RemoveExplorer(ctx, explorerId).Oid(oid).Execute() + +Remove and uninstall an explorer -> Task GetTask(ctx, taskId).Execute() -Get task details. ### Example @@ -822,24 +2732,23 @@ Get task details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task to retrieve - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetTask(context.Background(), taskId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTask`: Task - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetTask`: %v\n", resp) + explorerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the explorer to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveExplorer(context.Background(), explorerId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveExplorer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -849,24 +2758,25 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task to retrieve | +**explorerId** | **string** | UUID of the explorer to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetTaskRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveExplorerRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type -[**Task**](Task.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -878,11 +2788,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetTaskChangeReport +## RemoveKey -> GetTaskChangeReport(ctx, taskId).Execute() +> RemoveKey(ctx).Oid(oid).Execute() -Returns a temporary task change report data url. +Remove the current API key ### Example @@ -890,41 +2800,37 @@ Returns a temporary task change report data url. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetTaskChangeReport(context.Background(), taskId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetTaskChangeReport``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveKey(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task | ### Other Parameters -Other parameters are passed through a pointer to a apiGetTaskChangeReportRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveKeyRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **oid** | **string** | The current Organization | ### Return type @@ -932,23 +2838,23 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## GetTaskScanData +## RemoveService -> GetTaskScanData(ctx, taskId).Execute() +> RemoveService(ctx, serviceId).Oid(oid).Execute() -Returns a temporary task scan data url. +Remove a service ### Example @@ -956,22 +2862,23 @@ Returns a temporary task scan data url. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetTaskScanData(context.Background(), taskId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetTaskScanData``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the service to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveService(context.Background(), serviceId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -981,16 +2888,17 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task | +**serviceId** | **string** | UUID of the service to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetTaskScanDataRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveServiceRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type @@ -998,23 +2906,23 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## GetTasks +## RemoveSite -> []Task GetTasks(ctx).Status(status).Execute() +> RemoveSite(ctx, siteId).Oid(oid).Execute() -Get all tasks (last 1000). +Remove a site and associated assets ### Example @@ -1022,47 +2930,51 @@ Get all tasks (last 1000). package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - status := "status_example" // string | an optional status string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetTasks(context.Background(), ).Status(status).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetTasks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTasks`: []Task - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetTasks`: %v\n", resp) + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveSite(context.Background(), siteId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveSite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetTasksRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveSiteRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **string** | an optional status string for filtering results | + + **oid** | **string** | The current Organization | ### Return type -[**[]Task**](Task.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1074,11 +2986,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetWirelessLAN +## RemoveWirelessLAN -> Wireless GetWirelessLAN(ctx, wirelessId).Execute() +> RemoveWirelessLAN(ctx, wirelessId).Oid(oid).Execute() -Get wireless LAN details. +Remove a wireless LAN ### Example @@ -1086,24 +2998,23 @@ Get wireless LAN details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - wirelessId := TODO // string | UUID of the wireless LAN to retrieve - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetWirelessLAN(context.Background(), wirelessId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetWirelessLAN``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWirelessLAN`: Wireless - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetWirelessLAN`: %v\n", resp) + wirelessId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the wireless LAN to remove + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveWirelessLAN(context.Background(), wirelessId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveWirelessLAN``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1113,24 +3024,25 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**wirelessId** | [**string**](.md) | UUID of the wireless LAN to retrieve | +**wirelessId** | **string** | UUID of the wireless LAN to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiGetWirelessLANRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRemoveWirelessLANRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type -[**Wireless**](Wireless.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1142,11 +3054,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetWirelessLANs +## RotateKey -> []Wireless GetWirelessLANs(ctx).Search(search).Execute() +> OrganizationAPIKey RotateKey(ctx).Oid(oid).Execute() -Get all wireless LANs. +Rotate the API key secret and return the updated key ### Example @@ -1154,24 +3066,24 @@ Get all wireless LANs. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - search := "search_example" // string | an optional search string for filtering results (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.GetWirelessLANs(context.Background(), ).Search(search).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.GetWirelessLANs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWirelessLANs`: []Wireless - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.GetWirelessLANs`: %v\n", resp) + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.RotateKey(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RotateKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RotateKey`: OrganizationAPIKey + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.RotateKey`: %v\n", resp) } ``` @@ -1181,20 +3093,20 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiGetWirelessLANsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiRotateKeyRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **search** | **string** | an optional search string for filtering results | + **oid** | **string** | The current Organization | ### Return type -[**[]Wireless**](Wireless.md) +[**OrganizationAPIKey**](OrganizationAPIKey.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1206,11 +3118,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## HideTask +## StopTask -> HideTask(ctx, taskId).Execute() +> Task StopTask(ctx, taskId).Oid(oid).Execute() -Signal that a completed task should be hidden. +Signal that a task should be stopped or canceled.This will also remove recurring and scheduled tasks ### Example @@ -1218,22 +3130,25 @@ Signal that a completed task should be hidden. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task to hide - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.HideTask(context.Background(), taskId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.HideTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task to stop + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.StopTask(context.Background(), taskId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.StopTask``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `StopTask`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.StopTask`: %v\n", resp) } ``` @@ -1243,40 +3158,41 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task to hide | +**taskId** | **string** | UUID of the task to stop | ### Other Parameters -Other parameters are passed through a pointer to a apiHideTaskRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiStopTaskRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**Task**](Task.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ImportScanData +## UpdateAgentSettings -> Task ImportScanData(ctx, siteId).Body(body).Execute() +> Agent UpdateAgentSettings(ctx, agentId).AgentPatchedSettings(agentPatchedSettings).Oid(oid).Execute() -Import a scan data file into a site. +Update the settings associated with the agent. Legacy path for /org/explorers/{explorer_id} ### Example @@ -1284,25 +3200,26 @@ Import a scan data file into a site. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteId := TODO // string | UUID or name of the site to import scan data into - body := 987 // *os.File | (optional) - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.ImportScanData(context.Background(), siteId).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.ImportScanData``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ImportScanData`: Task - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.ImportScanData`: %v\n", resp) + agentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the agent to update + agentPatchedSettings := *openapiclient.NewAgentPatchedSettings() // AgentPatchedSettings | The updated settings to apply to the agent + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateAgentSettings(context.Background(), agentId).AgentPatchedSettings(agentPatchedSettings).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateAgentSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAgentSettings`: Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateAgentSettings`: %v\n", resp) } ``` @@ -1312,29 +3229,30 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**siteId** | [**string**](.md) | UUID or name of the site to import scan data into | +**agentId** | **string** | UUID of the agent to update | ### Other Parameters -Other parameters are passed through a pointer to a apiImportScanDataRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAgentSettingsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | ***os.File** | | + **agentPatchedSettings** | [**AgentPatchedSettings**](AgentPatchedSettings.md) | The updated settings to apply to the agent | + **oid** | **string** | The current Organization | ### Return type -[**Task**](Task.md) +[**Agent**](Agent.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: application/octet-stream +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -1342,11 +3260,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## RemoveAgent +## UpdateAssetComments -> RemoveAgent(ctx, agentId).Execute() +> Asset UpdateAssetComments(ctx, assetId).AssetComments(assetComments).Oid(oid).Execute() -Remove and uninstall an agent. +Update asset comments ### Example @@ -1354,22 +3272,26 @@ Remove and uninstall an agent. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - agentId := TODO // string | UUID of the agent to remove - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.RemoveAgent(context.Background(), agentId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.RemoveAgent``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + assetComments := *openapiclient.NewAssetComments("Sales Laptop") // AssetComments | comments to apply to the asset + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateAssetComments(context.Background(), assetId).AssetComments(assetComments).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateAssetComments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetComments`: Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateAssetComments`: %v\n", resp) } ``` @@ -1379,40 +3301,42 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**agentId** | [**string**](.md) | UUID of the agent to remove | +**assetId** | **string** | UUID of the asset to update | ### Other Parameters -Other parameters are passed through a pointer to a apiRemoveAgentRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAssetCommentsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **assetComments** | [**AssetComments**](AssetComments.md) | comments to apply to the asset | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**Asset**](Asset.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## RemoveAsset +## UpdateAssetCriticality -> RemoveAsset(ctx, assetId).Execute() +> Asset UpdateAssetCriticality(ctx, assetId).AssetCriticality(assetCriticality).Oid(oid).Execute() -Remove an asset. +Update asset criticality ### Example @@ -1420,22 +3344,26 @@ Remove an asset. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - assetId := TODO // string | UUID of the asset to remove - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.RemoveAsset(context.Background(), assetId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.RemoveAsset``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + assetCriticality := *openapiclient.NewAssetCriticality("high") // AssetCriticality | comments to apply to the asset + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateAssetCriticality(context.Background(), assetId).AssetCriticality(assetCriticality).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateAssetCriticality``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetCriticality`: Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateAssetCriticality`: %v\n", resp) } ``` @@ -1445,40 +3373,42 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**assetId** | [**string**](.md) | UUID of the asset to remove | +**assetId** | **string** | UUID of the asset to update | ### Other Parameters -Other parameters are passed through a pointer to a apiRemoveAssetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAssetCriticalityRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **assetCriticality** | [**AssetCriticality**](AssetCriticality.md) | comments to apply to the asset | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**Asset**](Asset.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## RemoveService +## UpdateAssetOwners -> RemoveService(ctx, serviceId).Execute() +> Asset UpdateAssetOwners(ctx, assetId).AssetOwnerships(assetOwnerships).Oid(oid).Execute() -Remove a service. +Update asset owners ### Example @@ -1486,22 +3416,26 @@ Remove a service. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - serviceId := TODO // string | UUID of the service to remove - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.RemoveService(context.Background(), serviceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.RemoveService``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + assetOwnerships := *openapiclient.NewAssetOwnerships() // AssetOwnerships | list of ownerships to apply to the asset + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateAssetOwners(context.Background(), assetId).AssetOwnerships(assetOwnerships).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateAssetOwners``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetOwners`: Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateAssetOwners`: %v\n", resp) } ``` @@ -1511,40 +3445,42 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceId** | [**string**](.md) | UUID of the service to remove | +**assetId** | **string** | UUID of the asset to update | ### Other Parameters -Other parameters are passed through a pointer to a apiRemoveServiceRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAssetOwnersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **assetOwnerships** | [**AssetOwnerships**](AssetOwnerships.md) | list of ownerships to apply to the asset | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**Asset**](Asset.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## RemoveSite +## UpdateAssetTags -> RemoveSite(ctx, siteId).Execute() +> Asset UpdateAssetTags(ctx, assetId).AssetTags(assetTags).Oid(oid).Execute() -Remove a site and associated assets. +Update asset tags ### Example @@ -1552,22 +3488,26 @@ Remove a site and associated assets. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteId := TODO // string | UUID or name of the site to remove - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.RemoveSite(context.Background(), siteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.RemoveSite``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the asset to update + assetTags := *openapiclient.NewAssetTags("ThisTag=Value -OldTag") // AssetTags | tags to apply to the asset + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateAssetTags(context.Background(), assetId).AssetTags(assetTags).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateAssetTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetTags`: Asset + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateAssetTags`: %v\n", resp) } ``` @@ -1577,40 +3517,42 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**siteId** | [**string**](.md) | UUID or name of the site to remove | +**assetId** | **string** | UUID of the asset to update | ### Other Parameters -Other parameters are passed through a pointer to a apiRemoveSiteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAssetTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **assetTags** | [**AssetTags**](AssetTags.md) | tags to apply to the asset | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**Asset**](Asset.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## RemoveWirelessLAN +## UpdateBulkAssetCriticality -> RemoveWirelessLAN(ctx, wirelessId).Execute() +> map[string]interface{} UpdateBulkAssetCriticality(ctx).AssetCriticalityWithSearch(assetCriticalityWithSearch).Oid(oid).Execute() -Remove a wireless LAN. +Update criticality across multiple assets based on a search query ### Example @@ -1618,65 +3560,65 @@ Remove a wireless LAN. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - wirelessId := TODO // string | UUID of the wireless LAN to remove - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.RemoveWirelessLAN(context.Background(), wirelessId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.RemoveWirelessLAN``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetCriticalityWithSearch := *openapiclient.NewAssetCriticalityWithSearch("high", "alive:true and os:windows") // AssetCriticalityWithSearch | search query to filter and criticality to apply + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateBulkAssetCriticality(context.Background()).AssetCriticalityWithSearch(assetCriticalityWithSearch).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateBulkAssetCriticality``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateBulkAssetCriticality`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateBulkAssetCriticality`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**wirelessId** | [**string**](.md) | UUID of the wireless LAN to remove | ### Other Parameters -Other parameters are passed through a pointer to a apiRemoveWirelessLANRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateBulkAssetCriticalityRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **assetCriticalityWithSearch** | [**AssetCriticalityWithSearch**](AssetCriticalityWithSearch.md) | search query to filter and criticality to apply | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +**map[string]interface{}** ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## StopTask +## UpdateBulkAssetOwners -> StopTask(ctx, taskId).Execute() +> BulkAssetUpdateResult UpdateBulkAssetOwners(ctx).AssetOwnershipsWithSearch(assetOwnershipsWithSearch).Oid(oid).Execute() -Signal that a task should be stopped or canceled. +Update asset owners across multiple assets based on a search query ### Example @@ -1684,65 +3626,65 @@ Signal that a task should be stopped or canceled. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task to stop - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.StopTask(context.Background(), taskId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.StopTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + assetOwnershipsWithSearch := *openapiclient.NewAssetOwnershipsWithSearch("alive:true and os:windows", []openapiclient.AssetOwnershipsWithSearchOwnershipsInner{*openapiclient.NewAssetOwnershipsWithSearchOwnershipsInner()}) // AssetOwnershipsWithSearch | search query to filter and ownerships to apply + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateBulkAssetOwners(context.Background()).AssetOwnershipsWithSearch(assetOwnershipsWithSearch).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateBulkAssetOwners``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateBulkAssetOwners`: BulkAssetUpdateResult + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateBulkAssetOwners`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task to stop | ### Other Parameters -Other parameters are passed through a pointer to a apiStopTaskRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateBulkAssetOwnersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **assetOwnershipsWithSearch** | [**AssetOwnershipsWithSearch**](AssetOwnershipsWithSearch.md) | search query to filter and ownerships to apply | + **oid** | **string** | The current Organization | ### Return type - (empty response body) +[**BulkAssetUpdateResult**](BulkAssetUpdateResult.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## UpdateAgentSite +## UpdateBulkAssetTags -> Agent UpdateAgentSite(ctx, agentId).AgentSiteID(agentSiteID).Execute() +> map[string]interface{} UpdateBulkAssetTags(ctx).AssetTagsWithSearch(assetTagsWithSearch).Oid(oid).Execute() -Update the site associated with agent. +Update tags across multiple assets based on a search query ### Example @@ -1750,53 +3692,49 @@ Update the site associated with agent. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - agentId := TODO // string | UUID of the agent to update - agentSiteID := openapiclient.AgentSiteID{SiteId: "SiteId_example"} // AgentSiteID | site_id to associate with the agent - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateAgentSite(context.Background(), agentId, agentSiteID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateAgentSite``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAgentSite`: Agent - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateAgentSite`: %v\n", resp) + assetTagsWithSearch := *openapiclient.NewAssetTagsWithSearch("ThisTag=Value -OldTag", "alive:true and os:windows") // AssetTagsWithSearch | search query to filter and tags to apply + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateBulkAssetTags(context.Background()).AssetTagsWithSearch(assetTagsWithSearch).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateBulkAssetTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateBulkAssetTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateBulkAssetTags`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**agentId** | [**string**](.md) | UUID of the agent to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateAgentSiteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateBulkAssetTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **agentSiteID** | [**AgentSiteID**](AgentSiteID.md) | site_id to associate with the agent | + **assetTagsWithSearch** | [**AssetTagsWithSearch**](AssetTagsWithSearch.md) | search query to filter and tags to apply | + **oid** | **string** | The current Organization | ### Return type -[**Agent**](Agent.md) +**map[string]interface{}** ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1808,11 +3746,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateAssetComments +## UpdateExplorerSettings + +> Agent UpdateExplorerSettings(ctx, explorerId).AgentPatchedSettings(agentPatchedSettings).Oid(oid).Execute() + +Update the settings associated with the Explorer -> Asset UpdateAssetComments(ctx, assetId).AssetComments(assetComments).Execute() -Update asset comments. ### Example @@ -1820,25 +3760,26 @@ Update asset comments. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - assetId := TODO // string | UUID of the asset to update - assetComments := openapiclient.AssetComments{Comments: "Comments_example"} // AssetComments | comments to apply to the asset - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateAssetComments(context.Background(), assetId, assetComments).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateAssetComments``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAssetComments`: Asset - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateAssetComments`: %v\n", resp) + explorerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the explorer to update + agentPatchedSettings := *openapiclient.NewAgentPatchedSettings() // AgentPatchedSettings | The updated settings to apply to the Explorer + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateExplorerSettings(context.Background(), explorerId).AgentPatchedSettings(agentPatchedSettings).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateExplorerSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateExplorerSettings`: Agent + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateExplorerSettings`: %v\n", resp) } ``` @@ -1848,25 +3789,26 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**assetId** | [**string**](.md) | UUID of the asset to update | +**explorerId** | **string** | UUID of the explorer to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateAssetCommentsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateExplorerSettingsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **assetComments** | [**AssetComments**](AssetComments.md) | comments to apply to the asset | + **agentPatchedSettings** | [**AgentPatchedSettings**](AgentPatchedSettings.md) | The updated settings to apply to the Explorer | + **oid** | **string** | The current Organization | ### Return type -[**Asset**](Asset.md) +[**Agent**](Agent.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1878,11 +3820,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateAssetTags +## UpdateOrganization -> Asset UpdateAssetTags(ctx, assetId).AssetTags(assetTags).Execute() +> Organization UpdateOrganization(ctx).OrgOptions(orgOptions).Oid(oid).Execute() -Update asset tags. +Update organization details ### Example @@ -1890,53 +3832,49 @@ Update asset tags. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - assetId := TODO // string | UUID of the agent to update - assetTags := openapiclient.AssetTags{Tags: map[string]string{ "Key" = "Value" }} // AssetTags | tags to apply to the asset - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateAssetTags(context.Background(), assetId, assetTags).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateAssetTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAssetTags`: Asset - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateAssetTags`: %v\n", resp) + orgOptions := *openapiclient.NewOrgOptions() // OrgOptions | organization options + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateOrganization(context.Background()).OrgOptions(orgOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateOrganization``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateOrganization`: Organization + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateOrganization`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**assetId** | [**string**](.md) | UUID of the agent to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateAssetTagsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateOrganizationRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **assetTags** | [**AssetTags**](AssetTags.md) | tags to apply to the asset | + **orgOptions** | [**OrgOptions**](OrgOptions.md) | organization options | + **oid** | **string** | The current Organization | ### Return type -[**Asset**](Asset.md) +[**Organization**](Organization.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1948,11 +3886,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateOrganization +## UpdateSite -> Organization UpdateOrganization(ctx).OrgOptions(orgOptions).Execute() +> Site UpdateSite(ctx, siteId).SiteOptions(siteOptions).Oid(oid).Execute() -Update organization details. +Update a site definition ### Example @@ -1960,47 +3898,55 @@ Update organization details. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - orgOptions := openapiclient.OrgOptions{Name: "Name_example", Description: "Description_example"} // OrgOptions | organization options - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateOrganization(context.Background(), orgOptions).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateOrganization``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateOrganization`: Organization - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateOrganization`: %v\n", resp) + siteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID or name of the site to update + siteOptions := *openapiclient.NewSiteOptions("New Site") // SiteOptions | site object + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateSite(context.Background(), siteId).SiteOptions(siteOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateSite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateSite`: Site + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateSite`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**siteId** | **string** | UUID or name of the site to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateOrganizationRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateSiteRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orgOptions** | [**OrgOptions**](OrgOptions.md) | organization options | + + **siteOptions** | [**SiteOptions**](SiteOptions.md) | site object | + **oid** | **string** | The current Organization | ### Return type -[**Organization**](Organization.md) +[**Site**](Site.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -2012,11 +3958,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateSite +## UpdateTask -> Site UpdateSite(ctx, siteId).SiteOptions(siteOptions).Execute() +> Task UpdateTask(ctx, taskId).TaskOptions(taskOptions).Oid(oid).Execute() -Update a site definition. +Update task parameters ### Example @@ -2024,25 +3970,26 @@ Update a site definition. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - siteId := TODO // string | UUID or name of the site to update - siteOptions := openapiclient.SiteOptions{Name: "Name_example", Description: "Description_example", Scope: "Scope_example", Excludes: "Excludes_example"} // SiteOptions | site object - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateSite(context.Background(), siteId, siteOptions).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateSite``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateSite`: Site - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateSite`: %v\n", resp) + taskId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the task to update + taskOptions := *openapiclient.NewTaskOptions() // TaskOptions | task object + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationAPI.UpdateTask(context.Background(), taskId).TaskOptions(taskOptions).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateTask``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTask`: Task + fmt.Fprintf(os.Stdout, "Response from `OrganizationAPI.UpdateTask`: %v\n", resp) } ``` @@ -2052,25 +3999,26 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**siteId** | [**string**](.md) | UUID or name of the site to update | +**taskId** | **string** | UUID of the task to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateSiteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateTaskRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **siteOptions** | [**SiteOptions**](SiteOptions.md) | site object | + **taskOptions** | [**TaskOptions**](TaskOptions.md) | task object | + **oid** | **string** | The current Organization | ### Return type -[**Site**](Site.md) +[**Task**](Task.md) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -2082,11 +4030,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdateTask +## UpgradeAgent -> Task UpdateTask(ctx, taskId).Task(task).Execute() +> UpgradeAgent(ctx, agentId).Oid(oid).Execute() -Update task parameters. +Force an agent to update and restart. Legacy path for /org/explorers/{explorer_id}/update ### Example @@ -2094,25 +4042,23 @@ Update task parameters. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - taskId := TODO // string | UUID of the task to update - task := openapiclient.Task{Id: "Id_example", Name: "Name_example", Description: "Description_example", ClientId: "ClientId_example", OrganizationId: "OrganizationId_example", AgentId: "AgentId_example", SiteId: "SiteId_example", CruncherId: "CruncherId_example", CreatedAt: int64(123), CreatedBy: "CreatedBy_example", CreatedByUserId: "CreatedByUserId_example", UpdatedAt: int64(123), Type: "Type_example", Status: "Status_example", Error: "Error_example", Params: map[string]string{ "Key" = "Value" }, Stats: map[string]string{ "Key" = "Value" }, Hidden: false, ParentId: "ParentId_example", Recur: false, RecurFrequency: "RecurFrequency_example", StartTime: int64(123), RecurLast: int64(123), RecurNext: int64(123), RecurLastTaskId: "RecurLastTaskId_example"} // Task | task object - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpdateTask(context.Background(), taskId, task).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpdateTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateTask`: Task - fmt.Fprintf(os.Stdout, "Response from `OrganizationApi.UpdateTask`: %v\n", resp) + agentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the agent to update + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.UpgradeAgent(context.Background(), agentId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpgradeAgent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -2122,29 +4068,29 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskId** | [**string**](.md) | UUID of the task to update | +**agentId** | **string** | UUID of the agent to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpdateTaskRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpgradeAgentRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **task** | [**Task**](Task.md) | task object | + **oid** | **string** | The current Organization | ### Return type -[**Task**](Task.md) + (empty response body) ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -2152,11 +4098,13 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpgradeAgent +## UpgradeExplorer + +> UpgradeExplorer(ctx, explorerId).Oid(oid).Execute() + +Force an explorer to update and restart -> UpgradeAgent(ctx, agentId).Execute() -Force an agent to update and restart. ### Example @@ -2164,22 +4112,23 @@ Force an agent to update and restart. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - agentId := TODO // string | UUID of the agent to update - - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.OrganizationApi.UpgradeAgent(context.Background(), agentId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationApi.UpgradeAgent``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + explorerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the explorer to update + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.UpgradeExplorer(context.Background(), explorerId).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpgradeExplorer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -2189,16 +4138,17 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**agentId** | [**string**](.md) | UUID of the agent to update | +**explorerId** | **string** | UUID of the explorer to update | ### Other Parameters -Other parameters are passed through a pointer to a apiUpgradeAgentRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpgradeExplorerRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | ### Return type @@ -2206,12 +4156,12 @@ Name | Type | Description | Notes ### Authorization -[bearerAuth](../README.md#bearerAuth) +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/go/docs/ApiKey.md b/go/docs/OrganizationAPIKey.md similarity index 63% rename from go/docs/ApiKey.md rename to go/docs/OrganizationAPIKey.md index 7d4001e..1cc772e 100644 --- a/go/docs/ApiKey.md +++ b/go/docs/OrganizationAPIKey.md @@ -1,10 +1,10 @@ -# APIKey +# OrganizationAPIKey ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **ClientId** | Pointer to **string** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] **CreatedAt** | Pointer to **int64** | | [optional] @@ -18,371 +18,397 @@ Name | Type | Description | Notes **UsageLimit** | Pointer to **int64** | | [optional] **Token** | Pointer to **string** | | [optional] **Inactive** | Pointer to **bool** | | [optional] +**Type** | Pointer to **string** | | [optional] ## Methods -### NewAPIKey +### NewOrganizationAPIKey -`func NewAPIKey(id string, ) *APIKey` +`func NewOrganizationAPIKey(id string, ) *OrganizationAPIKey` -NewAPIKey instantiates a new APIKey object +NewOrganizationAPIKey instantiates a new OrganizationAPIKey object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewAPIKeyWithDefaults +### NewOrganizationAPIKeyWithDefaults -`func NewAPIKeyWithDefaults() *APIKey` +`func NewOrganizationAPIKeyWithDefaults() *OrganizationAPIKey` -NewAPIKeyWithDefaults instantiates a new APIKey object +NewOrganizationAPIKeyWithDefaults instantiates a new OrganizationAPIKey object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId -`func (o *APIKey) GetId() string` +`func (o *OrganizationAPIKey) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *APIKey) GetIdOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *APIKey) SetId(v string)` +`func (o *OrganizationAPIKey) SetId(v string)` SetId sets Id field to given value. ### GetClientId -`func (o *APIKey) GetClientId() string` +`func (o *OrganizationAPIKey) GetClientId() string` GetClientId returns the ClientId field if non-nil, zero value otherwise. ### GetClientIdOk -`func (o *APIKey) GetClientIdOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetClientIdOk() (*string, bool)` GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClientId -`func (o *APIKey) SetClientId(v string)` +`func (o *OrganizationAPIKey) SetClientId(v string)` SetClientId sets ClientId field to given value. ### HasClientId -`func (o *APIKey) HasClientId() bool` +`func (o *OrganizationAPIKey) HasClientId() bool` HasClientId returns a boolean if a field has been set. ### GetOrganizationId -`func (o *APIKey) GetOrganizationId() string` +`func (o *OrganizationAPIKey) GetOrganizationId() string` GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. ### GetOrganizationIdOk -`func (o *APIKey) GetOrganizationIdOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetOrganizationIdOk() (*string, bool)` GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOrganizationId -`func (o *APIKey) SetOrganizationId(v string)` +`func (o *OrganizationAPIKey) SetOrganizationId(v string)` SetOrganizationId sets OrganizationId field to given value. ### HasOrganizationId -`func (o *APIKey) HasOrganizationId() bool` +`func (o *OrganizationAPIKey) HasOrganizationId() bool` HasOrganizationId returns a boolean if a field has been set. ### GetCreatedAt -`func (o *APIKey) GetCreatedAt() int64` +`func (o *OrganizationAPIKey) GetCreatedAt() int64` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *APIKey) GetCreatedAtOk() (*int64, bool)` +`func (o *OrganizationAPIKey) GetCreatedAtOk() (*int64, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *APIKey) SetCreatedAt(v int64)` +`func (o *OrganizationAPIKey) SetCreatedAt(v int64)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *APIKey) HasCreatedAt() bool` +`func (o *OrganizationAPIKey) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetCreatedBy -`func (o *APIKey) GetCreatedBy() string` +`func (o *OrganizationAPIKey) GetCreatedBy() string` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk -`func (o *APIKey) GetCreatedByOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetCreatedByOk() (*string, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy -`func (o *APIKey) SetCreatedBy(v string)` +`func (o *OrganizationAPIKey) SetCreatedBy(v string)` SetCreatedBy sets CreatedBy field to given value. ### HasCreatedBy -`func (o *APIKey) HasCreatedBy() bool` +`func (o *OrganizationAPIKey) HasCreatedBy() bool` HasCreatedBy returns a boolean if a field has been set. ### GetComment -`func (o *APIKey) GetComment() string` +`func (o *OrganizationAPIKey) GetComment() string` GetComment returns the Comment field if non-nil, zero value otherwise. ### GetCommentOk -`func (o *APIKey) GetCommentOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetCommentOk() (*string, bool)` GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetComment -`func (o *APIKey) SetComment(v string)` +`func (o *OrganizationAPIKey) SetComment(v string)` SetComment sets Comment field to given value. ### HasComment -`func (o *APIKey) HasComment() bool` +`func (o *OrganizationAPIKey) HasComment() bool` HasComment returns a boolean if a field has been set. ### GetLastUsedAt -`func (o *APIKey) GetLastUsedAt() int64` +`func (o *OrganizationAPIKey) GetLastUsedAt() int64` GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. ### GetLastUsedAtOk -`func (o *APIKey) GetLastUsedAtOk() (*int64, bool)` +`func (o *OrganizationAPIKey) GetLastUsedAtOk() (*int64, bool)` GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastUsedAt -`func (o *APIKey) SetLastUsedAt(v int64)` +`func (o *OrganizationAPIKey) SetLastUsedAt(v int64)` SetLastUsedAt sets LastUsedAt field to given value. ### HasLastUsedAt -`func (o *APIKey) HasLastUsedAt() bool` +`func (o *OrganizationAPIKey) HasLastUsedAt() bool` HasLastUsedAt returns a boolean if a field has been set. ### GetLastUsedIp -`func (o *APIKey) GetLastUsedIp() string` +`func (o *OrganizationAPIKey) GetLastUsedIp() string` GetLastUsedIp returns the LastUsedIp field if non-nil, zero value otherwise. ### GetLastUsedIpOk -`func (o *APIKey) GetLastUsedIpOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetLastUsedIpOk() (*string, bool)` GetLastUsedIpOk returns a tuple with the LastUsedIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastUsedIp -`func (o *APIKey) SetLastUsedIp(v string)` +`func (o *OrganizationAPIKey) SetLastUsedIp(v string)` SetLastUsedIp sets LastUsedIp field to given value. ### HasLastUsedIp -`func (o *APIKey) HasLastUsedIp() bool` +`func (o *OrganizationAPIKey) HasLastUsedIp() bool` HasLastUsedIp returns a boolean if a field has been set. ### GetLastUsedUa -`func (o *APIKey) GetLastUsedUa() string` +`func (o *OrganizationAPIKey) GetLastUsedUa() string` GetLastUsedUa returns the LastUsedUa field if non-nil, zero value otherwise. ### GetLastUsedUaOk -`func (o *APIKey) GetLastUsedUaOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetLastUsedUaOk() (*string, bool)` GetLastUsedUaOk returns a tuple with the LastUsedUa field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastUsedUa -`func (o *APIKey) SetLastUsedUa(v string)` +`func (o *OrganizationAPIKey) SetLastUsedUa(v string)` SetLastUsedUa sets LastUsedUa field to given value. ### HasLastUsedUa -`func (o *APIKey) HasLastUsedUa() bool` +`func (o *OrganizationAPIKey) HasLastUsedUa() bool` HasLastUsedUa returns a boolean if a field has been set. ### GetCounter -`func (o *APIKey) GetCounter() int64` +`func (o *OrganizationAPIKey) GetCounter() int64` GetCounter returns the Counter field if non-nil, zero value otherwise. ### GetCounterOk -`func (o *APIKey) GetCounterOk() (*int64, bool)` +`func (o *OrganizationAPIKey) GetCounterOk() (*int64, bool)` GetCounterOk returns a tuple with the Counter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCounter -`func (o *APIKey) SetCounter(v int64)` +`func (o *OrganizationAPIKey) SetCounter(v int64)` SetCounter sets Counter field to given value. ### HasCounter -`func (o *APIKey) HasCounter() bool` +`func (o *OrganizationAPIKey) HasCounter() bool` HasCounter returns a boolean if a field has been set. ### GetUsageToday -`func (o *APIKey) GetUsageToday() int64` +`func (o *OrganizationAPIKey) GetUsageToday() int64` GetUsageToday returns the UsageToday field if non-nil, zero value otherwise. ### GetUsageTodayOk -`func (o *APIKey) GetUsageTodayOk() (*int64, bool)` +`func (o *OrganizationAPIKey) GetUsageTodayOk() (*int64, bool)` GetUsageTodayOk returns a tuple with the UsageToday field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUsageToday -`func (o *APIKey) SetUsageToday(v int64)` +`func (o *OrganizationAPIKey) SetUsageToday(v int64)` SetUsageToday sets UsageToday field to given value. ### HasUsageToday -`func (o *APIKey) HasUsageToday() bool` +`func (o *OrganizationAPIKey) HasUsageToday() bool` HasUsageToday returns a boolean if a field has been set. ### GetUsageLimit -`func (o *APIKey) GetUsageLimit() int64` +`func (o *OrganizationAPIKey) GetUsageLimit() int64` GetUsageLimit returns the UsageLimit field if non-nil, zero value otherwise. ### GetUsageLimitOk -`func (o *APIKey) GetUsageLimitOk() (*int64, bool)` +`func (o *OrganizationAPIKey) GetUsageLimitOk() (*int64, bool)` GetUsageLimitOk returns a tuple with the UsageLimit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUsageLimit -`func (o *APIKey) SetUsageLimit(v int64)` +`func (o *OrganizationAPIKey) SetUsageLimit(v int64)` SetUsageLimit sets UsageLimit field to given value. ### HasUsageLimit -`func (o *APIKey) HasUsageLimit() bool` +`func (o *OrganizationAPIKey) HasUsageLimit() bool` HasUsageLimit returns a boolean if a field has been set. ### GetToken -`func (o *APIKey) GetToken() string` +`func (o *OrganizationAPIKey) GetToken() string` GetToken returns the Token field if non-nil, zero value otherwise. ### GetTokenOk -`func (o *APIKey) GetTokenOk() (*string, bool)` +`func (o *OrganizationAPIKey) GetTokenOk() (*string, bool)` GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetToken -`func (o *APIKey) SetToken(v string)` +`func (o *OrganizationAPIKey) SetToken(v string)` SetToken sets Token field to given value. ### HasToken -`func (o *APIKey) HasToken() bool` +`func (o *OrganizationAPIKey) HasToken() bool` HasToken returns a boolean if a field has been set. ### GetInactive -`func (o *APIKey) GetInactive() bool` +`func (o *OrganizationAPIKey) GetInactive() bool` GetInactive returns the Inactive field if non-nil, zero value otherwise. ### GetInactiveOk -`func (o *APIKey) GetInactiveOk() (*bool, bool)` +`func (o *OrganizationAPIKey) GetInactiveOk() (*bool, bool)` GetInactiveOk returns a tuple with the Inactive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetInactive -`func (o *APIKey) SetInactive(v bool)` +`func (o *OrganizationAPIKey) SetInactive(v bool)` SetInactive sets Inactive field to given value. ### HasInactive -`func (o *APIKey) HasInactive() bool` +`func (o *OrganizationAPIKey) HasInactive() bool` HasInactive returns a boolean if a field has been set. +### GetType + +`func (o *OrganizationAPIKey) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OrganizationAPIKey) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OrganizationAPIKey) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *OrganizationAPIKey) HasType() bool` + +HasType returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/PaloAltoFirewallCredentialFields.md b/go/docs/PaloAltoFirewallCredentialFields.md new file mode 100644 index 0000000..b049c72 --- /dev/null +++ b/go/docs/PaloAltoFirewallCredentialFields.md @@ -0,0 +1,51 @@ +# PaloAltoFirewallCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | | + +## Methods + +### NewPaloAltoFirewallCredentialFields + +`func NewPaloAltoFirewallCredentialFields(apiKey string, ) *PaloAltoFirewallCredentialFields` + +NewPaloAltoFirewallCredentialFields instantiates a new PaloAltoFirewallCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaloAltoFirewallCredentialFieldsWithDefaults + +`func NewPaloAltoFirewallCredentialFieldsWithDefaults() *PaloAltoFirewallCredentialFields` + +NewPaloAltoFirewallCredentialFieldsWithDefaults instantiates a new PaloAltoFirewallCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiKey + +`func (o *PaloAltoFirewallCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *PaloAltoFirewallCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *PaloAltoFirewallCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Problem.md b/go/docs/Problem.md new file mode 100644 index 0000000..3ef1a4d --- /dev/null +++ b/go/docs/Problem.md @@ -0,0 +1,108 @@ +# Problem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. | [optional] +**Status** | Pointer to **int32** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**Detail** | Pointer to **string** | A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. | [optional] + +## Methods + +### NewProblem + +`func NewProblem() *Problem` + +NewProblem instantiates a new Problem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewProblemWithDefaults + +`func NewProblemWithDefaults() *Problem` + +NewProblemWithDefaults instantiates a new Problem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *Problem) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Problem) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *Problem) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *Problem) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetStatus + +`func (o *Problem) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Problem) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Problem) SetStatus(v int32)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Problem) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDetail + +`func (o *Problem) GetDetail() string` + +GetDetail returns the Detail field if non-nil, zero value otherwise. + +### GetDetailOk + +`func (o *Problem) GetDetailOk() (*string, bool)` + +GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetail + +`func (o *Problem) SetDetail(v string)` + +SetDetail sets Detail field to given value. + +### HasDetail + +`func (o *Problem) HasDetail() bool` + +HasDetail returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/PublicAPI.md b/go/docs/PublicAPI.md index 9ec2cac..9a90fad 100644 --- a/go/docs/PublicAPI.md +++ b/go/docs/PublicAPI.md @@ -1,20 +1,80 @@ -# \PublicApi +# \PublicAPI All URIs are relative to *https://console.runzero.com/api/v1.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetLatestAgentVersion**](PublicApi.md#GetLatestAgentVersion) | **Get** /releases/agent/version | Returns latest agent version. -[**GetLatestPlatformVersion**](PublicApi.md#GetLatestPlatformVersion) | **Get** /releases/platform/version | Returns latest platform version. -[**GetLatestScannerVersion**](PublicApi.md#GetLatestScannerVersion) | **Get** /releases/scanner/version | Returns latest scanner version. +[**GetHealthCheck**](PublicAPI.md#GetHealthCheck) | **Get** /health | Returns a health check status (cloud and self-hosted) +[**GetLatestAgentVersion**](PublicAPI.md#GetLatestAgentVersion) | **Get** /releases/agent/version | Returns latest agent version +[**GetLatestPlatformVersion**](PublicAPI.md#GetLatestPlatformVersion) | **Get** /releases/platform/version | Returns latest platform version +[**GetLatestScannerVersion**](PublicAPI.md#GetLatestScannerVersion) | **Get** /releases/scanner/version | Returns latest scanner version +## GetHealthCheck + +> HealthCheckResponse GetHealthCheck(ctx).Execute() + +Returns a health check status (cloud and self-hosted) + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetHealthCheck(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetHealthCheck``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHealthCheck`: HealthCheckResponse + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetHealthCheck`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHealthCheckRequest struct via the builder pattern + + +### Return type + +[**HealthCheckResponse**](HealthCheckResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetLatestAgentVersion > ComponentVersion GetLatestAgentVersion(ctx).Execute() -Returns latest agent version. +Returns latest agent version ### Example @@ -22,23 +82,23 @@ Returns latest agent version. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PublicApi.GetLatestAgentVersion(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.GetLatestAgentVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLatestAgentVersion`: ComponentVersion - fmt.Fprintf(os.Stdout, "Response from `PublicApi.GetLatestAgentVersion`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetLatestAgentVersion(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetLatestAgentVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLatestAgentVersion`: ComponentVersion + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetLatestAgentVersion`: %v\n", resp) } ``` @@ -73,7 +133,7 @@ No authorization required > ComponentVersion GetLatestPlatformVersion(ctx).Execute() -Returns latest platform version. +Returns latest platform version ### Example @@ -81,23 +141,23 @@ Returns latest platform version. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PublicApi.GetLatestPlatformVersion(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.GetLatestPlatformVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLatestPlatformVersion`: ComponentVersion - fmt.Fprintf(os.Stdout, "Response from `PublicApi.GetLatestPlatformVersion`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetLatestPlatformVersion(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetLatestPlatformVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLatestPlatformVersion`: ComponentVersion + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetLatestPlatformVersion`: %v\n", resp) } ``` @@ -132,7 +192,7 @@ No authorization required > ComponentVersion GetLatestScannerVersion(ctx).Execute() -Returns latest scanner version. +Returns latest scanner version ### Example @@ -140,23 +200,23 @@ Returns latest scanner version. package main import ( - "context" - "fmt" - "os" - openapiclient "./openapi" + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - configuration := openapiclient.NewConfiguration() - api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PublicApi.GetLatestScannerVersion(context.Background(), ).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.GetLatestScannerVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLatestScannerVersion`: ComponentVersion - fmt.Fprintf(os.Stdout, "Response from `PublicApi.GetLatestScannerVersion`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetLatestScannerVersion(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetLatestScannerVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLatestScannerVersion`: ComponentVersion + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetLatestScannerVersion`: %v\n", resp) } ``` diff --git a/go/docs/QualysCredentialFields.md b/go/docs/QualysCredentialFields.md new file mode 100644 index 0000000..d3c31e5 --- /dev/null +++ b/go/docs/QualysCredentialFields.md @@ -0,0 +1,93 @@ +# QualysCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**Username** | **string** | | +**Password** | **string** | | + +## Methods + +### NewQualysCredentialFields + +`func NewQualysCredentialFields(apiUrl string, username string, password string, ) *QualysCredentialFields` + +NewQualysCredentialFields instantiates a new QualysCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQualysCredentialFieldsWithDefaults + +`func NewQualysCredentialFieldsWithDefaults() *QualysCredentialFields` + +NewQualysCredentialFieldsWithDefaults instantiates a new QualysCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *QualysCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *QualysCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *QualysCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetUsername + +`func (o *QualysCredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *QualysCredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *QualysCredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *QualysCredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *QualysCredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *QualysCredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SNMPv2CommunitiesCredentialFields.md b/go/docs/SNMPv2CommunitiesCredentialFields.md new file mode 100644 index 0000000..7c6c8dc --- /dev/null +++ b/go/docs/SNMPv2CommunitiesCredentialFields.md @@ -0,0 +1,51 @@ +# SNMPv2CommunitiesCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Community** | **string** | | + +## Methods + +### NewSNMPv2CommunitiesCredentialFields + +`func NewSNMPv2CommunitiesCredentialFields(community string, ) *SNMPv2CommunitiesCredentialFields` + +NewSNMPv2CommunitiesCredentialFields instantiates a new SNMPv2CommunitiesCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSNMPv2CommunitiesCredentialFieldsWithDefaults + +`func NewSNMPv2CommunitiesCredentialFieldsWithDefaults() *SNMPv2CommunitiesCredentialFields` + +NewSNMPv2CommunitiesCredentialFieldsWithDefaults instantiates a new SNMPv2CommunitiesCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCommunity + +`func (o *SNMPv2CommunitiesCredentialFields) GetCommunity() string` + +GetCommunity returns the Community field if non-nil, zero value otherwise. + +### GetCommunityOk + +`func (o *SNMPv2CommunitiesCredentialFields) GetCommunityOk() (*string, bool)` + +GetCommunityOk returns a tuple with the Community field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommunity + +`func (o *SNMPv2CommunitiesCredentialFields) SetCommunity(v string)` + +SetCommunity sets Community field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SNMPv3CredentialFields.md b/go/docs/SNMPv3CredentialFields.md new file mode 100644 index 0000000..56e129a --- /dev/null +++ b/go/docs/SNMPv3CredentialFields.md @@ -0,0 +1,181 @@ +# SNMPv3CredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Context** | Pointer to **string** | | [optional] +**AuthProtocol** | Pointer to **string** | | [optional] +**AuthPassphrase** | Pointer to **string** | | [optional] +**PrivacyProtocol** | Pointer to **string** | | [optional] +**PrivacyPassphrase** | Pointer to **string** | | [optional] + +## Methods + +### NewSNMPv3CredentialFields + +`func NewSNMPv3CredentialFields(username string, ) *SNMPv3CredentialFields` + +NewSNMPv3CredentialFields instantiates a new SNMPv3CredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSNMPv3CredentialFieldsWithDefaults + +`func NewSNMPv3CredentialFieldsWithDefaults() *SNMPv3CredentialFields` + +NewSNMPv3CredentialFieldsWithDefaults instantiates a new SNMPv3CredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsername + +`func (o *SNMPv3CredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *SNMPv3CredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *SNMPv3CredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetContext + +`func (o *SNMPv3CredentialFields) GetContext() string` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *SNMPv3CredentialFields) GetContextOk() (*string, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *SNMPv3CredentialFields) SetContext(v string)` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *SNMPv3CredentialFields) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetAuthProtocol + +`func (o *SNMPv3CredentialFields) GetAuthProtocol() string` + +GetAuthProtocol returns the AuthProtocol field if non-nil, zero value otherwise. + +### GetAuthProtocolOk + +`func (o *SNMPv3CredentialFields) GetAuthProtocolOk() (*string, bool)` + +GetAuthProtocolOk returns a tuple with the AuthProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthProtocol + +`func (o *SNMPv3CredentialFields) SetAuthProtocol(v string)` + +SetAuthProtocol sets AuthProtocol field to given value. + +### HasAuthProtocol + +`func (o *SNMPv3CredentialFields) HasAuthProtocol() bool` + +HasAuthProtocol returns a boolean if a field has been set. + +### GetAuthPassphrase + +`func (o *SNMPv3CredentialFields) GetAuthPassphrase() string` + +GetAuthPassphrase returns the AuthPassphrase field if non-nil, zero value otherwise. + +### GetAuthPassphraseOk + +`func (o *SNMPv3CredentialFields) GetAuthPassphraseOk() (*string, bool)` + +GetAuthPassphraseOk returns a tuple with the AuthPassphrase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthPassphrase + +`func (o *SNMPv3CredentialFields) SetAuthPassphrase(v string)` + +SetAuthPassphrase sets AuthPassphrase field to given value. + +### HasAuthPassphrase + +`func (o *SNMPv3CredentialFields) HasAuthPassphrase() bool` + +HasAuthPassphrase returns a boolean if a field has been set. + +### GetPrivacyProtocol + +`func (o *SNMPv3CredentialFields) GetPrivacyProtocol() string` + +GetPrivacyProtocol returns the PrivacyProtocol field if non-nil, zero value otherwise. + +### GetPrivacyProtocolOk + +`func (o *SNMPv3CredentialFields) GetPrivacyProtocolOk() (*string, bool)` + +GetPrivacyProtocolOk returns a tuple with the PrivacyProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivacyProtocol + +`func (o *SNMPv3CredentialFields) SetPrivacyProtocol(v string)` + +SetPrivacyProtocol sets PrivacyProtocol field to given value. + +### HasPrivacyProtocol + +`func (o *SNMPv3CredentialFields) HasPrivacyProtocol() bool` + +HasPrivacyProtocol returns a boolean if a field has been set. + +### GetPrivacyPassphrase + +`func (o *SNMPv3CredentialFields) GetPrivacyPassphrase() string` + +GetPrivacyPassphrase returns the PrivacyPassphrase field if non-nil, zero value otherwise. + +### GetPrivacyPassphraseOk + +`func (o *SNMPv3CredentialFields) GetPrivacyPassphraseOk() (*string, bool)` + +GetPrivacyPassphraseOk returns a tuple with the PrivacyPassphrase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivacyPassphrase + +`func (o *SNMPv3CredentialFields) SetPrivacyPassphrase(v string)` + +SetPrivacyPassphrase sets PrivacyPassphrase field to given value. + +### HasPrivacyPassphrase + +`func (o *SNMPv3CredentialFields) HasPrivacyPassphrase() bool` + +HasPrivacyPassphrase returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SampleOptions.md b/go/docs/SampleOptions.md new file mode 100644 index 0000000..44f3860 --- /dev/null +++ b/go/docs/SampleOptions.md @@ -0,0 +1,181 @@ +# SampleOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Explorer** | Pointer to **string** | | [optional] +**Agent** | Pointer to **string** | | [optional] +**Targets** | Pointer to **string** | | [optional] +**Excludes** | Pointer to **string** | | [optional] +**Tags** | Pointer to **string** | | [optional] +**Interfaces** | **string** | | + +## Methods + +### NewSampleOptions + +`func NewSampleOptions(interfaces string, ) *SampleOptions` + +NewSampleOptions instantiates a new SampleOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSampleOptionsWithDefaults + +`func NewSampleOptionsWithDefaults() *SampleOptions` + +NewSampleOptionsWithDefaults instantiates a new SampleOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExplorer + +`func (o *SampleOptions) GetExplorer() string` + +GetExplorer returns the Explorer field if non-nil, zero value otherwise. + +### GetExplorerOk + +`func (o *SampleOptions) GetExplorerOk() (*string, bool)` + +GetExplorerOk returns a tuple with the Explorer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExplorer + +`func (o *SampleOptions) SetExplorer(v string)` + +SetExplorer sets Explorer field to given value. + +### HasExplorer + +`func (o *SampleOptions) HasExplorer() bool` + +HasExplorer returns a boolean if a field has been set. + +### GetAgent + +`func (o *SampleOptions) GetAgent() string` + +GetAgent returns the Agent field if non-nil, zero value otherwise. + +### GetAgentOk + +`func (o *SampleOptions) GetAgentOk() (*string, bool)` + +GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgent + +`func (o *SampleOptions) SetAgent(v string)` + +SetAgent sets Agent field to given value. + +### HasAgent + +`func (o *SampleOptions) HasAgent() bool` + +HasAgent returns a boolean if a field has been set. + +### GetTargets + +`func (o *SampleOptions) GetTargets() string` + +GetTargets returns the Targets field if non-nil, zero value otherwise. + +### GetTargetsOk + +`func (o *SampleOptions) GetTargetsOk() (*string, bool)` + +GetTargetsOk returns a tuple with the Targets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargets + +`func (o *SampleOptions) SetTargets(v string)` + +SetTargets sets Targets field to given value. + +### HasTargets + +`func (o *SampleOptions) HasTargets() bool` + +HasTargets returns a boolean if a field has been set. + +### GetExcludes + +`func (o *SampleOptions) GetExcludes() string` + +GetExcludes returns the Excludes field if non-nil, zero value otherwise. + +### GetExcludesOk + +`func (o *SampleOptions) GetExcludesOk() (*string, bool)` + +GetExcludesOk returns a tuple with the Excludes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludes + +`func (o *SampleOptions) SetExcludes(v string)` + +SetExcludes sets Excludes field to given value. + +### HasExcludes + +`func (o *SampleOptions) HasExcludes() bool` + +HasExcludes returns a boolean if a field has been set. + +### GetTags + +`func (o *SampleOptions) GetTags() string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SampleOptions) GetTagsOk() (*string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SampleOptions) SetTags(v string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *SampleOptions) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetInterfaces + +`func (o *SampleOptions) GetInterfaces() string` + +GetInterfaces returns the Interfaces field if non-nil, zero value otherwise. + +### GetInterfacesOk + +`func (o *SampleOptions) GetInterfacesOk() (*string, bool)` + +GetInterfacesOk returns a tuple with the Interfaces field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInterfaces + +`func (o *SampleOptions) SetInterfaces(v string)` + +SetInterfaces sets Interfaces field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ScanOptions.md b/go/docs/ScanOptions.md index 8be9876..0ce9be4 100644 --- a/go/docs/ScanOptions.md +++ b/go/docs/ScanOptions.md @@ -4,21 +4,38 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Targets** | Pointer to **string** | | +**Targets** | **string** | | **Excludes** | Pointer to **string** | | [optional] **ScanName** | Pointer to **string** | | [optional] -**ScanDescription** | Pointer to **string** | | [optional] -**ScanFrequency** | Pointer to **string** | | [optional] -**ScanStart** | Pointer to **int32** | | [optional] +**ScanDescription** | Pointer to **string** | A description of the scan. | [optional] +**ScanTemplate** | Pointer to **string** | | [optional] +**ScanFrequency** | Pointer to **string** | A string time duration value representing execution frequency, if scheduled to repeat. | [optional] +**ScanStart** | Pointer to **string** | Unix timestamp value indicating when the template was created. | [optional] +**ScanTags** | Pointer to **string** | | [optional] +**ScanGracePeriod** | Pointer to **string** | | [optional] **Agent** | Pointer to **string** | | [optional] -**Rate** | Pointer to **int32** | | [optional] -**MaxHostRate** | Pointer to **int32** | | [optional] -**Passes** | Pointer to **int32** | | [optional] -**MaxSockets** | Pointer to **int32** | | [optional] -**MaxGroupSize** | Pointer to **int32** | | [optional] +**Explorer** | Pointer to **string** | | [optional] +**ExplorerGroupId** | Pointer to **string** | | [optional] +**HostedZoneId** | Pointer to **string** | The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) or UUID (\"e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8\") of a hosted zone. | [optional] +**HostedZoneName** | Pointer to **string** | The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) of the hosted zone. | [optional] +**Rate** | Pointer to **string** | | [optional] +**MaxHostRate** | Pointer to **string** | | [optional] +**Passes** | Pointer to **string** | | [optional] +**MaxAttempts** | Pointer to **string** | | [optional] +**MaxSockets** | Pointer to **string** | | [optional] +**MaxGroupSize** | Pointer to **string** | | [optional] +**MaxTtl** | Pointer to **string** | | [optional] +**Tos** | Pointer to **string** | | [optional] **TcpPorts** | Pointer to **string** | | [optional] -**Screenshots** | Pointer to **bool** | | [optional] +**TcpExcludes** | Pointer to **string** | | [optional] +**Screenshots** | Pointer to **string** | | [optional] **Nameservers** | Pointer to **string** | | [optional] +**SubnetPing** | Pointer to **string** | | [optional] +**SubnetPingNetSize** | Pointer to **string** | | [optional] +**SubnetPingProbes** | Pointer to **string** | Optional subnet ping probe list as comma separated strings. The example shows possibilities. | [optional] +**SubnetPingSampleRate** | Pointer to **string** | | [optional] +**HostPing** | Pointer to **string** | | [optional] +**HostPingProbes** | Pointer to **string** | Optional host ping probe list as comma separated strings. The example shows possibilities. | [optional] **Probes** | Pointer to **string** | Optional probe list, otherwise all probes are used | [optional] ## Methods @@ -135,6 +152,31 @@ SetScanDescription sets ScanDescription field to given value. HasScanDescription returns a boolean if a field has been set. +### GetScanTemplate + +`func (o *ScanOptions) GetScanTemplate() string` + +GetScanTemplate returns the ScanTemplate field if non-nil, zero value otherwise. + +### GetScanTemplateOk + +`func (o *ScanOptions) GetScanTemplateOk() (*string, bool)` + +GetScanTemplateOk returns a tuple with the ScanTemplate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScanTemplate + +`func (o *ScanOptions) SetScanTemplate(v string)` + +SetScanTemplate sets ScanTemplate field to given value. + +### HasScanTemplate + +`func (o *ScanOptions) HasScanTemplate() bool` + +HasScanTemplate returns a boolean if a field has been set. + ### GetScanFrequency `func (o *ScanOptions) GetScanFrequency() string` @@ -162,20 +204,20 @@ HasScanFrequency returns a boolean if a field has been set. ### GetScanStart -`func (o *ScanOptions) GetScanStart() int32` +`func (o *ScanOptions) GetScanStart() string` GetScanStart returns the ScanStart field if non-nil, zero value otherwise. ### GetScanStartOk -`func (o *ScanOptions) GetScanStartOk() (*int32, bool)` +`func (o *ScanOptions) GetScanStartOk() (*string, bool)` GetScanStartOk returns a tuple with the ScanStart field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScanStart -`func (o *ScanOptions) SetScanStart(v int32)` +`func (o *ScanOptions) SetScanStart(v string)` SetScanStart sets ScanStart field to given value. @@ -185,6 +227,56 @@ SetScanStart sets ScanStart field to given value. HasScanStart returns a boolean if a field has been set. +### GetScanTags + +`func (o *ScanOptions) GetScanTags() string` + +GetScanTags returns the ScanTags field if non-nil, zero value otherwise. + +### GetScanTagsOk + +`func (o *ScanOptions) GetScanTagsOk() (*string, bool)` + +GetScanTagsOk returns a tuple with the ScanTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScanTags + +`func (o *ScanOptions) SetScanTags(v string)` + +SetScanTags sets ScanTags field to given value. + +### HasScanTags + +`func (o *ScanOptions) HasScanTags() bool` + +HasScanTags returns a boolean if a field has been set. + +### GetScanGracePeriod + +`func (o *ScanOptions) GetScanGracePeriod() string` + +GetScanGracePeriod returns the ScanGracePeriod field if non-nil, zero value otherwise. + +### GetScanGracePeriodOk + +`func (o *ScanOptions) GetScanGracePeriodOk() (*string, bool)` + +GetScanGracePeriodOk returns a tuple with the ScanGracePeriod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScanGracePeriod + +`func (o *ScanOptions) SetScanGracePeriod(v string)` + +SetScanGracePeriod sets ScanGracePeriod field to given value. + +### HasScanGracePeriod + +`func (o *ScanOptions) HasScanGracePeriod() bool` + +HasScanGracePeriod returns a boolean if a field has been set. + ### GetAgent `func (o *ScanOptions) GetAgent() string` @@ -210,22 +302,122 @@ SetAgent sets Agent field to given value. HasAgent returns a boolean if a field has been set. +### GetExplorer + +`func (o *ScanOptions) GetExplorer() string` + +GetExplorer returns the Explorer field if non-nil, zero value otherwise. + +### GetExplorerOk + +`func (o *ScanOptions) GetExplorerOk() (*string, bool)` + +GetExplorerOk returns a tuple with the Explorer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExplorer + +`func (o *ScanOptions) SetExplorer(v string)` + +SetExplorer sets Explorer field to given value. + +### HasExplorer + +`func (o *ScanOptions) HasExplorer() bool` + +HasExplorer returns a boolean if a field has been set. + +### GetExplorerGroupId + +`func (o *ScanOptions) GetExplorerGroupId() string` + +GetExplorerGroupId returns the ExplorerGroupId field if non-nil, zero value otherwise. + +### GetExplorerGroupIdOk + +`func (o *ScanOptions) GetExplorerGroupIdOk() (*string, bool)` + +GetExplorerGroupIdOk returns a tuple with the ExplorerGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExplorerGroupId + +`func (o *ScanOptions) SetExplorerGroupId(v string)` + +SetExplorerGroupId sets ExplorerGroupId field to given value. + +### HasExplorerGroupId + +`func (o *ScanOptions) HasExplorerGroupId() bool` + +HasExplorerGroupId returns a boolean if a field has been set. + +### GetHostedZoneId + +`func (o *ScanOptions) GetHostedZoneId() string` + +GetHostedZoneId returns the HostedZoneId field if non-nil, zero value otherwise. + +### GetHostedZoneIdOk + +`func (o *ScanOptions) GetHostedZoneIdOk() (*string, bool)` + +GetHostedZoneIdOk returns a tuple with the HostedZoneId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneId + +`func (o *ScanOptions) SetHostedZoneId(v string)` + +SetHostedZoneId sets HostedZoneId field to given value. + +### HasHostedZoneId + +`func (o *ScanOptions) HasHostedZoneId() bool` + +HasHostedZoneId returns a boolean if a field has been set. + +### GetHostedZoneName + +`func (o *ScanOptions) GetHostedZoneName() string` + +GetHostedZoneName returns the HostedZoneName field if non-nil, zero value otherwise. + +### GetHostedZoneNameOk + +`func (o *ScanOptions) GetHostedZoneNameOk() (*string, bool)` + +GetHostedZoneNameOk returns a tuple with the HostedZoneName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneName + +`func (o *ScanOptions) SetHostedZoneName(v string)` + +SetHostedZoneName sets HostedZoneName field to given value. + +### HasHostedZoneName + +`func (o *ScanOptions) HasHostedZoneName() bool` + +HasHostedZoneName returns a boolean if a field has been set. + ### GetRate -`func (o *ScanOptions) GetRate() int32` +`func (o *ScanOptions) GetRate() string` GetRate returns the Rate field if non-nil, zero value otherwise. ### GetRateOk -`func (o *ScanOptions) GetRateOk() (*int32, bool)` +`func (o *ScanOptions) GetRateOk() (*string, bool)` GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRate -`func (o *ScanOptions) SetRate(v int32)` +`func (o *ScanOptions) SetRate(v string)` SetRate sets Rate field to given value. @@ -237,20 +429,20 @@ HasRate returns a boolean if a field has been set. ### GetMaxHostRate -`func (o *ScanOptions) GetMaxHostRate() int32` +`func (o *ScanOptions) GetMaxHostRate() string` GetMaxHostRate returns the MaxHostRate field if non-nil, zero value otherwise. ### GetMaxHostRateOk -`func (o *ScanOptions) GetMaxHostRateOk() (*int32, bool)` +`func (o *ScanOptions) GetMaxHostRateOk() (*string, bool)` GetMaxHostRateOk returns a tuple with the MaxHostRate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxHostRate -`func (o *ScanOptions) SetMaxHostRate(v int32)` +`func (o *ScanOptions) SetMaxHostRate(v string)` SetMaxHostRate sets MaxHostRate field to given value. @@ -262,20 +454,20 @@ HasMaxHostRate returns a boolean if a field has been set. ### GetPasses -`func (o *ScanOptions) GetPasses() int32` +`func (o *ScanOptions) GetPasses() string` GetPasses returns the Passes field if non-nil, zero value otherwise. ### GetPassesOk -`func (o *ScanOptions) GetPassesOk() (*int32, bool)` +`func (o *ScanOptions) GetPassesOk() (*string, bool)` GetPassesOk returns a tuple with the Passes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPasses -`func (o *ScanOptions) SetPasses(v int32)` +`func (o *ScanOptions) SetPasses(v string)` SetPasses sets Passes field to given value. @@ -285,22 +477,47 @@ SetPasses sets Passes field to given value. HasPasses returns a boolean if a field has been set. +### GetMaxAttempts + +`func (o *ScanOptions) GetMaxAttempts() string` + +GetMaxAttempts returns the MaxAttempts field if non-nil, zero value otherwise. + +### GetMaxAttemptsOk + +`func (o *ScanOptions) GetMaxAttemptsOk() (*string, bool)` + +GetMaxAttemptsOk returns a tuple with the MaxAttempts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAttempts + +`func (o *ScanOptions) SetMaxAttempts(v string)` + +SetMaxAttempts sets MaxAttempts field to given value. + +### HasMaxAttempts + +`func (o *ScanOptions) HasMaxAttempts() bool` + +HasMaxAttempts returns a boolean if a field has been set. + ### GetMaxSockets -`func (o *ScanOptions) GetMaxSockets() int32` +`func (o *ScanOptions) GetMaxSockets() string` GetMaxSockets returns the MaxSockets field if non-nil, zero value otherwise. ### GetMaxSocketsOk -`func (o *ScanOptions) GetMaxSocketsOk() (*int32, bool)` +`func (o *ScanOptions) GetMaxSocketsOk() (*string, bool)` GetMaxSocketsOk returns a tuple with the MaxSockets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxSockets -`func (o *ScanOptions) SetMaxSockets(v int32)` +`func (o *ScanOptions) SetMaxSockets(v string)` SetMaxSockets sets MaxSockets field to given value. @@ -312,20 +529,20 @@ HasMaxSockets returns a boolean if a field has been set. ### GetMaxGroupSize -`func (o *ScanOptions) GetMaxGroupSize() int32` +`func (o *ScanOptions) GetMaxGroupSize() string` GetMaxGroupSize returns the MaxGroupSize field if non-nil, zero value otherwise. ### GetMaxGroupSizeOk -`func (o *ScanOptions) GetMaxGroupSizeOk() (*int32, bool)` +`func (o *ScanOptions) GetMaxGroupSizeOk() (*string, bool)` GetMaxGroupSizeOk returns a tuple with the MaxGroupSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxGroupSize -`func (o *ScanOptions) SetMaxGroupSize(v int32)` +`func (o *ScanOptions) SetMaxGroupSize(v string)` SetMaxGroupSize sets MaxGroupSize field to given value. @@ -335,6 +552,56 @@ SetMaxGroupSize sets MaxGroupSize field to given value. HasMaxGroupSize returns a boolean if a field has been set. +### GetMaxTtl + +`func (o *ScanOptions) GetMaxTtl() string` + +GetMaxTtl returns the MaxTtl field if non-nil, zero value otherwise. + +### GetMaxTtlOk + +`func (o *ScanOptions) GetMaxTtlOk() (*string, bool)` + +GetMaxTtlOk returns a tuple with the MaxTtl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxTtl + +`func (o *ScanOptions) SetMaxTtl(v string)` + +SetMaxTtl sets MaxTtl field to given value. + +### HasMaxTtl + +`func (o *ScanOptions) HasMaxTtl() bool` + +HasMaxTtl returns a boolean if a field has been set. + +### GetTos + +`func (o *ScanOptions) GetTos() string` + +GetTos returns the Tos field if non-nil, zero value otherwise. + +### GetTosOk + +`func (o *ScanOptions) GetTosOk() (*string, bool)` + +GetTosOk returns a tuple with the Tos field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTos + +`func (o *ScanOptions) SetTos(v string)` + +SetTos sets Tos field to given value. + +### HasTos + +`func (o *ScanOptions) HasTos() bool` + +HasTos returns a boolean if a field has been set. + ### GetTcpPorts `func (o *ScanOptions) GetTcpPorts() string` @@ -360,22 +627,47 @@ SetTcpPorts sets TcpPorts field to given value. HasTcpPorts returns a boolean if a field has been set. +### GetTcpExcludes + +`func (o *ScanOptions) GetTcpExcludes() string` + +GetTcpExcludes returns the TcpExcludes field if non-nil, zero value otherwise. + +### GetTcpExcludesOk + +`func (o *ScanOptions) GetTcpExcludesOk() (*string, bool)` + +GetTcpExcludesOk returns a tuple with the TcpExcludes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTcpExcludes + +`func (o *ScanOptions) SetTcpExcludes(v string)` + +SetTcpExcludes sets TcpExcludes field to given value. + +### HasTcpExcludes + +`func (o *ScanOptions) HasTcpExcludes() bool` + +HasTcpExcludes returns a boolean if a field has been set. + ### GetScreenshots -`func (o *ScanOptions) GetScreenshots() bool` +`func (o *ScanOptions) GetScreenshots() string` GetScreenshots returns the Screenshots field if non-nil, zero value otherwise. ### GetScreenshotsOk -`func (o *ScanOptions) GetScreenshotsOk() (*bool, bool)` +`func (o *ScanOptions) GetScreenshotsOk() (*string, bool)` GetScreenshotsOk returns a tuple with the Screenshots field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScreenshots -`func (o *ScanOptions) SetScreenshots(v bool)` +`func (o *ScanOptions) SetScreenshots(v string)` SetScreenshots sets Screenshots field to given value. @@ -410,6 +702,156 @@ SetNameservers sets Nameservers field to given value. HasNameservers returns a boolean if a field has been set. +### GetSubnetPing + +`func (o *ScanOptions) GetSubnetPing() string` + +GetSubnetPing returns the SubnetPing field if non-nil, zero value otherwise. + +### GetSubnetPingOk + +`func (o *ScanOptions) GetSubnetPingOk() (*string, bool)` + +GetSubnetPingOk returns a tuple with the SubnetPing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnetPing + +`func (o *ScanOptions) SetSubnetPing(v string)` + +SetSubnetPing sets SubnetPing field to given value. + +### HasSubnetPing + +`func (o *ScanOptions) HasSubnetPing() bool` + +HasSubnetPing returns a boolean if a field has been set. + +### GetSubnetPingNetSize + +`func (o *ScanOptions) GetSubnetPingNetSize() string` + +GetSubnetPingNetSize returns the SubnetPingNetSize field if non-nil, zero value otherwise. + +### GetSubnetPingNetSizeOk + +`func (o *ScanOptions) GetSubnetPingNetSizeOk() (*string, bool)` + +GetSubnetPingNetSizeOk returns a tuple with the SubnetPingNetSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnetPingNetSize + +`func (o *ScanOptions) SetSubnetPingNetSize(v string)` + +SetSubnetPingNetSize sets SubnetPingNetSize field to given value. + +### HasSubnetPingNetSize + +`func (o *ScanOptions) HasSubnetPingNetSize() bool` + +HasSubnetPingNetSize returns a boolean if a field has been set. + +### GetSubnetPingProbes + +`func (o *ScanOptions) GetSubnetPingProbes() string` + +GetSubnetPingProbes returns the SubnetPingProbes field if non-nil, zero value otherwise. + +### GetSubnetPingProbesOk + +`func (o *ScanOptions) GetSubnetPingProbesOk() (*string, bool)` + +GetSubnetPingProbesOk returns a tuple with the SubnetPingProbes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnetPingProbes + +`func (o *ScanOptions) SetSubnetPingProbes(v string)` + +SetSubnetPingProbes sets SubnetPingProbes field to given value. + +### HasSubnetPingProbes + +`func (o *ScanOptions) HasSubnetPingProbes() bool` + +HasSubnetPingProbes returns a boolean if a field has been set. + +### GetSubnetPingSampleRate + +`func (o *ScanOptions) GetSubnetPingSampleRate() string` + +GetSubnetPingSampleRate returns the SubnetPingSampleRate field if non-nil, zero value otherwise. + +### GetSubnetPingSampleRateOk + +`func (o *ScanOptions) GetSubnetPingSampleRateOk() (*string, bool)` + +GetSubnetPingSampleRateOk returns a tuple with the SubnetPingSampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnetPingSampleRate + +`func (o *ScanOptions) SetSubnetPingSampleRate(v string)` + +SetSubnetPingSampleRate sets SubnetPingSampleRate field to given value. + +### HasSubnetPingSampleRate + +`func (o *ScanOptions) HasSubnetPingSampleRate() bool` + +HasSubnetPingSampleRate returns a boolean if a field has been set. + +### GetHostPing + +`func (o *ScanOptions) GetHostPing() string` + +GetHostPing returns the HostPing field if non-nil, zero value otherwise. + +### GetHostPingOk + +`func (o *ScanOptions) GetHostPingOk() (*string, bool)` + +GetHostPingOk returns a tuple with the HostPing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostPing + +`func (o *ScanOptions) SetHostPing(v string)` + +SetHostPing sets HostPing field to given value. + +### HasHostPing + +`func (o *ScanOptions) HasHostPing() bool` + +HasHostPing returns a boolean if a field has been set. + +### GetHostPingProbes + +`func (o *ScanOptions) GetHostPingProbes() string` + +GetHostPingProbes returns the HostPingProbes field if non-nil, zero value otherwise. + +### GetHostPingProbesOk + +`func (o *ScanOptions) GetHostPingProbesOk() (*string, bool)` + +GetHostPingProbesOk returns a tuple with the HostPingProbes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostPingProbes + +`func (o *ScanOptions) SetHostPingProbes(v string)` + +SetHostPingProbes sets HostPingProbes field to given value. + +### HasHostPingProbes + +`func (o *ScanOptions) HasHostPingProbes() bool` + +HasHostPingProbes returns a boolean if a field has been set. + ### GetProbes `func (o *ScanOptions) GetProbes() string` diff --git a/go/docs/ScanTemplate.md b/go/docs/ScanTemplate.md new file mode 100644 index 0000000..9fd9786 --- /dev/null +++ b/go/docs/ScanTemplate.md @@ -0,0 +1,946 @@ +# ScanTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the template. | +**Name** | Pointer to **string** | The name of the template. | [optional] +**Description** | Pointer to **string** | The description of the template. | [optional] +**ClientId** | Pointer to **string** | ID of the account which owns the template. | [optional] +**OrganizationId** | **string** | ID of the organization the template is available in. | +**AgentId** | Pointer to **string** | ID of the explorer which may execute the template. | [optional] +**SiteId** | Pointer to **string** | ID of the site the template is being used in. | [optional] +**CruncherId** | Pointer to **string** | ID of the runZero cruncher the task is executing on. | [optional] +**CreatedAt** | Pointer to **int64** | Unix timestamp value indicating when the template was created. | [optional] +**CreatedBy** | Pointer to **string** | The username of the account which created the template. | [optional] +**CreatedByUserId** | Pointer to **string** | The ID of the account which created the template. | [optional] +**UpdatedAt** | Pointer to **int64** | Unix timestamp value indicating when the template was last modified. | [optional] +**Type** | Pointer to **string** | The type of task the template creates. | [optional] +**Status** | Pointer to **string** | The status of the last task using the template. | [optional] +**Error** | Pointer to **string** | The error message, if any, of the last task using the template. | [optional] +**Params** | Pointer to **map[string]string** | A number of task parameter values. Currently there is no authoritative list of in-use values. See existing templates for examples. | [optional] +**Stats** | Pointer to **map[string]interface{}** | A map of statistics about the last task executed with the template. Currently there is no authoritative list of in-use values. See existing templates for examples. | [optional] +**Hidden** | Pointer to **bool** | A flag indicating whether the item is hidden from common view. | [optional] +**ParentId** | Pointer to **string** | The ID of the parent entity of the task scheduled. | [optional] +**Recur** | Pointer to **bool** | A flag representing whether derived tasks are scheduled to repeat. | [optional] +**RecurFrequency** | Pointer to **string** | A string time duration value representing execution frequency, if scheduled to repeat. You may use values including as once, hourly, daily, weekly, monthly, continuous | [optional] +**StartTime** | Pointer to **int64** | Unix timestamp representing the next execution time. | [optional] +**RecurLast** | Pointer to **int64** | Unix timestamp representing the last execution if scheduled to repeat. | [optional] +**RecurNext** | Pointer to **int64** | Unix timestamp representing the next execution if scheduled to repeat. | [optional] +**RecurLastTaskId** | Pointer to **string** | The ID of the task that last executed if scheduled to repeat. | [optional] +**GracePeriod** | Pointer to **string** | Additional time beyond hard expiration deadline by which the task may still be allowed to execute. | [optional] +**CustomIntegrationId** | Pointer to **string** | The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. | [optional] +**SourceId** | Pointer to **string** | The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. | [optional] +**TemplateId** | Pointer to **string** | The ID of the template. | [optional] +**SizeSite** | Pointer to **int64** | The size in assets of the site the last task the template was executed against. | [optional] +**SizeData** | Pointer to **int64** | The total size of result data of the last task the template was used with. | [optional] +**SizeResults** | Pointer to **int64** | The number of results in the last task the template was used with. | [optional] +**HostedZoneId** | Pointer to **string** | The ID of the hosted zone that ran the last task the template was used with. | [optional] +**LinkedTaskCount** | Pointer to **int32** | The number of tasks derived from the template. | [optional] +**Global** | **bool** | Whether the template is globally available to all organizations. | +**Acl** | **map[string]interface{}** | A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of in-use values. See existing templates for examples. | + +## Methods + +### NewScanTemplate + +`func NewScanTemplate(id string, organizationId string, global bool, acl map[string]interface{}, ) *ScanTemplate` + +NewScanTemplate instantiates a new ScanTemplate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewScanTemplateWithDefaults + +`func NewScanTemplateWithDefaults() *ScanTemplate` + +NewScanTemplateWithDefaults instantiates a new ScanTemplate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ScanTemplate) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ScanTemplate) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ScanTemplate) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ScanTemplate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ScanTemplate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ScanTemplate) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ScanTemplate) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *ScanTemplate) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ScanTemplate) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ScanTemplate) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ScanTemplate) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetClientId + +`func (o *ScanTemplate) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *ScanTemplate) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *ScanTemplate) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *ScanTemplate) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ScanTemplate) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ScanTemplate) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ScanTemplate) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + + +### GetAgentId + +`func (o *ScanTemplate) GetAgentId() string` + +GetAgentId returns the AgentId field if non-nil, zero value otherwise. + +### GetAgentIdOk + +`func (o *ScanTemplate) GetAgentIdOk() (*string, bool)` + +GetAgentIdOk returns a tuple with the AgentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgentId + +`func (o *ScanTemplate) SetAgentId(v string)` + +SetAgentId sets AgentId field to given value. + +### HasAgentId + +`func (o *ScanTemplate) HasAgentId() bool` + +HasAgentId returns a boolean if a field has been set. + +### GetSiteId + +`func (o *ScanTemplate) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *ScanTemplate) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *ScanTemplate) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *ScanTemplate) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetCruncherId + +`func (o *ScanTemplate) GetCruncherId() string` + +GetCruncherId returns the CruncherId field if non-nil, zero value otherwise. + +### GetCruncherIdOk + +`func (o *ScanTemplate) GetCruncherIdOk() (*string, bool)` + +GetCruncherIdOk returns a tuple with the CruncherId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCruncherId + +`func (o *ScanTemplate) SetCruncherId(v string)` + +SetCruncherId sets CruncherId field to given value. + +### HasCruncherId + +`func (o *ScanTemplate) HasCruncherId() bool` + +HasCruncherId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ScanTemplate) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ScanTemplate) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ScanTemplate) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ScanTemplate) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *ScanTemplate) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *ScanTemplate) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *ScanTemplate) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *ScanTemplate) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *ScanTemplate) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *ScanTemplate) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *ScanTemplate) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *ScanTemplate) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ScanTemplate) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ScanTemplate) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ScanTemplate) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ScanTemplate) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetType + +`func (o *ScanTemplate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ScanTemplate) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ScanTemplate) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ScanTemplate) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *ScanTemplate) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ScanTemplate) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ScanTemplate) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ScanTemplate) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetError + +`func (o *ScanTemplate) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *ScanTemplate) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *ScanTemplate) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *ScanTemplate) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetParams + +`func (o *ScanTemplate) GetParams() map[string]string` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *ScanTemplate) GetParamsOk() (*map[string]string, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *ScanTemplate) SetParams(v map[string]string)` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *ScanTemplate) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetStats + +`func (o *ScanTemplate) GetStats() map[string]interface{}` + +GetStats returns the Stats field if non-nil, zero value otherwise. + +### GetStatsOk + +`func (o *ScanTemplate) GetStatsOk() (*map[string]interface{}, bool)` + +GetStatsOk returns a tuple with the Stats field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStats + +`func (o *ScanTemplate) SetStats(v map[string]interface{})` + +SetStats sets Stats field to given value. + +### HasStats + +`func (o *ScanTemplate) HasStats() bool` + +HasStats returns a boolean if a field has been set. + +### GetHidden + +`func (o *ScanTemplate) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *ScanTemplate) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *ScanTemplate) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *ScanTemplate) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + +### GetParentId + +`func (o *ScanTemplate) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *ScanTemplate) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *ScanTemplate) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *ScanTemplate) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### GetRecur + +`func (o *ScanTemplate) GetRecur() bool` + +GetRecur returns the Recur field if non-nil, zero value otherwise. + +### GetRecurOk + +`func (o *ScanTemplate) GetRecurOk() (*bool, bool)` + +GetRecurOk returns a tuple with the Recur field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecur + +`func (o *ScanTemplate) SetRecur(v bool)` + +SetRecur sets Recur field to given value. + +### HasRecur + +`func (o *ScanTemplate) HasRecur() bool` + +HasRecur returns a boolean if a field has been set. + +### GetRecurFrequency + +`func (o *ScanTemplate) GetRecurFrequency() string` + +GetRecurFrequency returns the RecurFrequency field if non-nil, zero value otherwise. + +### GetRecurFrequencyOk + +`func (o *ScanTemplate) GetRecurFrequencyOk() (*string, bool)` + +GetRecurFrequencyOk returns a tuple with the RecurFrequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurFrequency + +`func (o *ScanTemplate) SetRecurFrequency(v string)` + +SetRecurFrequency sets RecurFrequency field to given value. + +### HasRecurFrequency + +`func (o *ScanTemplate) HasRecurFrequency() bool` + +HasRecurFrequency returns a boolean if a field has been set. + +### GetStartTime + +`func (o *ScanTemplate) GetStartTime() int64` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ScanTemplate) GetStartTimeOk() (*int64, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *ScanTemplate) SetStartTime(v int64)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *ScanTemplate) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetRecurLast + +`func (o *ScanTemplate) GetRecurLast() int64` + +GetRecurLast returns the RecurLast field if non-nil, zero value otherwise. + +### GetRecurLastOk + +`func (o *ScanTemplate) GetRecurLastOk() (*int64, bool)` + +GetRecurLastOk returns a tuple with the RecurLast field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLast + +`func (o *ScanTemplate) SetRecurLast(v int64)` + +SetRecurLast sets RecurLast field to given value. + +### HasRecurLast + +`func (o *ScanTemplate) HasRecurLast() bool` + +HasRecurLast returns a boolean if a field has been set. + +### GetRecurNext + +`func (o *ScanTemplate) GetRecurNext() int64` + +GetRecurNext returns the RecurNext field if non-nil, zero value otherwise. + +### GetRecurNextOk + +`func (o *ScanTemplate) GetRecurNextOk() (*int64, bool)` + +GetRecurNextOk returns a tuple with the RecurNext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurNext + +`func (o *ScanTemplate) SetRecurNext(v int64)` + +SetRecurNext sets RecurNext field to given value. + +### HasRecurNext + +`func (o *ScanTemplate) HasRecurNext() bool` + +HasRecurNext returns a boolean if a field has been set. + +### GetRecurLastTaskId + +`func (o *ScanTemplate) GetRecurLastTaskId() string` + +GetRecurLastTaskId returns the RecurLastTaskId field if non-nil, zero value otherwise. + +### GetRecurLastTaskIdOk + +`func (o *ScanTemplate) GetRecurLastTaskIdOk() (*string, bool)` + +GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLastTaskId + +`func (o *ScanTemplate) SetRecurLastTaskId(v string)` + +SetRecurLastTaskId sets RecurLastTaskId field to given value. + +### HasRecurLastTaskId + +`func (o *ScanTemplate) HasRecurLastTaskId() bool` + +HasRecurLastTaskId returns a boolean if a field has been set. + +### GetGracePeriod + +`func (o *ScanTemplate) GetGracePeriod() string` + +GetGracePeriod returns the GracePeriod field if non-nil, zero value otherwise. + +### GetGracePeriodOk + +`func (o *ScanTemplate) GetGracePeriodOk() (*string, bool)` + +GetGracePeriodOk returns a tuple with the GracePeriod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGracePeriod + +`func (o *ScanTemplate) SetGracePeriod(v string)` + +SetGracePeriod sets GracePeriod field to given value. + +### HasGracePeriod + +`func (o *ScanTemplate) HasGracePeriod() bool` + +HasGracePeriod returns a boolean if a field has been set. + +### GetCustomIntegrationId + +`func (o *ScanTemplate) GetCustomIntegrationId() string` + +GetCustomIntegrationId returns the CustomIntegrationId field if non-nil, zero value otherwise. + +### GetCustomIntegrationIdOk + +`func (o *ScanTemplate) GetCustomIntegrationIdOk() (*string, bool)` + +GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomIntegrationId + +`func (o *ScanTemplate) SetCustomIntegrationId(v string)` + +SetCustomIntegrationId sets CustomIntegrationId field to given value. + +### HasCustomIntegrationId + +`func (o *ScanTemplate) HasCustomIntegrationId() bool` + +HasCustomIntegrationId returns a boolean if a field has been set. + +### GetSourceId + +`func (o *ScanTemplate) GetSourceId() string` + +GetSourceId returns the SourceId field if non-nil, zero value otherwise. + +### GetSourceIdOk + +`func (o *ScanTemplate) GetSourceIdOk() (*string, bool)` + +GetSourceIdOk returns a tuple with the SourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceId + +`func (o *ScanTemplate) SetSourceId(v string)` + +SetSourceId sets SourceId field to given value. + +### HasSourceId + +`func (o *ScanTemplate) HasSourceId() bool` + +HasSourceId returns a boolean if a field has been set. + +### GetTemplateId + +`func (o *ScanTemplate) GetTemplateId() string` + +GetTemplateId returns the TemplateId field if non-nil, zero value otherwise. + +### GetTemplateIdOk + +`func (o *ScanTemplate) GetTemplateIdOk() (*string, bool)` + +GetTemplateIdOk returns a tuple with the TemplateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateId + +`func (o *ScanTemplate) SetTemplateId(v string)` + +SetTemplateId sets TemplateId field to given value. + +### HasTemplateId + +`func (o *ScanTemplate) HasTemplateId() bool` + +HasTemplateId returns a boolean if a field has been set. + +### GetSizeSite + +`func (o *ScanTemplate) GetSizeSite() int64` + +GetSizeSite returns the SizeSite field if non-nil, zero value otherwise. + +### GetSizeSiteOk + +`func (o *ScanTemplate) GetSizeSiteOk() (*int64, bool)` + +GetSizeSiteOk returns a tuple with the SizeSite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSizeSite + +`func (o *ScanTemplate) SetSizeSite(v int64)` + +SetSizeSite sets SizeSite field to given value. + +### HasSizeSite + +`func (o *ScanTemplate) HasSizeSite() bool` + +HasSizeSite returns a boolean if a field has been set. + +### GetSizeData + +`func (o *ScanTemplate) GetSizeData() int64` + +GetSizeData returns the SizeData field if non-nil, zero value otherwise. + +### GetSizeDataOk + +`func (o *ScanTemplate) GetSizeDataOk() (*int64, bool)` + +GetSizeDataOk returns a tuple with the SizeData field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSizeData + +`func (o *ScanTemplate) SetSizeData(v int64)` + +SetSizeData sets SizeData field to given value. + +### HasSizeData + +`func (o *ScanTemplate) HasSizeData() bool` + +HasSizeData returns a boolean if a field has been set. + +### GetSizeResults + +`func (o *ScanTemplate) GetSizeResults() int64` + +GetSizeResults returns the SizeResults field if non-nil, zero value otherwise. + +### GetSizeResultsOk + +`func (o *ScanTemplate) GetSizeResultsOk() (*int64, bool)` + +GetSizeResultsOk returns a tuple with the SizeResults field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSizeResults + +`func (o *ScanTemplate) SetSizeResults(v int64)` + +SetSizeResults sets SizeResults field to given value. + +### HasSizeResults + +`func (o *ScanTemplate) HasSizeResults() bool` + +HasSizeResults returns a boolean if a field has been set. + +### GetHostedZoneId + +`func (o *ScanTemplate) GetHostedZoneId() string` + +GetHostedZoneId returns the HostedZoneId field if non-nil, zero value otherwise. + +### GetHostedZoneIdOk + +`func (o *ScanTemplate) GetHostedZoneIdOk() (*string, bool)` + +GetHostedZoneIdOk returns a tuple with the HostedZoneId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneId + +`func (o *ScanTemplate) SetHostedZoneId(v string)` + +SetHostedZoneId sets HostedZoneId field to given value. + +### HasHostedZoneId + +`func (o *ScanTemplate) HasHostedZoneId() bool` + +HasHostedZoneId returns a boolean if a field has been set. + +### GetLinkedTaskCount + +`func (o *ScanTemplate) GetLinkedTaskCount() int32` + +GetLinkedTaskCount returns the LinkedTaskCount field if non-nil, zero value otherwise. + +### GetLinkedTaskCountOk + +`func (o *ScanTemplate) GetLinkedTaskCountOk() (*int32, bool)` + +GetLinkedTaskCountOk returns a tuple with the LinkedTaskCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinkedTaskCount + +`func (o *ScanTemplate) SetLinkedTaskCount(v int32)` + +SetLinkedTaskCount sets LinkedTaskCount field to given value. + +### HasLinkedTaskCount + +`func (o *ScanTemplate) HasLinkedTaskCount() bool` + +HasLinkedTaskCount returns a boolean if a field has been set. + +### GetGlobal + +`func (o *ScanTemplate) GetGlobal() bool` + +GetGlobal returns the Global field if non-nil, zero value otherwise. + +### GetGlobalOk + +`func (o *ScanTemplate) GetGlobalOk() (*bool, bool)` + +GetGlobalOk returns a tuple with the Global field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGlobal + +`func (o *ScanTemplate) SetGlobal(v bool)` + +SetGlobal sets Global field to given value. + + +### GetAcl + +`func (o *ScanTemplate) GetAcl() map[string]interface{}` + +GetAcl returns the Acl field if non-nil, zero value otherwise. + +### GetAclOk + +`func (o *ScanTemplate) GetAclOk() (*map[string]interface{}, bool)` + +GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcl + +`func (o *ScanTemplate) SetAcl(v map[string]interface{})` + +SetAcl sets Acl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ScanTemplateOptions.md b/go/docs/ScanTemplateOptions.md new file mode 100644 index 0000000..ff551e0 --- /dev/null +++ b/go/docs/ScanTemplateOptions.md @@ -0,0 +1,166 @@ +# ScanTemplateOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the template. | +**Description** | Pointer to **string** | Description of the template. | [optional] +**OrganizationId** | **string** | The ID of the organization the template will be created in | +**Params** | Pointer to **map[string]string** | A number of scan parameter values. Currently there is no authoritative list of acceptable values. See existing templates for examples. | [optional] +**Global** | **bool** | Whether the template is globally available to all organizations. | +**Acl** | **map[string]interface{}** | A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of acceptable values. See existing templates for examples. | + +## Methods + +### NewScanTemplateOptions + +`func NewScanTemplateOptions(name string, organizationId string, global bool, acl map[string]interface{}, ) *ScanTemplateOptions` + +NewScanTemplateOptions instantiates a new ScanTemplateOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewScanTemplateOptionsWithDefaults + +`func NewScanTemplateOptionsWithDefaults() *ScanTemplateOptions` + +NewScanTemplateOptionsWithDefaults instantiates a new ScanTemplateOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ScanTemplateOptions) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ScanTemplateOptions) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ScanTemplateOptions) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ScanTemplateOptions) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ScanTemplateOptions) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ScanTemplateOptions) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ScanTemplateOptions) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *ScanTemplateOptions) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *ScanTemplateOptions) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *ScanTemplateOptions) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + + +### GetParams + +`func (o *ScanTemplateOptions) GetParams() map[string]string` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *ScanTemplateOptions) GetParamsOk() (*map[string]string, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *ScanTemplateOptions) SetParams(v map[string]string)` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *ScanTemplateOptions) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetGlobal + +`func (o *ScanTemplateOptions) GetGlobal() bool` + +GetGlobal returns the Global field if non-nil, zero value otherwise. + +### GetGlobalOk + +`func (o *ScanTemplateOptions) GetGlobalOk() (*bool, bool)` + +GetGlobalOk returns a tuple with the Global field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGlobal + +`func (o *ScanTemplateOptions) SetGlobal(v bool)` + +SetGlobal sets Global field to given value. + + +### GetAcl + +`func (o *ScanTemplateOptions) GetAcl() map[string]interface{}` + +GetAcl returns the Acl field if non-nil, zero value otherwise. + +### GetAclOk + +`func (o *ScanTemplateOptions) GetAclOk() (*map[string]interface{}, bool)` + +GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcl + +`func (o *ScanTemplateOptions) SetAcl(v map[string]interface{})` + +SetAcl sets Acl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/AgentSiteId.md b/go/docs/SearchQuery.md similarity index 52% rename from go/docs/AgentSiteId.md rename to go/docs/SearchQuery.md index 6ecd09c..c6a067a 100644 --- a/go/docs/AgentSiteId.md +++ b/go/docs/SearchQuery.md @@ -1,48 +1,48 @@ -# AgentSiteID +# SearchQuery ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SiteId** | Pointer to **string** | | +**Search** | **string** | | ## Methods -### NewAgentSiteID +### NewSearchQuery -`func NewAgentSiteID(siteId string, ) *AgentSiteID` +`func NewSearchQuery(search string, ) *SearchQuery` -NewAgentSiteID instantiates a new AgentSiteID object +NewSearchQuery instantiates a new SearchQuery object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewAgentSiteIDWithDefaults +### NewSearchQueryWithDefaults -`func NewAgentSiteIDWithDefaults() *AgentSiteID` +`func NewSearchQueryWithDefaults() *SearchQuery` -NewAgentSiteIDWithDefaults instantiates a new AgentSiteID object +NewSearchQueryWithDefaults instantiates a new SearchQuery object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetSiteId +### GetSearch -`func (o *AgentSiteID) GetSiteId() string` +`func (o *SearchQuery) GetSearch() string` -GetSiteId returns the SiteId field if non-nil, zero value otherwise. +GetSearch returns the Search field if non-nil, zero value otherwise. -### GetSiteIdOk +### GetSearchOk -`func (o *AgentSiteID) GetSiteIdOk() (*string, bool)` +`func (o *SearchQuery) GetSearchOk() (*string, bool)` -GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +GetSearchOk returns a tuple with the Search field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSiteId +### SetSearch -`func (o *AgentSiteID) SetSiteId(v string)` +`func (o *SearchQuery) SetSearch(v string)` -SetSiteId sets SiteId field to given value. +SetSearch sets Search field to given value. diff --git a/go/docs/SentinelOneCredentialFields.md b/go/docs/SentinelOneCredentialFields.md new file mode 100644 index 0000000..ef30ea1 --- /dev/null +++ b/go/docs/SentinelOneCredentialFields.md @@ -0,0 +1,72 @@ +# SentinelOneCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**ApiKey** | **string** | | + +## Methods + +### NewSentinelOneCredentialFields + +`func NewSentinelOneCredentialFields(apiUrl string, apiKey string, ) *SentinelOneCredentialFields` + +NewSentinelOneCredentialFields instantiates a new SentinelOneCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSentinelOneCredentialFieldsWithDefaults + +`func NewSentinelOneCredentialFieldsWithDefaults() *SentinelOneCredentialFields` + +NewSentinelOneCredentialFieldsWithDefaults instantiates a new SentinelOneCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *SentinelOneCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *SentinelOneCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *SentinelOneCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetApiKey + +`func (o *SentinelOneCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *SentinelOneCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *SentinelOneCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Service.md b/go/docs/Service.md index 738bb45..c095efd 100644 --- a/go/docs/Service.md +++ b/go/docs/Service.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ServiceId** | Pointer to **string** | | +**ServiceId** | **string** | | **ServiceAssetId** | Pointer to **string** | | [optional] **ServiceCreatedAt** | Pointer to **int64** | | [optional] **ServiceUpdatedAt** | Pointer to **int64** | | [optional] -**ServiceAddress** | Pointer to **string** | | [optional] +**ServiceAddress** | Pointer to **NullableString** | | [optional] **ServiceTransport** | Pointer to **string** | | [optional] **ServiceVhost** | Pointer to **string** | | [optional] **ServicePort** | Pointer to **string** | | [optional] @@ -17,7 +17,7 @@ Name | Type | Description | Notes **ServiceSummary** | Pointer to **string** | | [optional] **ServiceScreenshotLink** | Pointer to **string** | | [optional] **ServiceLink** | Pointer to **string** | | [optional] -**Id** | Pointer to **string** | | +**Id** | **string** | | **CreatedAt** | Pointer to **int64** | | [optional] **UpdatedAt** | Pointer to **int64** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] @@ -57,9 +57,9 @@ Name | Type | Description | Notes **SiteName** | Pointer to **string** | | [optional] **AgentName** | Pointer to **string** | | [optional] **Tags** | Pointer to **map[string]string** | | [optional] -**Services** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] -**Rtts** | Pointer to **map[string]map[string]interface{}** | | [optional] -**Credentials** | Pointer to [**map[string]map[string]bool**](map.md) | | [optional] +**Services** | Pointer to **map[string]map[string]string** | | [optional] +**Rtts** | Pointer to **map[string]interface{}** | | [optional] +**Credentials** | Pointer to **map[string]map[string]bool** | | [optional] **Attributes** | Pointer to **map[string]string** | | [optional] ## Methods @@ -201,6 +201,16 @@ SetServiceAddress sets ServiceAddress field to given value. HasServiceAddress returns a boolean if a field has been set. +### SetServiceAddressNil + +`func (o *Service) SetServiceAddressNil(b bool)` + + SetServiceAddressNil sets the value for ServiceAddress to be an explicit nil + +### UnsetServiceAddress +`func (o *Service) UnsetServiceAddress()` + +UnsetServiceAddress ensures that no value is present for ServiceAddress, not even an explicit nil ### GetServiceTransport `func (o *Service) GetServiceTransport() string` @@ -723,20 +733,20 @@ HasHw returns a boolean if a field has been set. ### GetAddresses -`func (o *Service) GetAddresses() []string` +`func (o *Service) GetAddresses() []*string` GetAddresses returns the Addresses field if non-nil, zero value otherwise. ### GetAddressesOk -`func (o *Service) GetAddressesOk() (*[]string, bool)` +`func (o *Service) GetAddressesOk() (*[]*string, bool)` GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAddresses -`func (o *Service) SetAddresses(v []string)` +`func (o *Service) SetAddresses(v []*string)` SetAddresses sets Addresses field to given value. @@ -748,20 +758,20 @@ HasAddresses returns a boolean if a field has been set. ### GetAddressesExtra -`func (o *Service) GetAddressesExtra() []string` +`func (o *Service) GetAddressesExtra() []*string` GetAddressesExtra returns the AddressesExtra field if non-nil, zero value otherwise. ### GetAddressesExtraOk -`func (o *Service) GetAddressesExtraOk() (*[]string, bool)` +`func (o *Service) GetAddressesExtraOk() (*[]*string, bool)` GetAddressesExtraOk returns a tuple with the AddressesExtra field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAddressesExtra -`func (o *Service) SetAddressesExtra(v []string)` +`func (o *Service) SetAddressesExtra(v []*string)` SetAddressesExtra sets AddressesExtra field to given value. @@ -1423,20 +1433,20 @@ HasServices returns a boolean if a field has been set. ### GetRtts -`func (o *Service) GetRtts() map[string]map[string]interface{}` +`func (o *Service) GetRtts() map[string]interface{}` GetRtts returns the Rtts field if non-nil, zero value otherwise. ### GetRttsOk -`func (o *Service) GetRttsOk() (*map[string]map[string]interface{}, bool)` +`func (o *Service) GetRttsOk() (*map[string]interface{}, bool)` GetRttsOk returns a tuple with the Rtts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRtts -`func (o *Service) SetRtts(v map[string]map[string]interface{})` +`func (o *Service) SetRtts(v map[string]interface{})` SetRtts sets Rtts field to given value. diff --git a/go/docs/ServiceExportResponse.md b/go/docs/ServiceExportResponse.md new file mode 100644 index 0000000..fdf60b5 --- /dev/null +++ b/go/docs/ServiceExportResponse.md @@ -0,0 +1,82 @@ +# ServiceExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Services** | Pointer to [**[]Service**](Service.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewServiceExportResponse + +`func NewServiceExportResponse() *ServiceExportResponse` + +NewServiceExportResponse instantiates a new ServiceExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceExportResponseWithDefaults + +`func NewServiceExportResponseWithDefaults() *ServiceExportResponse` + +NewServiceExportResponseWithDefaults instantiates a new ServiceExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetServices + +`func (o *ServiceExportResponse) GetServices() []Service` + +GetServices returns the Services field if non-nil, zero value otherwise. + +### GetServicesOk + +`func (o *ServiceExportResponse) GetServicesOk() (*[]Service, bool)` + +GetServicesOk returns a tuple with the Services field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServices + +`func (o *ServiceExportResponse) SetServices(v []Service)` + +SetServices sets Services field to given value. + +### HasServices + +`func (o *ServiceExportResponse) HasServices() bool` + +HasServices returns a boolean if a field has been set. + +### GetNextKey + +`func (o *ServiceExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *ServiceExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *ServiceExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *ServiceExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ServiceNowAPI.md b/go/docs/ServiceNowAPI.md new file mode 100644 index 0000000..3e00471 --- /dev/null +++ b/go/docs/ServiceNowAPI.md @@ -0,0 +1,270 @@ +# \ServiceNowAPI + +All URIs are relative to *https://console.runzero.com/api/v1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SnowExportAssetsCSV**](ServiceNowAPI.md#SnowExportAssetsCSV) | **Get** /export/org/assets.servicenow.csv | Export an asset inventory as CSV for ServiceNow integration +[**SnowExportAssetsJSON**](ServiceNowAPI.md#SnowExportAssetsJSON) | **Get** /export/org/assets.servicenow.json | Exports the asset inventory as JSON +[**SnowExportServicesCSV**](ServiceNowAPI.md#SnowExportServicesCSV) | **Get** /export/org/services.servicenow.csv | Export a service inventory as CSV for ServiceNow integration +[**SnowServiceGraphExportAssetsJSON**](ServiceNowAPI.md#SnowServiceGraphExportAssetsJSON) | **Get** /export/org/assets.servicegraph.json | Exports the asset inventory as JSON + + + +## SnowExportAssetsCSV + +> *os.File SnowExportAssetsCSV(ctx).Oid(oid).Execute() + +Export an asset inventory as CSV for ServiceNow integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServiceNowAPI.SnowExportAssetsCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServiceNowAPI.SnowExportAssetsCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SnowExportAssetsCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ServiceNowAPI.SnowExportAssetsCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSnowExportAssetsCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SnowExportAssetsJSON + +> []AssetServiceNow SnowExportAssetsJSON(ctx).Oid(oid).Execute() + +Exports the asset inventory as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServiceNowAPI.SnowExportAssetsJSON(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServiceNowAPI.SnowExportAssetsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SnowExportAssetsJSON`: []AssetServiceNow + fmt.Fprintf(os.Stdout, "Response from `ServiceNowAPI.SnowExportAssetsJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSnowExportAssetsJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[**[]AssetServiceNow**](AssetServiceNow.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SnowExportServicesCSV + +> *os.File SnowExportServicesCSV(ctx).Oid(oid).Execute() + +Export a service inventory as CSV for ServiceNow integration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServiceNowAPI.SnowExportServicesCSV(context.Background()).Oid(oid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServiceNowAPI.SnowExportServicesCSV``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SnowExportServicesCSV`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ServiceNowAPI.SnowExportServicesCSV`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSnowExportServicesCSVRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/csv, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SnowServiceGraphExportAssetsJSON + +> []AssetServiceNow SnowServiceGraphExportAssetsJSON(ctx).Oid(oid).Search(search).Execute() + +Exports the asset inventory as JSON + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServiceNowAPI.SnowServiceGraphExportAssetsJSON(context.Background()).Oid(oid).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServiceNowAPI.SnowServiceGraphExportAssetsJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SnowServiceGraphExportAssetsJSON`: []AssetServiceNow + fmt.Fprintf(os.Stdout, "Response from `ServiceNowAPI.SnowServiceGraphExportAssetsJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSnowServiceGraphExportAssetsJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + +### Return type + +[**[]AssetServiceNow**](AssetServiceNow.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/docs/ServicePage.md b/go/docs/ServicePage.md new file mode 100644 index 0000000..9fb43d9 --- /dev/null +++ b/go/docs/ServicePage.md @@ -0,0 +1,82 @@ +# ServicePage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Services** | Pointer to [**[]Service**](Service.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewServicePage + +`func NewServicePage() *ServicePage` + +NewServicePage instantiates a new ServicePage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServicePageWithDefaults + +`func NewServicePageWithDefaults() *ServicePage` + +NewServicePageWithDefaults instantiates a new ServicePage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetServices + +`func (o *ServicePage) GetServices() []Service` + +GetServices returns the Services field if non-nil, zero value otherwise. + +### GetServicesOk + +`func (o *ServicePage) GetServicesOk() (*[]Service, bool)` + +GetServicesOk returns a tuple with the Services field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServices + +`func (o *ServicePage) SetServices(v []Service)` + +SetServices sets Services field to given value. + +### HasServices + +`func (o *ServicePage) HasServices() bool` + +HasServices returns a boolean if a field has been set. + +### GetNextKey + +`func (o *ServicePage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *ServicePage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *ServicePage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *ServicePage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/ShodanCredentialFields.md b/go/docs/ShodanCredentialFields.md new file mode 100644 index 0000000..f8eed22 --- /dev/null +++ b/go/docs/ShodanCredentialFields.md @@ -0,0 +1,51 @@ +# ShodanCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | | + +## Methods + +### NewShodanCredentialFields + +`func NewShodanCredentialFields(apiKey string, ) *ShodanCredentialFields` + +NewShodanCredentialFields instantiates a new ShodanCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewShodanCredentialFieldsWithDefaults + +`func NewShodanCredentialFieldsWithDefaults() *ShodanCredentialFields` + +NewShodanCredentialFieldsWithDefaults instantiates a new ShodanCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiKey + +`func (o *ShodanCredentialFields) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *ShodanCredentialFields) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *ShodanCredentialFields) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Site.md b/go/docs/Site.md index a723a65..5939cac 100644 --- a/go/docs/Site.md +++ b/go/docs/Site.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **CreatedAt** | Pointer to **int64** | | [optional] **UpdatedAt** | Pointer to **int64** | | [optional] -**Permanent** | Pointer to **bool** | | [optional] -**Name** | Pointer to **string** | | +**Name** | **string** | | **Description** | Pointer to **string** | | [optional] **Scope** | Pointer to **string** | | [optional] **Excludes** | Pointer to **string** | | [optional] +**Subnets** | Pointer to **map[string]interface{}** | | [optional] ## Methods @@ -102,31 +102,6 @@ SetUpdatedAt sets UpdatedAt field to given value. HasUpdatedAt returns a boolean if a field has been set. -### GetPermanent - -`func (o *Site) GetPermanent() bool` - -GetPermanent returns the Permanent field if non-nil, zero value otherwise. - -### GetPermanentOk - -`func (o *Site) GetPermanentOk() (*bool, bool)` - -GetPermanentOk returns a tuple with the Permanent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermanent - -`func (o *Site) SetPermanent(v bool)` - -SetPermanent sets Permanent field to given value. - -### HasPermanent - -`func (o *Site) HasPermanent() bool` - -HasPermanent returns a boolean if a field has been set. - ### GetName `func (o *Site) GetName() string` @@ -222,6 +197,31 @@ SetExcludes sets Excludes field to given value. HasExcludes returns a boolean if a field has been set. +### GetSubnets + +`func (o *Site) GetSubnets() map[string]interface{}` + +GetSubnets returns the Subnets field if non-nil, zero value otherwise. + +### GetSubnetsOk + +`func (o *Site) GetSubnetsOk() (*map[string]interface{}, bool)` + +GetSubnetsOk returns a tuple with the Subnets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnets + +`func (o *Site) SetSubnets(v map[string]interface{})` + +SetSubnets sets Subnets field to given value. + +### HasSubnets + +`func (o *Site) HasSubnets() bool` + +HasSubnets returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/SiteOptions.md b/go/docs/SiteOptions.md index e0dc19c..bf3aea9 100644 --- a/go/docs/SiteOptions.md +++ b/go/docs/SiteOptions.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | +**Name** | **string** | | **Description** | Pointer to **string** | | [optional] **Scope** | Pointer to **string** | | [optional] **Excludes** | Pointer to **string** | | [optional] +**Subnets** | Pointer to **map[string]interface{}** | | [optional] ## Methods @@ -123,6 +124,31 @@ SetExcludes sets Excludes field to given value. HasExcludes returns a boolean if a field has been set. +### GetSubnets + +`func (o *SiteOptions) GetSubnets() map[string]interface{}` + +GetSubnets returns the Subnets field if non-nil, zero value otherwise. + +### GetSubnetsOk + +`func (o *SiteOptions) GetSubnetsOk() (*map[string]interface{}, bool)` + +GetSubnetsOk returns a tuple with the Subnets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubnets + +`func (o *SiteOptions) SetSubnets(v map[string]interface{})` + +SetSubnets sets Subnets field to given value. + +### HasSubnets + +`func (o *SiteOptions) HasSubnets() bool` + +HasSubnets returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/Software.md b/go/docs/Software.md new file mode 100644 index 0000000..1142c21 --- /dev/null +++ b/go/docs/Software.md @@ -0,0 +1,737 @@ +# Software + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**SoftwareId** | Pointer to **string** | | [optional] +**SoftwareAssetId** | Pointer to **string** | | [optional] +**SoftwareOrganizationId** | Pointer to **string** | | [optional] +**SoftwareSourceId** | Pointer to **int32** | | [optional] +**SoftwareCreatedAt** | Pointer to **int64** | | [optional] +**SoftwareUpdatedAt** | Pointer to **int64** | | [optional] +**SoftwareServiceAddress** | Pointer to **NullableString** | | [optional] +**SoftwareServiceTransport** | Pointer to **string** | | [optional] +**SoftwareServicePort** | Pointer to **int64** | | [optional] +**SoftwareInstalledAt** | Pointer to **int64** | | [optional] +**SoftwareInstalledSize** | Pointer to **int64** | | [optional] +**SoftwareInstalledFrom** | Pointer to **string** | | [optional] +**SoftwareAppId** | Pointer to **string** | | [optional] +**SoftwarePart** | Pointer to **string** | | [optional] +**SoftwareVendor** | Pointer to **string** | | [optional] +**SoftwareProduct** | Pointer to **string** | | [optional] +**SoftwareVersion** | Pointer to **string** | | [optional] +**SoftwareUpdate** | Pointer to **string** | | [optional] +**SoftwareEdition** | Pointer to **string** | | [optional] +**SoftwareLanguage** | Pointer to **string** | | [optional] +**SoftwareSwEdition** | Pointer to **string** | | [optional] +**SoftwareTargetSw** | Pointer to **string** | | [optional] +**SoftwareTargetHw** | Pointer to **string** | | [optional] +**SoftwareOther** | Pointer to **string** | | [optional] +**SoftwareCpe23** | Pointer to **string** | | [optional] +**SoftwareAttributes** | Pointer to **map[string]string** | | [optional] + +## Methods + +### NewSoftware + +`func NewSoftware(id string, ) *Software` + +NewSoftware instantiates a new Software object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSoftwareWithDefaults + +`func NewSoftwareWithDefaults() *Software` + +NewSoftwareWithDefaults instantiates a new Software object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Software) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Software) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Software) SetId(v string)` + +SetId sets Id field to given value. + + +### GetSoftwareId + +`func (o *Software) GetSoftwareId() string` + +GetSoftwareId returns the SoftwareId field if non-nil, zero value otherwise. + +### GetSoftwareIdOk + +`func (o *Software) GetSoftwareIdOk() (*string, bool)` + +GetSoftwareIdOk returns a tuple with the SoftwareId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareId + +`func (o *Software) SetSoftwareId(v string)` + +SetSoftwareId sets SoftwareId field to given value. + +### HasSoftwareId + +`func (o *Software) HasSoftwareId() bool` + +HasSoftwareId returns a boolean if a field has been set. + +### GetSoftwareAssetId + +`func (o *Software) GetSoftwareAssetId() string` + +GetSoftwareAssetId returns the SoftwareAssetId field if non-nil, zero value otherwise. + +### GetSoftwareAssetIdOk + +`func (o *Software) GetSoftwareAssetIdOk() (*string, bool)` + +GetSoftwareAssetIdOk returns a tuple with the SoftwareAssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareAssetId + +`func (o *Software) SetSoftwareAssetId(v string)` + +SetSoftwareAssetId sets SoftwareAssetId field to given value. + +### HasSoftwareAssetId + +`func (o *Software) HasSoftwareAssetId() bool` + +HasSoftwareAssetId returns a boolean if a field has been set. + +### GetSoftwareOrganizationId + +`func (o *Software) GetSoftwareOrganizationId() string` + +GetSoftwareOrganizationId returns the SoftwareOrganizationId field if non-nil, zero value otherwise. + +### GetSoftwareOrganizationIdOk + +`func (o *Software) GetSoftwareOrganizationIdOk() (*string, bool)` + +GetSoftwareOrganizationIdOk returns a tuple with the SoftwareOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareOrganizationId + +`func (o *Software) SetSoftwareOrganizationId(v string)` + +SetSoftwareOrganizationId sets SoftwareOrganizationId field to given value. + +### HasSoftwareOrganizationId + +`func (o *Software) HasSoftwareOrganizationId() bool` + +HasSoftwareOrganizationId returns a boolean if a field has been set. + +### GetSoftwareSourceId + +`func (o *Software) GetSoftwareSourceId() int32` + +GetSoftwareSourceId returns the SoftwareSourceId field if non-nil, zero value otherwise. + +### GetSoftwareSourceIdOk + +`func (o *Software) GetSoftwareSourceIdOk() (*int32, bool)` + +GetSoftwareSourceIdOk returns a tuple with the SoftwareSourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareSourceId + +`func (o *Software) SetSoftwareSourceId(v int32)` + +SetSoftwareSourceId sets SoftwareSourceId field to given value. + +### HasSoftwareSourceId + +`func (o *Software) HasSoftwareSourceId() bool` + +HasSoftwareSourceId returns a boolean if a field has been set. + +### GetSoftwareCreatedAt + +`func (o *Software) GetSoftwareCreatedAt() int64` + +GetSoftwareCreatedAt returns the SoftwareCreatedAt field if non-nil, zero value otherwise. + +### GetSoftwareCreatedAtOk + +`func (o *Software) GetSoftwareCreatedAtOk() (*int64, bool)` + +GetSoftwareCreatedAtOk returns a tuple with the SoftwareCreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareCreatedAt + +`func (o *Software) SetSoftwareCreatedAt(v int64)` + +SetSoftwareCreatedAt sets SoftwareCreatedAt field to given value. + +### HasSoftwareCreatedAt + +`func (o *Software) HasSoftwareCreatedAt() bool` + +HasSoftwareCreatedAt returns a boolean if a field has been set. + +### GetSoftwareUpdatedAt + +`func (o *Software) GetSoftwareUpdatedAt() int64` + +GetSoftwareUpdatedAt returns the SoftwareUpdatedAt field if non-nil, zero value otherwise. + +### GetSoftwareUpdatedAtOk + +`func (o *Software) GetSoftwareUpdatedAtOk() (*int64, bool)` + +GetSoftwareUpdatedAtOk returns a tuple with the SoftwareUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareUpdatedAt + +`func (o *Software) SetSoftwareUpdatedAt(v int64)` + +SetSoftwareUpdatedAt sets SoftwareUpdatedAt field to given value. + +### HasSoftwareUpdatedAt + +`func (o *Software) HasSoftwareUpdatedAt() bool` + +HasSoftwareUpdatedAt returns a boolean if a field has been set. + +### GetSoftwareServiceAddress + +`func (o *Software) GetSoftwareServiceAddress() string` + +GetSoftwareServiceAddress returns the SoftwareServiceAddress field if non-nil, zero value otherwise. + +### GetSoftwareServiceAddressOk + +`func (o *Software) GetSoftwareServiceAddressOk() (*string, bool)` + +GetSoftwareServiceAddressOk returns a tuple with the SoftwareServiceAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareServiceAddress + +`func (o *Software) SetSoftwareServiceAddress(v string)` + +SetSoftwareServiceAddress sets SoftwareServiceAddress field to given value. + +### HasSoftwareServiceAddress + +`func (o *Software) HasSoftwareServiceAddress() bool` + +HasSoftwareServiceAddress returns a boolean if a field has been set. + +### SetSoftwareServiceAddressNil + +`func (o *Software) SetSoftwareServiceAddressNil(b bool)` + + SetSoftwareServiceAddressNil sets the value for SoftwareServiceAddress to be an explicit nil + +### UnsetSoftwareServiceAddress +`func (o *Software) UnsetSoftwareServiceAddress()` + +UnsetSoftwareServiceAddress ensures that no value is present for SoftwareServiceAddress, not even an explicit nil +### GetSoftwareServiceTransport + +`func (o *Software) GetSoftwareServiceTransport() string` + +GetSoftwareServiceTransport returns the SoftwareServiceTransport field if non-nil, zero value otherwise. + +### GetSoftwareServiceTransportOk + +`func (o *Software) GetSoftwareServiceTransportOk() (*string, bool)` + +GetSoftwareServiceTransportOk returns a tuple with the SoftwareServiceTransport field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareServiceTransport + +`func (o *Software) SetSoftwareServiceTransport(v string)` + +SetSoftwareServiceTransport sets SoftwareServiceTransport field to given value. + +### HasSoftwareServiceTransport + +`func (o *Software) HasSoftwareServiceTransport() bool` + +HasSoftwareServiceTransport returns a boolean if a field has been set. + +### GetSoftwareServicePort + +`func (o *Software) GetSoftwareServicePort() int64` + +GetSoftwareServicePort returns the SoftwareServicePort field if non-nil, zero value otherwise. + +### GetSoftwareServicePortOk + +`func (o *Software) GetSoftwareServicePortOk() (*int64, bool)` + +GetSoftwareServicePortOk returns a tuple with the SoftwareServicePort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareServicePort + +`func (o *Software) SetSoftwareServicePort(v int64)` + +SetSoftwareServicePort sets SoftwareServicePort field to given value. + +### HasSoftwareServicePort + +`func (o *Software) HasSoftwareServicePort() bool` + +HasSoftwareServicePort returns a boolean if a field has been set. + +### GetSoftwareInstalledAt + +`func (o *Software) GetSoftwareInstalledAt() int64` + +GetSoftwareInstalledAt returns the SoftwareInstalledAt field if non-nil, zero value otherwise. + +### GetSoftwareInstalledAtOk + +`func (o *Software) GetSoftwareInstalledAtOk() (*int64, bool)` + +GetSoftwareInstalledAtOk returns a tuple with the SoftwareInstalledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareInstalledAt + +`func (o *Software) SetSoftwareInstalledAt(v int64)` + +SetSoftwareInstalledAt sets SoftwareInstalledAt field to given value. + +### HasSoftwareInstalledAt + +`func (o *Software) HasSoftwareInstalledAt() bool` + +HasSoftwareInstalledAt returns a boolean if a field has been set. + +### GetSoftwareInstalledSize + +`func (o *Software) GetSoftwareInstalledSize() int64` + +GetSoftwareInstalledSize returns the SoftwareInstalledSize field if non-nil, zero value otherwise. + +### GetSoftwareInstalledSizeOk + +`func (o *Software) GetSoftwareInstalledSizeOk() (*int64, bool)` + +GetSoftwareInstalledSizeOk returns a tuple with the SoftwareInstalledSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareInstalledSize + +`func (o *Software) SetSoftwareInstalledSize(v int64)` + +SetSoftwareInstalledSize sets SoftwareInstalledSize field to given value. + +### HasSoftwareInstalledSize + +`func (o *Software) HasSoftwareInstalledSize() bool` + +HasSoftwareInstalledSize returns a boolean if a field has been set. + +### GetSoftwareInstalledFrom + +`func (o *Software) GetSoftwareInstalledFrom() string` + +GetSoftwareInstalledFrom returns the SoftwareInstalledFrom field if non-nil, zero value otherwise. + +### GetSoftwareInstalledFromOk + +`func (o *Software) GetSoftwareInstalledFromOk() (*string, bool)` + +GetSoftwareInstalledFromOk returns a tuple with the SoftwareInstalledFrom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareInstalledFrom + +`func (o *Software) SetSoftwareInstalledFrom(v string)` + +SetSoftwareInstalledFrom sets SoftwareInstalledFrom field to given value. + +### HasSoftwareInstalledFrom + +`func (o *Software) HasSoftwareInstalledFrom() bool` + +HasSoftwareInstalledFrom returns a boolean if a field has been set. + +### GetSoftwareAppId + +`func (o *Software) GetSoftwareAppId() string` + +GetSoftwareAppId returns the SoftwareAppId field if non-nil, zero value otherwise. + +### GetSoftwareAppIdOk + +`func (o *Software) GetSoftwareAppIdOk() (*string, bool)` + +GetSoftwareAppIdOk returns a tuple with the SoftwareAppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareAppId + +`func (o *Software) SetSoftwareAppId(v string)` + +SetSoftwareAppId sets SoftwareAppId field to given value. + +### HasSoftwareAppId + +`func (o *Software) HasSoftwareAppId() bool` + +HasSoftwareAppId returns a boolean if a field has been set. + +### GetSoftwarePart + +`func (o *Software) GetSoftwarePart() string` + +GetSoftwarePart returns the SoftwarePart field if non-nil, zero value otherwise. + +### GetSoftwarePartOk + +`func (o *Software) GetSoftwarePartOk() (*string, bool)` + +GetSoftwarePartOk returns a tuple with the SoftwarePart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwarePart + +`func (o *Software) SetSoftwarePart(v string)` + +SetSoftwarePart sets SoftwarePart field to given value. + +### HasSoftwarePart + +`func (o *Software) HasSoftwarePart() bool` + +HasSoftwarePart returns a boolean if a field has been set. + +### GetSoftwareVendor + +`func (o *Software) GetSoftwareVendor() string` + +GetSoftwareVendor returns the SoftwareVendor field if non-nil, zero value otherwise. + +### GetSoftwareVendorOk + +`func (o *Software) GetSoftwareVendorOk() (*string, bool)` + +GetSoftwareVendorOk returns a tuple with the SoftwareVendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareVendor + +`func (o *Software) SetSoftwareVendor(v string)` + +SetSoftwareVendor sets SoftwareVendor field to given value. + +### HasSoftwareVendor + +`func (o *Software) HasSoftwareVendor() bool` + +HasSoftwareVendor returns a boolean if a field has been set. + +### GetSoftwareProduct + +`func (o *Software) GetSoftwareProduct() string` + +GetSoftwareProduct returns the SoftwareProduct field if non-nil, zero value otherwise. + +### GetSoftwareProductOk + +`func (o *Software) GetSoftwareProductOk() (*string, bool)` + +GetSoftwareProductOk returns a tuple with the SoftwareProduct field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareProduct + +`func (o *Software) SetSoftwareProduct(v string)` + +SetSoftwareProduct sets SoftwareProduct field to given value. + +### HasSoftwareProduct + +`func (o *Software) HasSoftwareProduct() bool` + +HasSoftwareProduct returns a boolean if a field has been set. + +### GetSoftwareVersion + +`func (o *Software) GetSoftwareVersion() string` + +GetSoftwareVersion returns the SoftwareVersion field if non-nil, zero value otherwise. + +### GetSoftwareVersionOk + +`func (o *Software) GetSoftwareVersionOk() (*string, bool)` + +GetSoftwareVersionOk returns a tuple with the SoftwareVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareVersion + +`func (o *Software) SetSoftwareVersion(v string)` + +SetSoftwareVersion sets SoftwareVersion field to given value. + +### HasSoftwareVersion + +`func (o *Software) HasSoftwareVersion() bool` + +HasSoftwareVersion returns a boolean if a field has been set. + +### GetSoftwareUpdate + +`func (o *Software) GetSoftwareUpdate() string` + +GetSoftwareUpdate returns the SoftwareUpdate field if non-nil, zero value otherwise. + +### GetSoftwareUpdateOk + +`func (o *Software) GetSoftwareUpdateOk() (*string, bool)` + +GetSoftwareUpdateOk returns a tuple with the SoftwareUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareUpdate + +`func (o *Software) SetSoftwareUpdate(v string)` + +SetSoftwareUpdate sets SoftwareUpdate field to given value. + +### HasSoftwareUpdate + +`func (o *Software) HasSoftwareUpdate() bool` + +HasSoftwareUpdate returns a boolean if a field has been set. + +### GetSoftwareEdition + +`func (o *Software) GetSoftwareEdition() string` + +GetSoftwareEdition returns the SoftwareEdition field if non-nil, zero value otherwise. + +### GetSoftwareEditionOk + +`func (o *Software) GetSoftwareEditionOk() (*string, bool)` + +GetSoftwareEditionOk returns a tuple with the SoftwareEdition field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareEdition + +`func (o *Software) SetSoftwareEdition(v string)` + +SetSoftwareEdition sets SoftwareEdition field to given value. + +### HasSoftwareEdition + +`func (o *Software) HasSoftwareEdition() bool` + +HasSoftwareEdition returns a boolean if a field has been set. + +### GetSoftwareLanguage + +`func (o *Software) GetSoftwareLanguage() string` + +GetSoftwareLanguage returns the SoftwareLanguage field if non-nil, zero value otherwise. + +### GetSoftwareLanguageOk + +`func (o *Software) GetSoftwareLanguageOk() (*string, bool)` + +GetSoftwareLanguageOk returns a tuple with the SoftwareLanguage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareLanguage + +`func (o *Software) SetSoftwareLanguage(v string)` + +SetSoftwareLanguage sets SoftwareLanguage field to given value. + +### HasSoftwareLanguage + +`func (o *Software) HasSoftwareLanguage() bool` + +HasSoftwareLanguage returns a boolean if a field has been set. + +### GetSoftwareSwEdition + +`func (o *Software) GetSoftwareSwEdition() string` + +GetSoftwareSwEdition returns the SoftwareSwEdition field if non-nil, zero value otherwise. + +### GetSoftwareSwEditionOk + +`func (o *Software) GetSoftwareSwEditionOk() (*string, bool)` + +GetSoftwareSwEditionOk returns a tuple with the SoftwareSwEdition field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareSwEdition + +`func (o *Software) SetSoftwareSwEdition(v string)` + +SetSoftwareSwEdition sets SoftwareSwEdition field to given value. + +### HasSoftwareSwEdition + +`func (o *Software) HasSoftwareSwEdition() bool` + +HasSoftwareSwEdition returns a boolean if a field has been set. + +### GetSoftwareTargetSw + +`func (o *Software) GetSoftwareTargetSw() string` + +GetSoftwareTargetSw returns the SoftwareTargetSw field if non-nil, zero value otherwise. + +### GetSoftwareTargetSwOk + +`func (o *Software) GetSoftwareTargetSwOk() (*string, bool)` + +GetSoftwareTargetSwOk returns a tuple with the SoftwareTargetSw field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareTargetSw + +`func (o *Software) SetSoftwareTargetSw(v string)` + +SetSoftwareTargetSw sets SoftwareTargetSw field to given value. + +### HasSoftwareTargetSw + +`func (o *Software) HasSoftwareTargetSw() bool` + +HasSoftwareTargetSw returns a boolean if a field has been set. + +### GetSoftwareTargetHw + +`func (o *Software) GetSoftwareTargetHw() string` + +GetSoftwareTargetHw returns the SoftwareTargetHw field if non-nil, zero value otherwise. + +### GetSoftwareTargetHwOk + +`func (o *Software) GetSoftwareTargetHwOk() (*string, bool)` + +GetSoftwareTargetHwOk returns a tuple with the SoftwareTargetHw field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareTargetHw + +`func (o *Software) SetSoftwareTargetHw(v string)` + +SetSoftwareTargetHw sets SoftwareTargetHw field to given value. + +### HasSoftwareTargetHw + +`func (o *Software) HasSoftwareTargetHw() bool` + +HasSoftwareTargetHw returns a boolean if a field has been set. + +### GetSoftwareOther + +`func (o *Software) GetSoftwareOther() string` + +GetSoftwareOther returns the SoftwareOther field if non-nil, zero value otherwise. + +### GetSoftwareOtherOk + +`func (o *Software) GetSoftwareOtherOk() (*string, bool)` + +GetSoftwareOtherOk returns a tuple with the SoftwareOther field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareOther + +`func (o *Software) SetSoftwareOther(v string)` + +SetSoftwareOther sets SoftwareOther field to given value. + +### HasSoftwareOther + +`func (o *Software) HasSoftwareOther() bool` + +HasSoftwareOther returns a boolean if a field has been set. + +### GetSoftwareCpe23 + +`func (o *Software) GetSoftwareCpe23() string` + +GetSoftwareCpe23 returns the SoftwareCpe23 field if non-nil, zero value otherwise. + +### GetSoftwareCpe23Ok + +`func (o *Software) GetSoftwareCpe23Ok() (*string, bool)` + +GetSoftwareCpe23Ok returns a tuple with the SoftwareCpe23 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareCpe23 + +`func (o *Software) SetSoftwareCpe23(v string)` + +SetSoftwareCpe23 sets SoftwareCpe23 field to given value. + +### HasSoftwareCpe23 + +`func (o *Software) HasSoftwareCpe23() bool` + +HasSoftwareCpe23 returns a boolean if a field has been set. + +### GetSoftwareAttributes + +`func (o *Software) GetSoftwareAttributes() map[string]string` + +GetSoftwareAttributes returns the SoftwareAttributes field if non-nil, zero value otherwise. + +### GetSoftwareAttributesOk + +`func (o *Software) GetSoftwareAttributesOk() (*map[string]string, bool)` + +GetSoftwareAttributesOk returns a tuple with the SoftwareAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftwareAttributes + +`func (o *Software) SetSoftwareAttributes(v map[string]string)` + +SetSoftwareAttributes sets SoftwareAttributes field to given value. + +### HasSoftwareAttributes + +`func (o *Software) HasSoftwareAttributes() bool` + +HasSoftwareAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SoftwareExportResponse.md b/go/docs/SoftwareExportResponse.md new file mode 100644 index 0000000..9eb4ab8 --- /dev/null +++ b/go/docs/SoftwareExportResponse.md @@ -0,0 +1,82 @@ +# SoftwareExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Software** | Pointer to [**[]Software**](Software.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewSoftwareExportResponse + +`func NewSoftwareExportResponse() *SoftwareExportResponse` + +NewSoftwareExportResponse instantiates a new SoftwareExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSoftwareExportResponseWithDefaults + +`func NewSoftwareExportResponseWithDefaults() *SoftwareExportResponse` + +NewSoftwareExportResponseWithDefaults instantiates a new SoftwareExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSoftware + +`func (o *SoftwareExportResponse) GetSoftware() []Software` + +GetSoftware returns the Software field if non-nil, zero value otherwise. + +### GetSoftwareOk + +`func (o *SoftwareExportResponse) GetSoftwareOk() (*[]Software, bool)` + +GetSoftwareOk returns a tuple with the Software field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftware + +`func (o *SoftwareExportResponse) SetSoftware(v []Software)` + +SetSoftware sets Software field to given value. + +### HasSoftware + +`func (o *SoftwareExportResponse) HasSoftware() bool` + +HasSoftware returns a boolean if a field has been set. + +### GetNextKey + +`func (o *SoftwareExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *SoftwareExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *SoftwareExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *SoftwareExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SoftwarePage.md b/go/docs/SoftwarePage.md new file mode 100644 index 0000000..821dc65 --- /dev/null +++ b/go/docs/SoftwarePage.md @@ -0,0 +1,82 @@ +# SoftwarePage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Software** | Pointer to [**[]Software**](Software.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewSoftwarePage + +`func NewSoftwarePage() *SoftwarePage` + +NewSoftwarePage instantiates a new SoftwarePage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSoftwarePageWithDefaults + +`func NewSoftwarePageWithDefaults() *SoftwarePage` + +NewSoftwarePageWithDefaults instantiates a new SoftwarePage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSoftware + +`func (o *SoftwarePage) GetSoftware() []Software` + +GetSoftware returns the Software field if non-nil, zero value otherwise. + +### GetSoftwareOk + +`func (o *SoftwarePage) GetSoftwareOk() (*[]Software, bool)` + +GetSoftwareOk returns a tuple with the Software field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSoftware + +`func (o *SoftwarePage) SetSoftware(v []Software)` + +SetSoftware sets Software field to given value. + +### HasSoftware + +`func (o *SoftwarePage) HasSoftware() bool` + +HasSoftware returns a boolean if a field has been set. + +### GetNextKey + +`func (o *SoftwarePage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *SoftwarePage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *SoftwarePage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *SoftwarePage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/SplunkAPI.md b/go/docs/SplunkAPI.md new file mode 100644 index 0000000..cec4ceb --- /dev/null +++ b/go/docs/SplunkAPI.md @@ -0,0 +1,150 @@ +# \SplunkAPI + +All URIs are relative to *https://console.runzero.com/api/v1.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SplunkAssetSyncCreatedJSON**](SplunkAPI.md#SplunkAssetSyncCreatedJSON) | **Get** /export/org/assets/sync/created/assets.json | Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. Requires the Splunk entitlement. +[**SplunkAssetSyncUpdatedJSON**](SplunkAPI.md#SplunkAssetSyncUpdatedJSON) | **Get** /export/org/assets/sync/updated/assets.json | Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. Requires the Splunk entitlement. + + + +## SplunkAssetSyncCreatedJSON + +> AssetsWithCheckpoint SplunkAssetSyncCreatedJSON(ctx).Oid(oid).Search(search).Fields(fields).Since(since).Execute() + +Exports the asset inventory in a sync-friendly manner using created_at as a checkpoint. Requires the Splunk entitlement. + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + since := int64(1576300370) // int64 | an optional unix timestamp to use as a checkpoint (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SplunkAPI.SplunkAssetSyncCreatedJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Since(since).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SplunkAPI.SplunkAssetSyncCreatedJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SplunkAssetSyncCreatedJSON`: AssetsWithCheckpoint + fmt.Fprintf(os.Stdout, "Response from `SplunkAPI.SplunkAssetSyncCreatedJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSplunkAssetSyncCreatedJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + **fields** | **string** | an optional list of fields to export, comma-separated | + **since** | **int64** | an optional unix timestamp to use as a checkpoint | + +### Return type + +[**AssetsWithCheckpoint**](AssetsWithCheckpoint.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SplunkAssetSyncUpdatedJSON + +> AssetsWithCheckpoint SplunkAssetSyncUpdatedJSON(ctx).Oid(oid).Search(search).Fields(fields).Since(since).Execute() + +Exports the asset inventory in a sync-friendly manner using updated_at as a checkpoint. Requires the Splunk entitlement. + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + oid := "oid_example" // string | The current Organization (optional) + search := "search_example" // string | an optional search string for filtering results (optional) + fields := "fields_example" // string | an optional list of fields to export, comma-separated (optional) + since := int64(1576300370) // int64 | an optional unix timestamp to use as a checkpoint (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SplunkAPI.SplunkAssetSyncUpdatedJSON(context.Background()).Oid(oid).Search(search).Fields(fields).Since(since).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SplunkAPI.SplunkAssetSyncUpdatedJSON``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SplunkAssetSyncUpdatedJSON`: AssetsWithCheckpoint + fmt.Fprintf(os.Stdout, "Response from `SplunkAPI.SplunkAssetSyncUpdatedJSON`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSplunkAssetSyncUpdatedJSONRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oid** | **string** | The current Organization | + **search** | **string** | an optional search string for filtering results | + **fields** | **string** | an optional list of fields to export, comma-separated | + **since** | **int64** | an optional unix timestamp to use as a checkpoint | + +### Return type + +[**AssetsWithCheckpoint**](AssetsWithCheckpoint.md) + +### Authorization + +[oauthDefaults](../README.md#oauthDefaults), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/docs/TaniumCredentialFields.md b/go/docs/TaniumCredentialFields.md new file mode 100644 index 0000000..fa84911 --- /dev/null +++ b/go/docs/TaniumCredentialFields.md @@ -0,0 +1,72 @@ +# TaniumCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**ApiToken** | **string** | | + +## Methods + +### NewTaniumCredentialFields + +`func NewTaniumCredentialFields(apiUrl string, apiToken string, ) *TaniumCredentialFields` + +NewTaniumCredentialFields instantiates a new TaniumCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaniumCredentialFieldsWithDefaults + +`func NewTaniumCredentialFieldsWithDefaults() *TaniumCredentialFields` + +NewTaniumCredentialFieldsWithDefaults instantiates a new TaniumCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *TaniumCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *TaniumCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *TaniumCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetApiToken + +`func (o *TaniumCredentialFields) GetApiToken() string` + +GetApiToken returns the ApiToken field if non-nil, zero value otherwise. + +### GetApiTokenOk + +`func (o *TaniumCredentialFields) GetApiTokenOk() (*string, bool)` + +GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiToken + +`func (o *TaniumCredentialFields) SetApiToken(v string)` + +SetApiToken sets ApiToken field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Task.md b/go/docs/Task.md index 144dd7d..09b7971 100644 --- a/go/docs/Task.md +++ b/go/docs/Task.md @@ -4,23 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **Name** | Pointer to **string** | | [optional] **Description** | Pointer to **string** | | [optional] +**TemplateId** | Pointer to **string** | | [optional] **ClientId** | Pointer to **string** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] **AgentId** | Pointer to **string** | | [optional] +**HostedZoneId** | Pointer to **string** | The ID of the Hosted Zone which executes the task. If the | [optional] **SiteId** | Pointer to **string** | | [optional] **CruncherId** | Pointer to **string** | | [optional] **CreatedAt** | Pointer to **int64** | | [optional] **CreatedBy** | Pointer to **string** | | [optional] **CreatedByUserId** | Pointer to **string** | | [optional] +**CustomIntegrationId** | Pointer to **string** | The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. | [optional] +**SourceId** | Pointer to **int32** | The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. | [optional] **UpdatedAt** | Pointer to **int64** | | [optional] **Type** | Pointer to **string** | | [optional] **Status** | Pointer to **string** | | [optional] **Error** | Pointer to **string** | | [optional] **Params** | Pointer to **map[string]string** | | [optional] -**Stats** | Pointer to **map[string]map[string]interface{}** | | [optional] +**Stats** | Pointer to **map[string]interface{}** | | [optional] **Hidden** | Pointer to **bool** | | [optional] **ParentId** | Pointer to **string** | | [optional] **Recur** | Pointer to **bool** | | [optional] @@ -119,6 +123,31 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. +### GetTemplateId + +`func (o *Task) GetTemplateId() string` + +GetTemplateId returns the TemplateId field if non-nil, zero value otherwise. + +### GetTemplateIdOk + +`func (o *Task) GetTemplateIdOk() (*string, bool)` + +GetTemplateIdOk returns a tuple with the TemplateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateId + +`func (o *Task) SetTemplateId(v string)` + +SetTemplateId sets TemplateId field to given value. + +### HasTemplateId + +`func (o *Task) HasTemplateId() bool` + +HasTemplateId returns a boolean if a field has been set. + ### GetClientId `func (o *Task) GetClientId() string` @@ -194,6 +223,31 @@ SetAgentId sets AgentId field to given value. HasAgentId returns a boolean if a field has been set. +### GetHostedZoneId + +`func (o *Task) GetHostedZoneId() string` + +GetHostedZoneId returns the HostedZoneId field if non-nil, zero value otherwise. + +### GetHostedZoneIdOk + +`func (o *Task) GetHostedZoneIdOk() (*string, bool)` + +GetHostedZoneIdOk returns a tuple with the HostedZoneId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneId + +`func (o *Task) SetHostedZoneId(v string)` + +SetHostedZoneId sets HostedZoneId field to given value. + +### HasHostedZoneId + +`func (o *Task) HasHostedZoneId() bool` + +HasHostedZoneId returns a boolean if a field has been set. + ### GetSiteId `func (o *Task) GetSiteId() string` @@ -319,6 +373,56 @@ SetCreatedByUserId sets CreatedByUserId field to given value. HasCreatedByUserId returns a boolean if a field has been set. +### GetCustomIntegrationId + +`func (o *Task) GetCustomIntegrationId() string` + +GetCustomIntegrationId returns the CustomIntegrationId field if non-nil, zero value otherwise. + +### GetCustomIntegrationIdOk + +`func (o *Task) GetCustomIntegrationIdOk() (*string, bool)` + +GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomIntegrationId + +`func (o *Task) SetCustomIntegrationId(v string)` + +SetCustomIntegrationId sets CustomIntegrationId field to given value. + +### HasCustomIntegrationId + +`func (o *Task) HasCustomIntegrationId() bool` + +HasCustomIntegrationId returns a boolean if a field has been set. + +### GetSourceId + +`func (o *Task) GetSourceId() int32` + +GetSourceId returns the SourceId field if non-nil, zero value otherwise. + +### GetSourceIdOk + +`func (o *Task) GetSourceIdOk() (*int32, bool)` + +GetSourceIdOk returns a tuple with the SourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceId + +`func (o *Task) SetSourceId(v int32)` + +SetSourceId sets SourceId field to given value. + +### HasSourceId + +`func (o *Task) HasSourceId() bool` + +HasSourceId returns a boolean if a field has been set. + ### GetUpdatedAt `func (o *Task) GetUpdatedAt() int64` @@ -446,20 +550,20 @@ HasParams returns a boolean if a field has been set. ### GetStats -`func (o *Task) GetStats() map[string]map[string]interface{}` +`func (o *Task) GetStats() map[string]interface{}` GetStats returns the Stats field if non-nil, zero value otherwise. ### GetStatsOk -`func (o *Task) GetStatsOk() (*map[string]map[string]interface{}, bool)` +`func (o *Task) GetStatsOk() (*map[string]interface{}, bool)` GetStatsOk returns a tuple with the Stats field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStats -`func (o *Task) SetStats(v map[string]map[string]interface{})` +`func (o *Task) SetStats(v map[string]interface{})` SetStats sets Stats field to given value. diff --git a/go/docs/TaskBase.md b/go/docs/TaskBase.md new file mode 100644 index 0000000..47ca8b1 --- /dev/null +++ b/go/docs/TaskBase.md @@ -0,0 +1,784 @@ +# TaskBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**TemplateId** | Pointer to **string** | | [optional] +**ClientId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**AgentId** | Pointer to **string** | | [optional] +**HostedZoneId** | Pointer to **string** | The ID of the Hosted Zone which executes the task. If the | [optional] +**SiteId** | Pointer to **string** | | [optional] +**CruncherId** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**CreatedBy** | Pointer to **string** | | [optional] +**CreatedByUserId** | Pointer to **string** | | [optional] +**CustomIntegrationId** | Pointer to **string** | The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. | [optional] +**SourceId** | Pointer to **int32** | The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Error** | Pointer to **string** | | [optional] +**Params** | Pointer to **map[string]string** | | [optional] +**Stats** | Pointer to **map[string]interface{}** | | [optional] +**Hidden** | Pointer to **bool** | | [optional] +**ParentId** | Pointer to **string** | | [optional] +**Recur** | Pointer to **bool** | | [optional] +**RecurFrequency** | Pointer to **string** | | [optional] +**StartTime** | Pointer to **int64** | | [optional] +**RecurLast** | Pointer to **int64** | | [optional] +**RecurNext** | Pointer to **int64** | | [optional] +**RecurLastTaskId** | Pointer to **string** | | [optional] + +## Methods + +### NewTaskBase + +`func NewTaskBase() *TaskBase` + +NewTaskBase instantiates a new TaskBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskBaseWithDefaults + +`func NewTaskBaseWithDefaults() *TaskBase` + +NewTaskBaseWithDefaults instantiates a new TaskBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *TaskBase) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TaskBase) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TaskBase) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TaskBase) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *TaskBase) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TaskBase) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TaskBase) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TaskBase) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *TaskBase) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TaskBase) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *TaskBase) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TaskBase) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetTemplateId + +`func (o *TaskBase) GetTemplateId() string` + +GetTemplateId returns the TemplateId field if non-nil, zero value otherwise. + +### GetTemplateIdOk + +`func (o *TaskBase) GetTemplateIdOk() (*string, bool)` + +GetTemplateIdOk returns a tuple with the TemplateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateId + +`func (o *TaskBase) SetTemplateId(v string)` + +SetTemplateId sets TemplateId field to given value. + +### HasTemplateId + +`func (o *TaskBase) HasTemplateId() bool` + +HasTemplateId returns a boolean if a field has been set. + +### GetClientId + +`func (o *TaskBase) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *TaskBase) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *TaskBase) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *TaskBase) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *TaskBase) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *TaskBase) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *TaskBase) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *TaskBase) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetAgentId + +`func (o *TaskBase) GetAgentId() string` + +GetAgentId returns the AgentId field if non-nil, zero value otherwise. + +### GetAgentIdOk + +`func (o *TaskBase) GetAgentIdOk() (*string, bool)` + +GetAgentIdOk returns a tuple with the AgentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgentId + +`func (o *TaskBase) SetAgentId(v string)` + +SetAgentId sets AgentId field to given value. + +### HasAgentId + +`func (o *TaskBase) HasAgentId() bool` + +HasAgentId returns a boolean if a field has been set. + +### GetHostedZoneId + +`func (o *TaskBase) GetHostedZoneId() string` + +GetHostedZoneId returns the HostedZoneId field if non-nil, zero value otherwise. + +### GetHostedZoneIdOk + +`func (o *TaskBase) GetHostedZoneIdOk() (*string, bool)` + +GetHostedZoneIdOk returns a tuple with the HostedZoneId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneId + +`func (o *TaskBase) SetHostedZoneId(v string)` + +SetHostedZoneId sets HostedZoneId field to given value. + +### HasHostedZoneId + +`func (o *TaskBase) HasHostedZoneId() bool` + +HasHostedZoneId returns a boolean if a field has been set. + +### GetSiteId + +`func (o *TaskBase) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *TaskBase) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *TaskBase) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *TaskBase) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetCruncherId + +`func (o *TaskBase) GetCruncherId() string` + +GetCruncherId returns the CruncherId field if non-nil, zero value otherwise. + +### GetCruncherIdOk + +`func (o *TaskBase) GetCruncherIdOk() (*string, bool)` + +GetCruncherIdOk returns a tuple with the CruncherId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCruncherId + +`func (o *TaskBase) SetCruncherId(v string)` + +SetCruncherId sets CruncherId field to given value. + +### HasCruncherId + +`func (o *TaskBase) HasCruncherId() bool` + +HasCruncherId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *TaskBase) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *TaskBase) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *TaskBase) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *TaskBase) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *TaskBase) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *TaskBase) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *TaskBase) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *TaskBase) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *TaskBase) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *TaskBase) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *TaskBase) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *TaskBase) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetCustomIntegrationId + +`func (o *TaskBase) GetCustomIntegrationId() string` + +GetCustomIntegrationId returns the CustomIntegrationId field if non-nil, zero value otherwise. + +### GetCustomIntegrationIdOk + +`func (o *TaskBase) GetCustomIntegrationIdOk() (*string, bool)` + +GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomIntegrationId + +`func (o *TaskBase) SetCustomIntegrationId(v string)` + +SetCustomIntegrationId sets CustomIntegrationId field to given value. + +### HasCustomIntegrationId + +`func (o *TaskBase) HasCustomIntegrationId() bool` + +HasCustomIntegrationId returns a boolean if a field has been set. + +### GetSourceId + +`func (o *TaskBase) GetSourceId() int32` + +GetSourceId returns the SourceId field if non-nil, zero value otherwise. + +### GetSourceIdOk + +`func (o *TaskBase) GetSourceIdOk() (*int32, bool)` + +GetSourceIdOk returns a tuple with the SourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceId + +`func (o *TaskBase) SetSourceId(v int32)` + +SetSourceId sets SourceId field to given value. + +### HasSourceId + +`func (o *TaskBase) HasSourceId() bool` + +HasSourceId returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *TaskBase) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *TaskBase) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *TaskBase) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *TaskBase) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetType + +`func (o *TaskBase) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TaskBase) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TaskBase) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TaskBase) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *TaskBase) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TaskBase) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *TaskBase) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *TaskBase) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetError + +`func (o *TaskBase) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *TaskBase) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *TaskBase) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *TaskBase) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetParams + +`func (o *TaskBase) GetParams() map[string]string` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *TaskBase) GetParamsOk() (*map[string]string, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *TaskBase) SetParams(v map[string]string)` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *TaskBase) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetStats + +`func (o *TaskBase) GetStats() map[string]interface{}` + +GetStats returns the Stats field if non-nil, zero value otherwise. + +### GetStatsOk + +`func (o *TaskBase) GetStatsOk() (*map[string]interface{}, bool)` + +GetStatsOk returns a tuple with the Stats field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStats + +`func (o *TaskBase) SetStats(v map[string]interface{})` + +SetStats sets Stats field to given value. + +### HasStats + +`func (o *TaskBase) HasStats() bool` + +HasStats returns a boolean if a field has been set. + +### GetHidden + +`func (o *TaskBase) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *TaskBase) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *TaskBase) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *TaskBase) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + +### GetParentId + +`func (o *TaskBase) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *TaskBase) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *TaskBase) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *TaskBase) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### GetRecur + +`func (o *TaskBase) GetRecur() bool` + +GetRecur returns the Recur field if non-nil, zero value otherwise. + +### GetRecurOk + +`func (o *TaskBase) GetRecurOk() (*bool, bool)` + +GetRecurOk returns a tuple with the Recur field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecur + +`func (o *TaskBase) SetRecur(v bool)` + +SetRecur sets Recur field to given value. + +### HasRecur + +`func (o *TaskBase) HasRecur() bool` + +HasRecur returns a boolean if a field has been set. + +### GetRecurFrequency + +`func (o *TaskBase) GetRecurFrequency() string` + +GetRecurFrequency returns the RecurFrequency field if non-nil, zero value otherwise. + +### GetRecurFrequencyOk + +`func (o *TaskBase) GetRecurFrequencyOk() (*string, bool)` + +GetRecurFrequencyOk returns a tuple with the RecurFrequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurFrequency + +`func (o *TaskBase) SetRecurFrequency(v string)` + +SetRecurFrequency sets RecurFrequency field to given value. + +### HasRecurFrequency + +`func (o *TaskBase) HasRecurFrequency() bool` + +HasRecurFrequency returns a boolean if a field has been set. + +### GetStartTime + +`func (o *TaskBase) GetStartTime() int64` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *TaskBase) GetStartTimeOk() (*int64, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *TaskBase) SetStartTime(v int64)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *TaskBase) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetRecurLast + +`func (o *TaskBase) GetRecurLast() int64` + +GetRecurLast returns the RecurLast field if non-nil, zero value otherwise. + +### GetRecurLastOk + +`func (o *TaskBase) GetRecurLastOk() (*int64, bool)` + +GetRecurLastOk returns a tuple with the RecurLast field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLast + +`func (o *TaskBase) SetRecurLast(v int64)` + +SetRecurLast sets RecurLast field to given value. + +### HasRecurLast + +`func (o *TaskBase) HasRecurLast() bool` + +HasRecurLast returns a boolean if a field has been set. + +### GetRecurNext + +`func (o *TaskBase) GetRecurNext() int64` + +GetRecurNext returns the RecurNext field if non-nil, zero value otherwise. + +### GetRecurNextOk + +`func (o *TaskBase) GetRecurNextOk() (*int64, bool)` + +GetRecurNextOk returns a tuple with the RecurNext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurNext + +`func (o *TaskBase) SetRecurNext(v int64)` + +SetRecurNext sets RecurNext field to given value. + +### HasRecurNext + +`func (o *TaskBase) HasRecurNext() bool` + +HasRecurNext returns a boolean if a field has been set. + +### GetRecurLastTaskId + +`func (o *TaskBase) GetRecurLastTaskId() string` + +GetRecurLastTaskId returns the RecurLastTaskId field if non-nil, zero value otherwise. + +### GetRecurLastTaskIdOk + +`func (o *TaskBase) GetRecurLastTaskIdOk() (*string, bool)` + +GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLastTaskId + +`func (o *TaskBase) SetRecurLastTaskId(v string)` + +SetRecurLastTaskId sets RecurLastTaskId field to given value. + +### HasRecurLastTaskId + +`func (o *TaskBase) HasRecurLastTaskId() bool` + +HasRecurLastTaskId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/TaskOptions.md b/go/docs/TaskOptions.md new file mode 100644 index 0000000..c73867d --- /dev/null +++ b/go/docs/TaskOptions.md @@ -0,0 +1,810 @@ +# TaskOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**TemplateId** | Pointer to **string** | | [optional] +**ClientId** | Pointer to **string** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**AgentId** | Pointer to **string** | | [optional] +**HostedZoneId** | Pointer to **string** | The ID of the Hosted Zone which executes the task. If the | [optional] +**SiteId** | Pointer to **string** | | [optional] +**CruncherId** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**CreatedBy** | Pointer to **string** | | [optional] +**CreatedByUserId** | Pointer to **string** | | [optional] +**CustomIntegrationId** | Pointer to **string** | The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. | [optional] +**SourceId** | Pointer to **int32** | The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Error** | Pointer to **string** | | [optional] +**Params** | Pointer to **map[string]string** | | [optional] +**Stats** | Pointer to **map[string]interface{}** | | [optional] +**Hidden** | Pointer to **bool** | | [optional] +**ParentId** | Pointer to **string** | | [optional] +**Recur** | Pointer to **bool** | | [optional] +**RecurFrequency** | Pointer to **string** | | [optional] +**StartTime** | Pointer to **int64** | | [optional] +**RecurLast** | Pointer to **int64** | | [optional] +**RecurNext** | Pointer to **int64** | | [optional] +**RecurLastTaskId** | Pointer to **string** | | [optional] +**HostedZoneName** | Pointer to **string** | The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) of the hosted zone. | [optional] + +## Methods + +### NewTaskOptions + +`func NewTaskOptions() *TaskOptions` + +NewTaskOptions instantiates a new TaskOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTaskOptionsWithDefaults + +`func NewTaskOptionsWithDefaults() *TaskOptions` + +NewTaskOptionsWithDefaults instantiates a new TaskOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *TaskOptions) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TaskOptions) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TaskOptions) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TaskOptions) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *TaskOptions) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TaskOptions) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TaskOptions) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TaskOptions) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *TaskOptions) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TaskOptions) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *TaskOptions) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TaskOptions) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetTemplateId + +`func (o *TaskOptions) GetTemplateId() string` + +GetTemplateId returns the TemplateId field if non-nil, zero value otherwise. + +### GetTemplateIdOk + +`func (o *TaskOptions) GetTemplateIdOk() (*string, bool)` + +GetTemplateIdOk returns a tuple with the TemplateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateId + +`func (o *TaskOptions) SetTemplateId(v string)` + +SetTemplateId sets TemplateId field to given value. + +### HasTemplateId + +`func (o *TaskOptions) HasTemplateId() bool` + +HasTemplateId returns a boolean if a field has been set. + +### GetClientId + +`func (o *TaskOptions) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *TaskOptions) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *TaskOptions) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *TaskOptions) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *TaskOptions) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *TaskOptions) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *TaskOptions) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *TaskOptions) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetAgentId + +`func (o *TaskOptions) GetAgentId() string` + +GetAgentId returns the AgentId field if non-nil, zero value otherwise. + +### GetAgentIdOk + +`func (o *TaskOptions) GetAgentIdOk() (*string, bool)` + +GetAgentIdOk returns a tuple with the AgentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgentId + +`func (o *TaskOptions) SetAgentId(v string)` + +SetAgentId sets AgentId field to given value. + +### HasAgentId + +`func (o *TaskOptions) HasAgentId() bool` + +HasAgentId returns a boolean if a field has been set. + +### GetHostedZoneId + +`func (o *TaskOptions) GetHostedZoneId() string` + +GetHostedZoneId returns the HostedZoneId field if non-nil, zero value otherwise. + +### GetHostedZoneIdOk + +`func (o *TaskOptions) GetHostedZoneIdOk() (*string, bool)` + +GetHostedZoneIdOk returns a tuple with the HostedZoneId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneId + +`func (o *TaskOptions) SetHostedZoneId(v string)` + +SetHostedZoneId sets HostedZoneId field to given value. + +### HasHostedZoneId + +`func (o *TaskOptions) HasHostedZoneId() bool` + +HasHostedZoneId returns a boolean if a field has been set. + +### GetSiteId + +`func (o *TaskOptions) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *TaskOptions) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *TaskOptions) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *TaskOptions) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetCruncherId + +`func (o *TaskOptions) GetCruncherId() string` + +GetCruncherId returns the CruncherId field if non-nil, zero value otherwise. + +### GetCruncherIdOk + +`func (o *TaskOptions) GetCruncherIdOk() (*string, bool)` + +GetCruncherIdOk returns a tuple with the CruncherId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCruncherId + +`func (o *TaskOptions) SetCruncherId(v string)` + +SetCruncherId sets CruncherId field to given value. + +### HasCruncherId + +`func (o *TaskOptions) HasCruncherId() bool` + +HasCruncherId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *TaskOptions) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *TaskOptions) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *TaskOptions) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *TaskOptions) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *TaskOptions) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *TaskOptions) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *TaskOptions) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *TaskOptions) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *TaskOptions) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *TaskOptions) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *TaskOptions) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *TaskOptions) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetCustomIntegrationId + +`func (o *TaskOptions) GetCustomIntegrationId() string` + +GetCustomIntegrationId returns the CustomIntegrationId field if non-nil, zero value otherwise. + +### GetCustomIntegrationIdOk + +`func (o *TaskOptions) GetCustomIntegrationIdOk() (*string, bool)` + +GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomIntegrationId + +`func (o *TaskOptions) SetCustomIntegrationId(v string)` + +SetCustomIntegrationId sets CustomIntegrationId field to given value. + +### HasCustomIntegrationId + +`func (o *TaskOptions) HasCustomIntegrationId() bool` + +HasCustomIntegrationId returns a boolean if a field has been set. + +### GetSourceId + +`func (o *TaskOptions) GetSourceId() int32` + +GetSourceId returns the SourceId field if non-nil, zero value otherwise. + +### GetSourceIdOk + +`func (o *TaskOptions) GetSourceIdOk() (*int32, bool)` + +GetSourceIdOk returns a tuple with the SourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceId + +`func (o *TaskOptions) SetSourceId(v int32)` + +SetSourceId sets SourceId field to given value. + +### HasSourceId + +`func (o *TaskOptions) HasSourceId() bool` + +HasSourceId returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *TaskOptions) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *TaskOptions) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *TaskOptions) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *TaskOptions) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetType + +`func (o *TaskOptions) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TaskOptions) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TaskOptions) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TaskOptions) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *TaskOptions) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TaskOptions) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *TaskOptions) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *TaskOptions) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetError + +`func (o *TaskOptions) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *TaskOptions) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *TaskOptions) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *TaskOptions) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetParams + +`func (o *TaskOptions) GetParams() map[string]string` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *TaskOptions) GetParamsOk() (*map[string]string, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *TaskOptions) SetParams(v map[string]string)` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *TaskOptions) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetStats + +`func (o *TaskOptions) GetStats() map[string]interface{}` + +GetStats returns the Stats field if non-nil, zero value otherwise. + +### GetStatsOk + +`func (o *TaskOptions) GetStatsOk() (*map[string]interface{}, bool)` + +GetStatsOk returns a tuple with the Stats field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStats + +`func (o *TaskOptions) SetStats(v map[string]interface{})` + +SetStats sets Stats field to given value. + +### HasStats + +`func (o *TaskOptions) HasStats() bool` + +HasStats returns a boolean if a field has been set. + +### GetHidden + +`func (o *TaskOptions) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *TaskOptions) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *TaskOptions) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *TaskOptions) HasHidden() bool` + +HasHidden returns a boolean if a field has been set. + +### GetParentId + +`func (o *TaskOptions) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *TaskOptions) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *TaskOptions) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *TaskOptions) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### GetRecur + +`func (o *TaskOptions) GetRecur() bool` + +GetRecur returns the Recur field if non-nil, zero value otherwise. + +### GetRecurOk + +`func (o *TaskOptions) GetRecurOk() (*bool, bool)` + +GetRecurOk returns a tuple with the Recur field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecur + +`func (o *TaskOptions) SetRecur(v bool)` + +SetRecur sets Recur field to given value. + +### HasRecur + +`func (o *TaskOptions) HasRecur() bool` + +HasRecur returns a boolean if a field has been set. + +### GetRecurFrequency + +`func (o *TaskOptions) GetRecurFrequency() string` + +GetRecurFrequency returns the RecurFrequency field if non-nil, zero value otherwise. + +### GetRecurFrequencyOk + +`func (o *TaskOptions) GetRecurFrequencyOk() (*string, bool)` + +GetRecurFrequencyOk returns a tuple with the RecurFrequency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurFrequency + +`func (o *TaskOptions) SetRecurFrequency(v string)` + +SetRecurFrequency sets RecurFrequency field to given value. + +### HasRecurFrequency + +`func (o *TaskOptions) HasRecurFrequency() bool` + +HasRecurFrequency returns a boolean if a field has been set. + +### GetStartTime + +`func (o *TaskOptions) GetStartTime() int64` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *TaskOptions) GetStartTimeOk() (*int64, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *TaskOptions) SetStartTime(v int64)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *TaskOptions) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetRecurLast + +`func (o *TaskOptions) GetRecurLast() int64` + +GetRecurLast returns the RecurLast field if non-nil, zero value otherwise. + +### GetRecurLastOk + +`func (o *TaskOptions) GetRecurLastOk() (*int64, bool)` + +GetRecurLastOk returns a tuple with the RecurLast field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLast + +`func (o *TaskOptions) SetRecurLast(v int64)` + +SetRecurLast sets RecurLast field to given value. + +### HasRecurLast + +`func (o *TaskOptions) HasRecurLast() bool` + +HasRecurLast returns a boolean if a field has been set. + +### GetRecurNext + +`func (o *TaskOptions) GetRecurNext() int64` + +GetRecurNext returns the RecurNext field if non-nil, zero value otherwise. + +### GetRecurNextOk + +`func (o *TaskOptions) GetRecurNextOk() (*int64, bool)` + +GetRecurNextOk returns a tuple with the RecurNext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurNext + +`func (o *TaskOptions) SetRecurNext(v int64)` + +SetRecurNext sets RecurNext field to given value. + +### HasRecurNext + +`func (o *TaskOptions) HasRecurNext() bool` + +HasRecurNext returns a boolean if a field has been set. + +### GetRecurLastTaskId + +`func (o *TaskOptions) GetRecurLastTaskId() string` + +GetRecurLastTaskId returns the RecurLastTaskId field if non-nil, zero value otherwise. + +### GetRecurLastTaskIdOk + +`func (o *TaskOptions) GetRecurLastTaskIdOk() (*string, bool)` + +GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurLastTaskId + +`func (o *TaskOptions) SetRecurLastTaskId(v string)` + +SetRecurLastTaskId sets RecurLastTaskId field to given value. + +### HasRecurLastTaskId + +`func (o *TaskOptions) HasRecurLastTaskId() bool` + +HasRecurLastTaskId returns a boolean if a field has been set. + +### GetHostedZoneName + +`func (o *TaskOptions) GetHostedZoneName() string` + +GetHostedZoneName returns the HostedZoneName field if non-nil, zero value otherwise. + +### GetHostedZoneNameOk + +`func (o *TaskOptions) GetHostedZoneNameOk() (*string, bool)` + +GetHostedZoneNameOk returns a tuple with the HostedZoneName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostedZoneName + +`func (o *TaskOptions) SetHostedZoneName(v string)` + +SetHostedZoneName sets HostedZoneName field to given value. + +### HasHostedZoneName + +`func (o *TaskOptions) HasHostedZoneName() bool` + +HasHostedZoneName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/TenableIoCredentialFields.md b/go/docs/TenableIoCredentialFields.md new file mode 100644 index 0000000..0ac6ebc --- /dev/null +++ b/go/docs/TenableIoCredentialFields.md @@ -0,0 +1,93 @@ +# TenableIoCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | + +## Methods + +### NewTenableIoCredentialFields + +`func NewTenableIoCredentialFields(apiUrl string, accessKey string, secretKey string, ) *TenableIoCredentialFields` + +NewTenableIoCredentialFields instantiates a new TenableIoCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTenableIoCredentialFieldsWithDefaults + +`func NewTenableIoCredentialFieldsWithDefaults() *TenableIoCredentialFields` + +NewTenableIoCredentialFieldsWithDefaults instantiates a new TenableIoCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *TenableIoCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *TenableIoCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *TenableIoCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetAccessKey + +`func (o *TenableIoCredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *TenableIoCredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *TenableIoCredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *TenableIoCredentialFields) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *TenableIoCredentialFields) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *TenableIoCredentialFields) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/TenableScCredentialFields.md b/go/docs/TenableScCredentialFields.md new file mode 100644 index 0000000..4947675 --- /dev/null +++ b/go/docs/TenableScCredentialFields.md @@ -0,0 +1,145 @@ +# TenableScCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Insecure** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] + +## Methods + +### NewTenableScCredentialFields + +`func NewTenableScCredentialFields(apiUrl string, accessKey string, secretKey string, ) *TenableScCredentialFields` + +NewTenableScCredentialFields instantiates a new TenableScCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTenableScCredentialFieldsWithDefaults + +`func NewTenableScCredentialFieldsWithDefaults() *TenableScCredentialFields` + +NewTenableScCredentialFieldsWithDefaults instantiates a new TenableScCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *TenableScCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *TenableScCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *TenableScCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetAccessKey + +`func (o *TenableScCredentialFields) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *TenableScCredentialFields) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *TenableScCredentialFields) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *TenableScCredentialFields) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *TenableScCredentialFields) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *TenableScCredentialFields) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetInsecure + +`func (o *TenableScCredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *TenableScCredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *TenableScCredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *TenableScCredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *TenableScCredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *TenableScCredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *TenableScCredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *TenableScCredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Url.md b/go/docs/Url.md index 00199f8..f980a4c 100644 --- a/go/docs/Url.md +++ b/go/docs/Url.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] +**Url** | **string** | | ## Methods ### NewURL -`func NewURL() *URL` +`func NewURL(url string, ) *URL` NewURL instantiates a new URL object This constructor will assign default values to properties that have it defined, @@ -25,30 +25,25 @@ NewURLWithDefaults instantiates a new URL object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetId +### GetUrl -`func (o *URL) GetId() string` +`func (o *URL) GetUrl() string` -GetId returns the Id field if non-nil, zero value otherwise. +GetUrl returns the Url field if non-nil, zero value otherwise. -### GetIdOk +### GetUrlOk -`func (o *URL) GetIdOk() (*string, bool)` +`func (o *URL) GetUrlOk() (*string, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetId +### SetUrl -`func (o *URL) SetId(v string)` +`func (o *URL) SetUrl(v string)` -SetId sets Id field to given value. +SetUrl sets Url field to given value. -### HasId - -`func (o *URL) HasId() bool` - -HasId returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go/docs/User.md b/go/docs/User.md new file mode 100644 index 0000000..e33ac46 --- /dev/null +++ b/go/docs/User.md @@ -0,0 +1,659 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ClientId** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**ClientAdmin** | Pointer to **bool** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] +**PasswordEnabledAt** | Pointer to **int64** | | [optional] +**InviteTokenExpiration** | Pointer to **int64** | | [optional] +**ResetTokenExpiration** | Pointer to **int64** | | [optional] +**TermsAgreedAsOf** | Pointer to **int64** | | [optional] +**LastLoginIp** | Pointer to **NullableString** | | [optional] +**LastLoginAt** | Pointer to **int64** | | [optional] +**LastLoginUa** | Pointer to **string** | | [optional] +**LastActivityAt** | Pointer to **int64** | | [optional] +**SsoOnly** | Pointer to **bool** | | [optional] +**LoginFailures** | Pointer to **int64** | | [optional] +**Actions** | Pointer to **int64** | | [optional] +**LastActionAt** | Pointer to **int64** | | [optional] +**MfaEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewUser + +`func NewUser(id string, ) *User` + +NewUser instantiates a new User object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *User) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *User) SetId(v string)` + +SetId sets Id field to given value. + + +### GetClientId + +`func (o *User) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *User) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *User) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *User) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *User) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *User) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *User) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *User) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *User) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *User) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *User) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *User) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetName + +`func (o *User) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *User) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *User) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *User) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetFirstName + +`func (o *User) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *User) GetFirstNameOk() (*string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstName + +`func (o *User) SetFirstName(v string)` + +SetFirstName sets FirstName field to given value. + +### HasFirstName + +`func (o *User) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### GetLastName + +`func (o *User) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *User) GetLastNameOk() (*string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastName + +`func (o *User) SetLastName(v string)` + +SetLastName sets LastName field to given value. + +### HasLastName + +`func (o *User) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *User) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *User) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetClientAdmin + +`func (o *User) GetClientAdmin() bool` + +GetClientAdmin returns the ClientAdmin field if non-nil, zero value otherwise. + +### GetClientAdminOk + +`func (o *User) GetClientAdminOk() (*bool, bool)` + +GetClientAdminOk returns a tuple with the ClientAdmin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientAdmin + +`func (o *User) SetClientAdmin(v bool)` + +SetClientAdmin sets ClientAdmin field to given value. + +### HasClientAdmin + +`func (o *User) HasClientAdmin() bool` + +HasClientAdmin returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *User) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *User) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *User) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *User) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *User) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *User) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *User) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *User) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + +### GetPasswordEnabledAt + +`func (o *User) GetPasswordEnabledAt() int64` + +GetPasswordEnabledAt returns the PasswordEnabledAt field if non-nil, zero value otherwise. + +### GetPasswordEnabledAtOk + +`func (o *User) GetPasswordEnabledAtOk() (*int64, bool)` + +GetPasswordEnabledAtOk returns a tuple with the PasswordEnabledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordEnabledAt + +`func (o *User) SetPasswordEnabledAt(v int64)` + +SetPasswordEnabledAt sets PasswordEnabledAt field to given value. + +### HasPasswordEnabledAt + +`func (o *User) HasPasswordEnabledAt() bool` + +HasPasswordEnabledAt returns a boolean if a field has been set. + +### GetInviteTokenExpiration + +`func (o *User) GetInviteTokenExpiration() int64` + +GetInviteTokenExpiration returns the InviteTokenExpiration field if non-nil, zero value otherwise. + +### GetInviteTokenExpirationOk + +`func (o *User) GetInviteTokenExpirationOk() (*int64, bool)` + +GetInviteTokenExpirationOk returns a tuple with the InviteTokenExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInviteTokenExpiration + +`func (o *User) SetInviteTokenExpiration(v int64)` + +SetInviteTokenExpiration sets InviteTokenExpiration field to given value. + +### HasInviteTokenExpiration + +`func (o *User) HasInviteTokenExpiration() bool` + +HasInviteTokenExpiration returns a boolean if a field has been set. + +### GetResetTokenExpiration + +`func (o *User) GetResetTokenExpiration() int64` + +GetResetTokenExpiration returns the ResetTokenExpiration field if non-nil, zero value otherwise. + +### GetResetTokenExpirationOk + +`func (o *User) GetResetTokenExpirationOk() (*int64, bool)` + +GetResetTokenExpirationOk returns a tuple with the ResetTokenExpiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResetTokenExpiration + +`func (o *User) SetResetTokenExpiration(v int64)` + +SetResetTokenExpiration sets ResetTokenExpiration field to given value. + +### HasResetTokenExpiration + +`func (o *User) HasResetTokenExpiration() bool` + +HasResetTokenExpiration returns a boolean if a field has been set. + +### GetTermsAgreedAsOf + +`func (o *User) GetTermsAgreedAsOf() int64` + +GetTermsAgreedAsOf returns the TermsAgreedAsOf field if non-nil, zero value otherwise. + +### GetTermsAgreedAsOfOk + +`func (o *User) GetTermsAgreedAsOfOk() (*int64, bool)` + +GetTermsAgreedAsOfOk returns a tuple with the TermsAgreedAsOf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsAgreedAsOf + +`func (o *User) SetTermsAgreedAsOf(v int64)` + +SetTermsAgreedAsOf sets TermsAgreedAsOf field to given value. + +### HasTermsAgreedAsOf + +`func (o *User) HasTermsAgreedAsOf() bool` + +HasTermsAgreedAsOf returns a boolean if a field has been set. + +### GetLastLoginIp + +`func (o *User) GetLastLoginIp() string` + +GetLastLoginIp returns the LastLoginIp field if non-nil, zero value otherwise. + +### GetLastLoginIpOk + +`func (o *User) GetLastLoginIpOk() (*string, bool)` + +GetLastLoginIpOk returns a tuple with the LastLoginIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastLoginIp + +`func (o *User) SetLastLoginIp(v string)` + +SetLastLoginIp sets LastLoginIp field to given value. + +### HasLastLoginIp + +`func (o *User) HasLastLoginIp() bool` + +HasLastLoginIp returns a boolean if a field has been set. + +### SetLastLoginIpNil + +`func (o *User) SetLastLoginIpNil(b bool)` + + SetLastLoginIpNil sets the value for LastLoginIp to be an explicit nil + +### UnsetLastLoginIp +`func (o *User) UnsetLastLoginIp()` + +UnsetLastLoginIp ensures that no value is present for LastLoginIp, not even an explicit nil +### GetLastLoginAt + +`func (o *User) GetLastLoginAt() int64` + +GetLastLoginAt returns the LastLoginAt field if non-nil, zero value otherwise. + +### GetLastLoginAtOk + +`func (o *User) GetLastLoginAtOk() (*int64, bool)` + +GetLastLoginAtOk returns a tuple with the LastLoginAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastLoginAt + +`func (o *User) SetLastLoginAt(v int64)` + +SetLastLoginAt sets LastLoginAt field to given value. + +### HasLastLoginAt + +`func (o *User) HasLastLoginAt() bool` + +HasLastLoginAt returns a boolean if a field has been set. + +### GetLastLoginUa + +`func (o *User) GetLastLoginUa() string` + +GetLastLoginUa returns the LastLoginUa field if non-nil, zero value otherwise. + +### GetLastLoginUaOk + +`func (o *User) GetLastLoginUaOk() (*string, bool)` + +GetLastLoginUaOk returns a tuple with the LastLoginUa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastLoginUa + +`func (o *User) SetLastLoginUa(v string)` + +SetLastLoginUa sets LastLoginUa field to given value. + +### HasLastLoginUa + +`func (o *User) HasLastLoginUa() bool` + +HasLastLoginUa returns a boolean if a field has been set. + +### GetLastActivityAt + +`func (o *User) GetLastActivityAt() int64` + +GetLastActivityAt returns the LastActivityAt field if non-nil, zero value otherwise. + +### GetLastActivityAtOk + +`func (o *User) GetLastActivityAtOk() (*int64, bool)` + +GetLastActivityAtOk returns a tuple with the LastActivityAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastActivityAt + +`func (o *User) SetLastActivityAt(v int64)` + +SetLastActivityAt sets LastActivityAt field to given value. + +### HasLastActivityAt + +`func (o *User) HasLastActivityAt() bool` + +HasLastActivityAt returns a boolean if a field has been set. + +### GetSsoOnly + +`func (o *User) GetSsoOnly() bool` + +GetSsoOnly returns the SsoOnly field if non-nil, zero value otherwise. + +### GetSsoOnlyOk + +`func (o *User) GetSsoOnlyOk() (*bool, bool)` + +GetSsoOnlyOk returns a tuple with the SsoOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSsoOnly + +`func (o *User) SetSsoOnly(v bool)` + +SetSsoOnly sets SsoOnly field to given value. + +### HasSsoOnly + +`func (o *User) HasSsoOnly() bool` + +HasSsoOnly returns a boolean if a field has been set. + +### GetLoginFailures + +`func (o *User) GetLoginFailures() int64` + +GetLoginFailures returns the LoginFailures field if non-nil, zero value otherwise. + +### GetLoginFailuresOk + +`func (o *User) GetLoginFailuresOk() (*int64, bool)` + +GetLoginFailuresOk returns a tuple with the LoginFailures field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginFailures + +`func (o *User) SetLoginFailures(v int64)` + +SetLoginFailures sets LoginFailures field to given value. + +### HasLoginFailures + +`func (o *User) HasLoginFailures() bool` + +HasLoginFailures returns a boolean if a field has been set. + +### GetActions + +`func (o *User) GetActions() int64` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *User) GetActionsOk() (*int64, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *User) SetActions(v int64)` + +SetActions sets Actions field to given value. + +### HasActions + +`func (o *User) HasActions() bool` + +HasActions returns a boolean if a field has been set. + +### GetLastActionAt + +`func (o *User) GetLastActionAt() int64` + +GetLastActionAt returns the LastActionAt field if non-nil, zero value otherwise. + +### GetLastActionAtOk + +`func (o *User) GetLastActionAtOk() (*int64, bool)` + +GetLastActionAtOk returns a tuple with the LastActionAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastActionAt + +`func (o *User) SetLastActionAt(v int64)` + +SetLastActionAt sets LastActionAt field to given value. + +### HasLastActionAt + +`func (o *User) HasLastActionAt() bool` + +HasLastActionAt returns a boolean if a field has been set. + +### GetMfaEnabled + +`func (o *User) GetMfaEnabled() bool` + +GetMfaEnabled returns the MfaEnabled field if non-nil, zero value otherwise. + +### GetMfaEnabledOk + +`func (o *User) GetMfaEnabledOk() (*bool, bool)` + +GetMfaEnabledOk returns a tuple with the MfaEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaEnabled + +`func (o *User) SetMfaEnabled(v bool)` + +SetMfaEnabled sets MfaEnabled field to given value. + +### HasMfaEnabled + +`func (o *User) HasMfaEnabled() bool` + +HasMfaEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/UserInviteOptions.md b/go/docs/UserInviteOptions.md new file mode 100644 index 0000000..e59eef7 --- /dev/null +++ b/go/docs/UserInviteOptions.md @@ -0,0 +1,238 @@ +# UserInviteOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**ClientAdmin** | Pointer to **bool** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] +**Subject** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewUserInviteOptions + +`func NewUserInviteOptions() *UserInviteOptions` + +NewUserInviteOptions instantiates a new UserInviteOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserInviteOptionsWithDefaults + +`func NewUserInviteOptionsWithDefaults() *UserInviteOptions` + +NewUserInviteOptionsWithDefaults instantiates a new UserInviteOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFirstName + +`func (o *UserInviteOptions) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *UserInviteOptions) GetFirstNameOk() (*string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstName + +`func (o *UserInviteOptions) SetFirstName(v string)` + +SetFirstName sets FirstName field to given value. + +### HasFirstName + +`func (o *UserInviteOptions) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### GetLastName + +`func (o *UserInviteOptions) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *UserInviteOptions) GetLastNameOk() (*string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastName + +`func (o *UserInviteOptions) SetLastName(v string)` + +SetLastName sets LastName field to given value. + +### HasLastName + +`func (o *UserInviteOptions) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### GetEmail + +`func (o *UserInviteOptions) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UserInviteOptions) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UserInviteOptions) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *UserInviteOptions) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetClientAdmin + +`func (o *UserInviteOptions) GetClientAdmin() bool` + +GetClientAdmin returns the ClientAdmin field if non-nil, zero value otherwise. + +### GetClientAdminOk + +`func (o *UserInviteOptions) GetClientAdminOk() (*bool, bool)` + +GetClientAdminOk returns a tuple with the ClientAdmin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientAdmin + +`func (o *UserInviteOptions) SetClientAdmin(v bool)` + +SetClientAdmin sets ClientAdmin field to given value. + +### HasClientAdmin + +`func (o *UserInviteOptions) HasClientAdmin() bool` + +HasClientAdmin returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *UserInviteOptions) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *UserInviteOptions) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *UserInviteOptions) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *UserInviteOptions) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *UserInviteOptions) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *UserInviteOptions) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *UserInviteOptions) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *UserInviteOptions) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + +### GetSubject + +`func (o *UserInviteOptions) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *UserInviteOptions) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *UserInviteOptions) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *UserInviteOptions) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + +### GetMessage + +`func (o *UserInviteOptions) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UserInviteOptions) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UserInviteOptions) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UserInviteOptions) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/UserOptions.md b/go/docs/UserOptions.md new file mode 100644 index 0000000..7e325b0 --- /dev/null +++ b/go/docs/UserOptions.md @@ -0,0 +1,186 @@ +# UserOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**ClientAdmin** | Pointer to **bool** | | [optional] +**OrgDefaultRole** | Pointer to **string** | | [optional] +**OrgRoles** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewUserOptions + +`func NewUserOptions() *UserOptions` + +NewUserOptions instantiates a new UserOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserOptionsWithDefaults + +`func NewUserOptionsWithDefaults() *UserOptions` + +NewUserOptionsWithDefaults instantiates a new UserOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFirstName + +`func (o *UserOptions) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *UserOptions) GetFirstNameOk() (*string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstName + +`func (o *UserOptions) SetFirstName(v string)` + +SetFirstName sets FirstName field to given value. + +### HasFirstName + +`func (o *UserOptions) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### GetLastName + +`func (o *UserOptions) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *UserOptions) GetLastNameOk() (*string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastName + +`func (o *UserOptions) SetLastName(v string)` + +SetLastName sets LastName field to given value. + +### HasLastName + +`func (o *UserOptions) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### GetEmail + +`func (o *UserOptions) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UserOptions) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UserOptions) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *UserOptions) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetClientAdmin + +`func (o *UserOptions) GetClientAdmin() bool` + +GetClientAdmin returns the ClientAdmin field if non-nil, zero value otherwise. + +### GetClientAdminOk + +`func (o *UserOptions) GetClientAdminOk() (*bool, bool)` + +GetClientAdminOk returns a tuple with the ClientAdmin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientAdmin + +`func (o *UserOptions) SetClientAdmin(v bool)` + +SetClientAdmin sets ClientAdmin field to given value. + +### HasClientAdmin + +`func (o *UserOptions) HasClientAdmin() bool` + +HasClientAdmin returns a boolean if a field has been set. + +### GetOrgDefaultRole + +`func (o *UserOptions) GetOrgDefaultRole() string` + +GetOrgDefaultRole returns the OrgDefaultRole field if non-nil, zero value otherwise. + +### GetOrgDefaultRoleOk + +`func (o *UserOptions) GetOrgDefaultRoleOk() (*string, bool)` + +GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgDefaultRole + +`func (o *UserOptions) SetOrgDefaultRole(v string)` + +SetOrgDefaultRole sets OrgDefaultRole field to given value. + +### HasOrgDefaultRole + +`func (o *UserOptions) HasOrgDefaultRole() bool` + +HasOrgDefaultRole returns a boolean if a field has been set. + +### GetOrgRoles + +`func (o *UserOptions) GetOrgRoles() map[string]interface{}` + +GetOrgRoles returns the OrgRoles field if non-nil, zero value otherwise. + +### GetOrgRolesOk + +`func (o *UserOptions) GetOrgRolesOk() (*map[string]interface{}, bool)` + +GetOrgRolesOk returns a tuple with the OrgRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgRoles + +`func (o *UserOptions) SetOrgRoles(v map[string]interface{})` + +SetOrgRoles sets OrgRoles field to given value. + +### HasOrgRoles + +`func (o *UserOptions) HasOrgRoles() bool` + +HasOrgRoles returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/VMwareCredentialFields.md b/go/docs/VMwareCredentialFields.md new file mode 100644 index 0000000..3ea9d75 --- /dev/null +++ b/go/docs/VMwareCredentialFields.md @@ -0,0 +1,124 @@ +# VMwareCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Password** | **string** | | +**Insecure** | Pointer to **string** | | [optional] +**Thumbprints** | Pointer to **string** | | [optional] + +## Methods + +### NewVMwareCredentialFields + +`func NewVMwareCredentialFields(username string, password string, ) *VMwareCredentialFields` + +NewVMwareCredentialFields instantiates a new VMwareCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVMwareCredentialFieldsWithDefaults + +`func NewVMwareCredentialFieldsWithDefaults() *VMwareCredentialFields` + +NewVMwareCredentialFieldsWithDefaults instantiates a new VMwareCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsername + +`func (o *VMwareCredentialFields) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *VMwareCredentialFields) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *VMwareCredentialFields) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *VMwareCredentialFields) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *VMwareCredentialFields) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *VMwareCredentialFields) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetInsecure + +`func (o *VMwareCredentialFields) GetInsecure() string` + +GetInsecure returns the Insecure field if non-nil, zero value otherwise. + +### GetInsecureOk + +`func (o *VMwareCredentialFields) GetInsecureOk() (*string, bool)` + +GetInsecureOk returns a tuple with the Insecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsecure + +`func (o *VMwareCredentialFields) SetInsecure(v string)` + +SetInsecure sets Insecure field to given value. + +### HasInsecure + +`func (o *VMwareCredentialFields) HasInsecure() bool` + +HasInsecure returns a boolean if a field has been set. + +### GetThumbprints + +`func (o *VMwareCredentialFields) GetThumbprints() string` + +GetThumbprints returns the Thumbprints field if non-nil, zero value otherwise. + +### GetThumbprintsOk + +`func (o *VMwareCredentialFields) GetThumbprintsOk() (*string, bool)` + +GetThumbprintsOk returns a tuple with the Thumbprints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThumbprints + +`func (o *VMwareCredentialFields) SetThumbprints(v string)` + +SetThumbprints sets Thumbprints field to given value. + +### HasThumbprints + +`func (o *VMwareCredentialFields) HasThumbprints() bool` + +HasThumbprints returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Vulnerability.md b/go/docs/Vulnerability.md new file mode 100644 index 0000000..78bc5c9 --- /dev/null +++ b/go/docs/Vulnerability.md @@ -0,0 +1,1907 @@ +# Vulnerability + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VulnerabilityId** | Pointer to **string** | | [optional] +**VulnerabilityAssetId** | Pointer to **string** | | [optional] +**VulnerabilityOrganizationId** | Pointer to **string** | | [optional] +**VulnerabilitySourceId** | Pointer to **int32** | | [optional] +**VulnerabilityCreatedAt** | Pointer to **int64** | | [optional] +**VulnerabilityUpdatedAt** | Pointer to **int64** | | [optional] +**VulnerabilityServiceAddress** | Pointer to **NullableString** | | [optional] +**VulnerabilityServiceTransport** | Pointer to **string** | | [optional] +**VulnerabilityServicePort** | Pointer to **int64** | | [optional] +**VulnerabilityCpe23** | Pointer to **string** | | [optional] +**VulnerabilityVulnId** | Pointer to **string** | | [optional] +**VulnerabilityCategory** | Pointer to **string** | | [optional] +**VulnerabilityName** | Pointer to **string** | | [optional] +**VulnerabilityDescription** | Pointer to **string** | | [optional] +**VulnerabilitySolution** | Pointer to **string** | | [optional] +**VulnerabilityCve** | Pointer to **string** | | [optional] +**VulnerabilityCvss2BaseScore** | Pointer to **float64** | | [optional] +**VulnerabilityCvss2TemporalScore** | Pointer to **float64** | | [optional] +**VulnerabilityCvss3BaseScore** | Pointer to **float64** | | [optional] +**VulnerabilityCvss3TemporalScore** | Pointer to **float64** | | [optional] +**VulnerabilitySeverity** | Pointer to **string** | | [optional] +**VulnerabilitySeverityScore** | Pointer to **float64** | | [optional] +**VulnerabilityRisk** | Pointer to **string** | | [optional] +**VulnerabilityRiskScore** | Pointer to **float64** | | [optional] +**VulnerabilityPublishedAt** | Pointer to **int64** | | [optional] +**VulnerabilityFirstDetectedAt** | Pointer to **int64** | | [optional] +**VulnerabilityLastDetectedAt** | Pointer to **int64** | | [optional] +**VulnerabilityAttributes** | Pointer to **map[string]string** | | [optional] +**Id** | **string** | | +**CreatedAt** | Pointer to **int64** | | [optional] +**UpdatedAt** | Pointer to **int64** | | [optional] +**OrganizationId** | Pointer to **string** | | [optional] +**SiteId** | Pointer to **string** | | [optional] +**Alive** | Pointer to **bool** | | [optional] +**FirstSeen** | Pointer to **int64** | | [optional] +**LastSeen** | Pointer to **int64** | | [optional] +**DetectedBy** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Os** | Pointer to **string** | | [optional] +**OsVersion** | Pointer to **string** | | [optional] +**Hw** | Pointer to **string** | | [optional] +**Addresses** | Pointer to **[]string** | | [optional] +**AddressesExtra** | Pointer to **[]string** | | [optional] +**Macs** | Pointer to **[]string** | | [optional] +**MacVendors** | Pointer to **[]string** | | [optional] +**Names** | Pointer to **[]string** | | [optional] +**Domains** | Pointer to **[]string** | | [optional] +**ServiceCount** | Pointer to **int64** | | [optional] +**ServiceCountTcp** | Pointer to **int64** | | [optional] +**ServiceCountUdp** | Pointer to **int64** | | [optional] +**ServiceCountArp** | Pointer to **int64** | | [optional] +**ServiceCountIcmp** | Pointer to **int64** | | [optional] +**LowestTtl** | Pointer to **int64** | | [optional] +**LowestRtt** | Pointer to **int64** | | [optional] +**LastAgentId** | Pointer to **string** | | [optional] +**LastTaskId** | Pointer to **string** | | [optional] +**NewestMac** | Pointer to **string** | | [optional] +**NewestMacVendor** | Pointer to **string** | | [optional] +**NewestMacAge** | Pointer to **int64** | | [optional] +**Comments** | Pointer to **string** | | [optional] +**ServicePortsTcp** | Pointer to **[]string** | | [optional] +**ServicePortsUdp** | Pointer to **[]string** | | [optional] +**ServicePortsProtocols** | Pointer to **[]string** | | [optional] +**ServicePortsProducts** | Pointer to **[]string** | | [optional] +**OrgName** | Pointer to **string** | | [optional] +**SiteName** | Pointer to **string** | | [optional] +**AgentName** | Pointer to **string** | | [optional] +**Tags** | Pointer to **map[string]string** | | [optional] +**Services** | Pointer to **map[string]map[string]string** | | [optional] +**Rtts** | Pointer to **map[string]interface{}** | | [optional] +**Credentials** | Pointer to **map[string]map[string]bool** | | [optional] +**Attributes** | Pointer to **map[string]string** | | [optional] + +## Methods + +### NewVulnerability + +`func NewVulnerability(id string, ) *Vulnerability` + +NewVulnerability instantiates a new Vulnerability object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityWithDefaults + +`func NewVulnerabilityWithDefaults() *Vulnerability` + +NewVulnerabilityWithDefaults instantiates a new Vulnerability object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVulnerabilityId + +`func (o *Vulnerability) GetVulnerabilityId() string` + +GetVulnerabilityId returns the VulnerabilityId field if non-nil, zero value otherwise. + +### GetVulnerabilityIdOk + +`func (o *Vulnerability) GetVulnerabilityIdOk() (*string, bool)` + +GetVulnerabilityIdOk returns a tuple with the VulnerabilityId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityId + +`func (o *Vulnerability) SetVulnerabilityId(v string)` + +SetVulnerabilityId sets VulnerabilityId field to given value. + +### HasVulnerabilityId + +`func (o *Vulnerability) HasVulnerabilityId() bool` + +HasVulnerabilityId returns a boolean if a field has been set. + +### GetVulnerabilityAssetId + +`func (o *Vulnerability) GetVulnerabilityAssetId() string` + +GetVulnerabilityAssetId returns the VulnerabilityAssetId field if non-nil, zero value otherwise. + +### GetVulnerabilityAssetIdOk + +`func (o *Vulnerability) GetVulnerabilityAssetIdOk() (*string, bool)` + +GetVulnerabilityAssetIdOk returns a tuple with the VulnerabilityAssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityAssetId + +`func (o *Vulnerability) SetVulnerabilityAssetId(v string)` + +SetVulnerabilityAssetId sets VulnerabilityAssetId field to given value. + +### HasVulnerabilityAssetId + +`func (o *Vulnerability) HasVulnerabilityAssetId() bool` + +HasVulnerabilityAssetId returns a boolean if a field has been set. + +### GetVulnerabilityOrganizationId + +`func (o *Vulnerability) GetVulnerabilityOrganizationId() string` + +GetVulnerabilityOrganizationId returns the VulnerabilityOrganizationId field if non-nil, zero value otherwise. + +### GetVulnerabilityOrganizationIdOk + +`func (o *Vulnerability) GetVulnerabilityOrganizationIdOk() (*string, bool)` + +GetVulnerabilityOrganizationIdOk returns a tuple with the VulnerabilityOrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityOrganizationId + +`func (o *Vulnerability) SetVulnerabilityOrganizationId(v string)` + +SetVulnerabilityOrganizationId sets VulnerabilityOrganizationId field to given value. + +### HasVulnerabilityOrganizationId + +`func (o *Vulnerability) HasVulnerabilityOrganizationId() bool` + +HasVulnerabilityOrganizationId returns a boolean if a field has been set. + +### GetVulnerabilitySourceId + +`func (o *Vulnerability) GetVulnerabilitySourceId() int32` + +GetVulnerabilitySourceId returns the VulnerabilitySourceId field if non-nil, zero value otherwise. + +### GetVulnerabilitySourceIdOk + +`func (o *Vulnerability) GetVulnerabilitySourceIdOk() (*int32, bool)` + +GetVulnerabilitySourceIdOk returns a tuple with the VulnerabilitySourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilitySourceId + +`func (o *Vulnerability) SetVulnerabilitySourceId(v int32)` + +SetVulnerabilitySourceId sets VulnerabilitySourceId field to given value. + +### HasVulnerabilitySourceId + +`func (o *Vulnerability) HasVulnerabilitySourceId() bool` + +HasVulnerabilitySourceId returns a boolean if a field has been set. + +### GetVulnerabilityCreatedAt + +`func (o *Vulnerability) GetVulnerabilityCreatedAt() int64` + +GetVulnerabilityCreatedAt returns the VulnerabilityCreatedAt field if non-nil, zero value otherwise. + +### GetVulnerabilityCreatedAtOk + +`func (o *Vulnerability) GetVulnerabilityCreatedAtOk() (*int64, bool)` + +GetVulnerabilityCreatedAtOk returns a tuple with the VulnerabilityCreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCreatedAt + +`func (o *Vulnerability) SetVulnerabilityCreatedAt(v int64)` + +SetVulnerabilityCreatedAt sets VulnerabilityCreatedAt field to given value. + +### HasVulnerabilityCreatedAt + +`func (o *Vulnerability) HasVulnerabilityCreatedAt() bool` + +HasVulnerabilityCreatedAt returns a boolean if a field has been set. + +### GetVulnerabilityUpdatedAt + +`func (o *Vulnerability) GetVulnerabilityUpdatedAt() int64` + +GetVulnerabilityUpdatedAt returns the VulnerabilityUpdatedAt field if non-nil, zero value otherwise. + +### GetVulnerabilityUpdatedAtOk + +`func (o *Vulnerability) GetVulnerabilityUpdatedAtOk() (*int64, bool)` + +GetVulnerabilityUpdatedAtOk returns a tuple with the VulnerabilityUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityUpdatedAt + +`func (o *Vulnerability) SetVulnerabilityUpdatedAt(v int64)` + +SetVulnerabilityUpdatedAt sets VulnerabilityUpdatedAt field to given value. + +### HasVulnerabilityUpdatedAt + +`func (o *Vulnerability) HasVulnerabilityUpdatedAt() bool` + +HasVulnerabilityUpdatedAt returns a boolean if a field has been set. + +### GetVulnerabilityServiceAddress + +`func (o *Vulnerability) GetVulnerabilityServiceAddress() string` + +GetVulnerabilityServiceAddress returns the VulnerabilityServiceAddress field if non-nil, zero value otherwise. + +### GetVulnerabilityServiceAddressOk + +`func (o *Vulnerability) GetVulnerabilityServiceAddressOk() (*string, bool)` + +GetVulnerabilityServiceAddressOk returns a tuple with the VulnerabilityServiceAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityServiceAddress + +`func (o *Vulnerability) SetVulnerabilityServiceAddress(v string)` + +SetVulnerabilityServiceAddress sets VulnerabilityServiceAddress field to given value. + +### HasVulnerabilityServiceAddress + +`func (o *Vulnerability) HasVulnerabilityServiceAddress() bool` + +HasVulnerabilityServiceAddress returns a boolean if a field has been set. + +### SetVulnerabilityServiceAddressNil + +`func (o *Vulnerability) SetVulnerabilityServiceAddressNil(b bool)` + + SetVulnerabilityServiceAddressNil sets the value for VulnerabilityServiceAddress to be an explicit nil + +### UnsetVulnerabilityServiceAddress +`func (o *Vulnerability) UnsetVulnerabilityServiceAddress()` + +UnsetVulnerabilityServiceAddress ensures that no value is present for VulnerabilityServiceAddress, not even an explicit nil +### GetVulnerabilityServiceTransport + +`func (o *Vulnerability) GetVulnerabilityServiceTransport() string` + +GetVulnerabilityServiceTransport returns the VulnerabilityServiceTransport field if non-nil, zero value otherwise. + +### GetVulnerabilityServiceTransportOk + +`func (o *Vulnerability) GetVulnerabilityServiceTransportOk() (*string, bool)` + +GetVulnerabilityServiceTransportOk returns a tuple with the VulnerabilityServiceTransport field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityServiceTransport + +`func (o *Vulnerability) SetVulnerabilityServiceTransport(v string)` + +SetVulnerabilityServiceTransport sets VulnerabilityServiceTransport field to given value. + +### HasVulnerabilityServiceTransport + +`func (o *Vulnerability) HasVulnerabilityServiceTransport() bool` + +HasVulnerabilityServiceTransport returns a boolean if a field has been set. + +### GetVulnerabilityServicePort + +`func (o *Vulnerability) GetVulnerabilityServicePort() int64` + +GetVulnerabilityServicePort returns the VulnerabilityServicePort field if non-nil, zero value otherwise. + +### GetVulnerabilityServicePortOk + +`func (o *Vulnerability) GetVulnerabilityServicePortOk() (*int64, bool)` + +GetVulnerabilityServicePortOk returns a tuple with the VulnerabilityServicePort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityServicePort + +`func (o *Vulnerability) SetVulnerabilityServicePort(v int64)` + +SetVulnerabilityServicePort sets VulnerabilityServicePort field to given value. + +### HasVulnerabilityServicePort + +`func (o *Vulnerability) HasVulnerabilityServicePort() bool` + +HasVulnerabilityServicePort returns a boolean if a field has been set. + +### GetVulnerabilityCpe23 + +`func (o *Vulnerability) GetVulnerabilityCpe23() string` + +GetVulnerabilityCpe23 returns the VulnerabilityCpe23 field if non-nil, zero value otherwise. + +### GetVulnerabilityCpe23Ok + +`func (o *Vulnerability) GetVulnerabilityCpe23Ok() (*string, bool)` + +GetVulnerabilityCpe23Ok returns a tuple with the VulnerabilityCpe23 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCpe23 + +`func (o *Vulnerability) SetVulnerabilityCpe23(v string)` + +SetVulnerabilityCpe23 sets VulnerabilityCpe23 field to given value. + +### HasVulnerabilityCpe23 + +`func (o *Vulnerability) HasVulnerabilityCpe23() bool` + +HasVulnerabilityCpe23 returns a boolean if a field has been set. + +### GetVulnerabilityVulnId + +`func (o *Vulnerability) GetVulnerabilityVulnId() string` + +GetVulnerabilityVulnId returns the VulnerabilityVulnId field if non-nil, zero value otherwise. + +### GetVulnerabilityVulnIdOk + +`func (o *Vulnerability) GetVulnerabilityVulnIdOk() (*string, bool)` + +GetVulnerabilityVulnIdOk returns a tuple with the VulnerabilityVulnId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityVulnId + +`func (o *Vulnerability) SetVulnerabilityVulnId(v string)` + +SetVulnerabilityVulnId sets VulnerabilityVulnId field to given value. + +### HasVulnerabilityVulnId + +`func (o *Vulnerability) HasVulnerabilityVulnId() bool` + +HasVulnerabilityVulnId returns a boolean if a field has been set. + +### GetVulnerabilityCategory + +`func (o *Vulnerability) GetVulnerabilityCategory() string` + +GetVulnerabilityCategory returns the VulnerabilityCategory field if non-nil, zero value otherwise. + +### GetVulnerabilityCategoryOk + +`func (o *Vulnerability) GetVulnerabilityCategoryOk() (*string, bool)` + +GetVulnerabilityCategoryOk returns a tuple with the VulnerabilityCategory field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCategory + +`func (o *Vulnerability) SetVulnerabilityCategory(v string)` + +SetVulnerabilityCategory sets VulnerabilityCategory field to given value. + +### HasVulnerabilityCategory + +`func (o *Vulnerability) HasVulnerabilityCategory() bool` + +HasVulnerabilityCategory returns a boolean if a field has been set. + +### GetVulnerabilityName + +`func (o *Vulnerability) GetVulnerabilityName() string` + +GetVulnerabilityName returns the VulnerabilityName field if non-nil, zero value otherwise. + +### GetVulnerabilityNameOk + +`func (o *Vulnerability) GetVulnerabilityNameOk() (*string, bool)` + +GetVulnerabilityNameOk returns a tuple with the VulnerabilityName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityName + +`func (o *Vulnerability) SetVulnerabilityName(v string)` + +SetVulnerabilityName sets VulnerabilityName field to given value. + +### HasVulnerabilityName + +`func (o *Vulnerability) HasVulnerabilityName() bool` + +HasVulnerabilityName returns a boolean if a field has been set. + +### GetVulnerabilityDescription + +`func (o *Vulnerability) GetVulnerabilityDescription() string` + +GetVulnerabilityDescription returns the VulnerabilityDescription field if non-nil, zero value otherwise. + +### GetVulnerabilityDescriptionOk + +`func (o *Vulnerability) GetVulnerabilityDescriptionOk() (*string, bool)` + +GetVulnerabilityDescriptionOk returns a tuple with the VulnerabilityDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityDescription + +`func (o *Vulnerability) SetVulnerabilityDescription(v string)` + +SetVulnerabilityDescription sets VulnerabilityDescription field to given value. + +### HasVulnerabilityDescription + +`func (o *Vulnerability) HasVulnerabilityDescription() bool` + +HasVulnerabilityDescription returns a boolean if a field has been set. + +### GetVulnerabilitySolution + +`func (o *Vulnerability) GetVulnerabilitySolution() string` + +GetVulnerabilitySolution returns the VulnerabilitySolution field if non-nil, zero value otherwise. + +### GetVulnerabilitySolutionOk + +`func (o *Vulnerability) GetVulnerabilitySolutionOk() (*string, bool)` + +GetVulnerabilitySolutionOk returns a tuple with the VulnerabilitySolution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilitySolution + +`func (o *Vulnerability) SetVulnerabilitySolution(v string)` + +SetVulnerabilitySolution sets VulnerabilitySolution field to given value. + +### HasVulnerabilitySolution + +`func (o *Vulnerability) HasVulnerabilitySolution() bool` + +HasVulnerabilitySolution returns a boolean if a field has been set. + +### GetVulnerabilityCve + +`func (o *Vulnerability) GetVulnerabilityCve() string` + +GetVulnerabilityCve returns the VulnerabilityCve field if non-nil, zero value otherwise. + +### GetVulnerabilityCveOk + +`func (o *Vulnerability) GetVulnerabilityCveOk() (*string, bool)` + +GetVulnerabilityCveOk returns a tuple with the VulnerabilityCve field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCve + +`func (o *Vulnerability) SetVulnerabilityCve(v string)` + +SetVulnerabilityCve sets VulnerabilityCve field to given value. + +### HasVulnerabilityCve + +`func (o *Vulnerability) HasVulnerabilityCve() bool` + +HasVulnerabilityCve returns a boolean if a field has been set. + +### GetVulnerabilityCvss2BaseScore + +`func (o *Vulnerability) GetVulnerabilityCvss2BaseScore() float64` + +GetVulnerabilityCvss2BaseScore returns the VulnerabilityCvss2BaseScore field if non-nil, zero value otherwise. + +### GetVulnerabilityCvss2BaseScoreOk + +`func (o *Vulnerability) GetVulnerabilityCvss2BaseScoreOk() (*float64, bool)` + +GetVulnerabilityCvss2BaseScoreOk returns a tuple with the VulnerabilityCvss2BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCvss2BaseScore + +`func (o *Vulnerability) SetVulnerabilityCvss2BaseScore(v float64)` + +SetVulnerabilityCvss2BaseScore sets VulnerabilityCvss2BaseScore field to given value. + +### HasVulnerabilityCvss2BaseScore + +`func (o *Vulnerability) HasVulnerabilityCvss2BaseScore() bool` + +HasVulnerabilityCvss2BaseScore returns a boolean if a field has been set. + +### GetVulnerabilityCvss2TemporalScore + +`func (o *Vulnerability) GetVulnerabilityCvss2TemporalScore() float64` + +GetVulnerabilityCvss2TemporalScore returns the VulnerabilityCvss2TemporalScore field if non-nil, zero value otherwise. + +### GetVulnerabilityCvss2TemporalScoreOk + +`func (o *Vulnerability) GetVulnerabilityCvss2TemporalScoreOk() (*float64, bool)` + +GetVulnerabilityCvss2TemporalScoreOk returns a tuple with the VulnerabilityCvss2TemporalScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCvss2TemporalScore + +`func (o *Vulnerability) SetVulnerabilityCvss2TemporalScore(v float64)` + +SetVulnerabilityCvss2TemporalScore sets VulnerabilityCvss2TemporalScore field to given value. + +### HasVulnerabilityCvss2TemporalScore + +`func (o *Vulnerability) HasVulnerabilityCvss2TemporalScore() bool` + +HasVulnerabilityCvss2TemporalScore returns a boolean if a field has been set. + +### GetVulnerabilityCvss3BaseScore + +`func (o *Vulnerability) GetVulnerabilityCvss3BaseScore() float64` + +GetVulnerabilityCvss3BaseScore returns the VulnerabilityCvss3BaseScore field if non-nil, zero value otherwise. + +### GetVulnerabilityCvss3BaseScoreOk + +`func (o *Vulnerability) GetVulnerabilityCvss3BaseScoreOk() (*float64, bool)` + +GetVulnerabilityCvss3BaseScoreOk returns a tuple with the VulnerabilityCvss3BaseScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCvss3BaseScore + +`func (o *Vulnerability) SetVulnerabilityCvss3BaseScore(v float64)` + +SetVulnerabilityCvss3BaseScore sets VulnerabilityCvss3BaseScore field to given value. + +### HasVulnerabilityCvss3BaseScore + +`func (o *Vulnerability) HasVulnerabilityCvss3BaseScore() bool` + +HasVulnerabilityCvss3BaseScore returns a boolean if a field has been set. + +### GetVulnerabilityCvss3TemporalScore + +`func (o *Vulnerability) GetVulnerabilityCvss3TemporalScore() float64` + +GetVulnerabilityCvss3TemporalScore returns the VulnerabilityCvss3TemporalScore field if non-nil, zero value otherwise. + +### GetVulnerabilityCvss3TemporalScoreOk + +`func (o *Vulnerability) GetVulnerabilityCvss3TemporalScoreOk() (*float64, bool)` + +GetVulnerabilityCvss3TemporalScoreOk returns a tuple with the VulnerabilityCvss3TemporalScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityCvss3TemporalScore + +`func (o *Vulnerability) SetVulnerabilityCvss3TemporalScore(v float64)` + +SetVulnerabilityCvss3TemporalScore sets VulnerabilityCvss3TemporalScore field to given value. + +### HasVulnerabilityCvss3TemporalScore + +`func (o *Vulnerability) HasVulnerabilityCvss3TemporalScore() bool` + +HasVulnerabilityCvss3TemporalScore returns a boolean if a field has been set. + +### GetVulnerabilitySeverity + +`func (o *Vulnerability) GetVulnerabilitySeverity() string` + +GetVulnerabilitySeverity returns the VulnerabilitySeverity field if non-nil, zero value otherwise. + +### GetVulnerabilitySeverityOk + +`func (o *Vulnerability) GetVulnerabilitySeverityOk() (*string, bool)` + +GetVulnerabilitySeverityOk returns a tuple with the VulnerabilitySeverity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilitySeverity + +`func (o *Vulnerability) SetVulnerabilitySeverity(v string)` + +SetVulnerabilitySeverity sets VulnerabilitySeverity field to given value. + +### HasVulnerabilitySeverity + +`func (o *Vulnerability) HasVulnerabilitySeverity() bool` + +HasVulnerabilitySeverity returns a boolean if a field has been set. + +### GetVulnerabilitySeverityScore + +`func (o *Vulnerability) GetVulnerabilitySeverityScore() float64` + +GetVulnerabilitySeverityScore returns the VulnerabilitySeverityScore field if non-nil, zero value otherwise. + +### GetVulnerabilitySeverityScoreOk + +`func (o *Vulnerability) GetVulnerabilitySeverityScoreOk() (*float64, bool)` + +GetVulnerabilitySeverityScoreOk returns a tuple with the VulnerabilitySeverityScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilitySeverityScore + +`func (o *Vulnerability) SetVulnerabilitySeverityScore(v float64)` + +SetVulnerabilitySeverityScore sets VulnerabilitySeverityScore field to given value. + +### HasVulnerabilitySeverityScore + +`func (o *Vulnerability) HasVulnerabilitySeverityScore() bool` + +HasVulnerabilitySeverityScore returns a boolean if a field has been set. + +### GetVulnerabilityRisk + +`func (o *Vulnerability) GetVulnerabilityRisk() string` + +GetVulnerabilityRisk returns the VulnerabilityRisk field if non-nil, zero value otherwise. + +### GetVulnerabilityRiskOk + +`func (o *Vulnerability) GetVulnerabilityRiskOk() (*string, bool)` + +GetVulnerabilityRiskOk returns a tuple with the VulnerabilityRisk field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityRisk + +`func (o *Vulnerability) SetVulnerabilityRisk(v string)` + +SetVulnerabilityRisk sets VulnerabilityRisk field to given value. + +### HasVulnerabilityRisk + +`func (o *Vulnerability) HasVulnerabilityRisk() bool` + +HasVulnerabilityRisk returns a boolean if a field has been set. + +### GetVulnerabilityRiskScore + +`func (o *Vulnerability) GetVulnerabilityRiskScore() float64` + +GetVulnerabilityRiskScore returns the VulnerabilityRiskScore field if non-nil, zero value otherwise. + +### GetVulnerabilityRiskScoreOk + +`func (o *Vulnerability) GetVulnerabilityRiskScoreOk() (*float64, bool)` + +GetVulnerabilityRiskScoreOk returns a tuple with the VulnerabilityRiskScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityRiskScore + +`func (o *Vulnerability) SetVulnerabilityRiskScore(v float64)` + +SetVulnerabilityRiskScore sets VulnerabilityRiskScore field to given value. + +### HasVulnerabilityRiskScore + +`func (o *Vulnerability) HasVulnerabilityRiskScore() bool` + +HasVulnerabilityRiskScore returns a boolean if a field has been set. + +### GetVulnerabilityPublishedAt + +`func (o *Vulnerability) GetVulnerabilityPublishedAt() int64` + +GetVulnerabilityPublishedAt returns the VulnerabilityPublishedAt field if non-nil, zero value otherwise. + +### GetVulnerabilityPublishedAtOk + +`func (o *Vulnerability) GetVulnerabilityPublishedAtOk() (*int64, bool)` + +GetVulnerabilityPublishedAtOk returns a tuple with the VulnerabilityPublishedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityPublishedAt + +`func (o *Vulnerability) SetVulnerabilityPublishedAt(v int64)` + +SetVulnerabilityPublishedAt sets VulnerabilityPublishedAt field to given value. + +### HasVulnerabilityPublishedAt + +`func (o *Vulnerability) HasVulnerabilityPublishedAt() bool` + +HasVulnerabilityPublishedAt returns a boolean if a field has been set. + +### GetVulnerabilityFirstDetectedAt + +`func (o *Vulnerability) GetVulnerabilityFirstDetectedAt() int64` + +GetVulnerabilityFirstDetectedAt returns the VulnerabilityFirstDetectedAt field if non-nil, zero value otherwise. + +### GetVulnerabilityFirstDetectedAtOk + +`func (o *Vulnerability) GetVulnerabilityFirstDetectedAtOk() (*int64, bool)` + +GetVulnerabilityFirstDetectedAtOk returns a tuple with the VulnerabilityFirstDetectedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityFirstDetectedAt + +`func (o *Vulnerability) SetVulnerabilityFirstDetectedAt(v int64)` + +SetVulnerabilityFirstDetectedAt sets VulnerabilityFirstDetectedAt field to given value. + +### HasVulnerabilityFirstDetectedAt + +`func (o *Vulnerability) HasVulnerabilityFirstDetectedAt() bool` + +HasVulnerabilityFirstDetectedAt returns a boolean if a field has been set. + +### GetVulnerabilityLastDetectedAt + +`func (o *Vulnerability) GetVulnerabilityLastDetectedAt() int64` + +GetVulnerabilityLastDetectedAt returns the VulnerabilityLastDetectedAt field if non-nil, zero value otherwise. + +### GetVulnerabilityLastDetectedAtOk + +`func (o *Vulnerability) GetVulnerabilityLastDetectedAtOk() (*int64, bool)` + +GetVulnerabilityLastDetectedAtOk returns a tuple with the VulnerabilityLastDetectedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityLastDetectedAt + +`func (o *Vulnerability) SetVulnerabilityLastDetectedAt(v int64)` + +SetVulnerabilityLastDetectedAt sets VulnerabilityLastDetectedAt field to given value. + +### HasVulnerabilityLastDetectedAt + +`func (o *Vulnerability) HasVulnerabilityLastDetectedAt() bool` + +HasVulnerabilityLastDetectedAt returns a boolean if a field has been set. + +### GetVulnerabilityAttributes + +`func (o *Vulnerability) GetVulnerabilityAttributes() map[string]string` + +GetVulnerabilityAttributes returns the VulnerabilityAttributes field if non-nil, zero value otherwise. + +### GetVulnerabilityAttributesOk + +`func (o *Vulnerability) GetVulnerabilityAttributesOk() (*map[string]string, bool)` + +GetVulnerabilityAttributesOk returns a tuple with the VulnerabilityAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityAttributes + +`func (o *Vulnerability) SetVulnerabilityAttributes(v map[string]string)` + +SetVulnerabilityAttributes sets VulnerabilityAttributes field to given value. + +### HasVulnerabilityAttributes + +`func (o *Vulnerability) HasVulnerabilityAttributes() bool` + +HasVulnerabilityAttributes returns a boolean if a field has been set. + +### GetId + +`func (o *Vulnerability) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Vulnerability) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Vulnerability) SetId(v string)` + +SetId sets Id field to given value. + + +### GetCreatedAt + +`func (o *Vulnerability) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Vulnerability) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Vulnerability) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Vulnerability) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Vulnerability) GetUpdatedAt() int64` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Vulnerability) GetUpdatedAtOk() (*int64, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Vulnerability) SetUpdatedAt(v int64)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Vulnerability) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetOrganizationId + +`func (o *Vulnerability) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *Vulnerability) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *Vulnerability) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + +### HasOrganizationId + +`func (o *Vulnerability) HasOrganizationId() bool` + +HasOrganizationId returns a boolean if a field has been set. + +### GetSiteId + +`func (o *Vulnerability) GetSiteId() string` + +GetSiteId returns the SiteId field if non-nil, zero value otherwise. + +### GetSiteIdOk + +`func (o *Vulnerability) GetSiteIdOk() (*string, bool)` + +GetSiteIdOk returns a tuple with the SiteId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteId + +`func (o *Vulnerability) SetSiteId(v string)` + +SetSiteId sets SiteId field to given value. + +### HasSiteId + +`func (o *Vulnerability) HasSiteId() bool` + +HasSiteId returns a boolean if a field has been set. + +### GetAlive + +`func (o *Vulnerability) GetAlive() bool` + +GetAlive returns the Alive field if non-nil, zero value otherwise. + +### GetAliveOk + +`func (o *Vulnerability) GetAliveOk() (*bool, bool)` + +GetAliveOk returns a tuple with the Alive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlive + +`func (o *Vulnerability) SetAlive(v bool)` + +SetAlive sets Alive field to given value. + +### HasAlive + +`func (o *Vulnerability) HasAlive() bool` + +HasAlive returns a boolean if a field has been set. + +### GetFirstSeen + +`func (o *Vulnerability) GetFirstSeen() int64` + +GetFirstSeen returns the FirstSeen field if non-nil, zero value otherwise. + +### GetFirstSeenOk + +`func (o *Vulnerability) GetFirstSeenOk() (*int64, bool)` + +GetFirstSeenOk returns a tuple with the FirstSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstSeen + +`func (o *Vulnerability) SetFirstSeen(v int64)` + +SetFirstSeen sets FirstSeen field to given value. + +### HasFirstSeen + +`func (o *Vulnerability) HasFirstSeen() bool` + +HasFirstSeen returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *Vulnerability) GetLastSeen() int64` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *Vulnerability) GetLastSeenOk() (*int64, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *Vulnerability) SetLastSeen(v int64)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *Vulnerability) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetDetectedBy + +`func (o *Vulnerability) GetDetectedBy() string` + +GetDetectedBy returns the DetectedBy field if non-nil, zero value otherwise. + +### GetDetectedByOk + +`func (o *Vulnerability) GetDetectedByOk() (*string, bool)` + +GetDetectedByOk returns a tuple with the DetectedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetectedBy + +`func (o *Vulnerability) SetDetectedBy(v string)` + +SetDetectedBy sets DetectedBy field to given value. + +### HasDetectedBy + +`func (o *Vulnerability) HasDetectedBy() bool` + +HasDetectedBy returns a boolean if a field has been set. + +### GetType + +`func (o *Vulnerability) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Vulnerability) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Vulnerability) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Vulnerability) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetOs + +`func (o *Vulnerability) GetOs() string` + +GetOs returns the Os field if non-nil, zero value otherwise. + +### GetOsOk + +`func (o *Vulnerability) GetOsOk() (*string, bool)` + +GetOsOk returns a tuple with the Os field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOs + +`func (o *Vulnerability) SetOs(v string)` + +SetOs sets Os field to given value. + +### HasOs + +`func (o *Vulnerability) HasOs() bool` + +HasOs returns a boolean if a field has been set. + +### GetOsVersion + +`func (o *Vulnerability) GetOsVersion() string` + +GetOsVersion returns the OsVersion field if non-nil, zero value otherwise. + +### GetOsVersionOk + +`func (o *Vulnerability) GetOsVersionOk() (*string, bool)` + +GetOsVersionOk returns a tuple with the OsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOsVersion + +`func (o *Vulnerability) SetOsVersion(v string)` + +SetOsVersion sets OsVersion field to given value. + +### HasOsVersion + +`func (o *Vulnerability) HasOsVersion() bool` + +HasOsVersion returns a boolean if a field has been set. + +### GetHw + +`func (o *Vulnerability) GetHw() string` + +GetHw returns the Hw field if non-nil, zero value otherwise. + +### GetHwOk + +`func (o *Vulnerability) GetHwOk() (*string, bool)` + +GetHwOk returns a tuple with the Hw field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHw + +`func (o *Vulnerability) SetHw(v string)` + +SetHw sets Hw field to given value. + +### HasHw + +`func (o *Vulnerability) HasHw() bool` + +HasHw returns a boolean if a field has been set. + +### GetAddresses + +`func (o *Vulnerability) GetAddresses() []*string` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *Vulnerability) GetAddressesOk() (*[]*string, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *Vulnerability) SetAddresses(v []*string)` + +SetAddresses sets Addresses field to given value. + +### HasAddresses + +`func (o *Vulnerability) HasAddresses() bool` + +HasAddresses returns a boolean if a field has been set. + +### GetAddressesExtra + +`func (o *Vulnerability) GetAddressesExtra() []*string` + +GetAddressesExtra returns the AddressesExtra field if non-nil, zero value otherwise. + +### GetAddressesExtraOk + +`func (o *Vulnerability) GetAddressesExtraOk() (*[]*string, bool)` + +GetAddressesExtraOk returns a tuple with the AddressesExtra field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressesExtra + +`func (o *Vulnerability) SetAddressesExtra(v []*string)` + +SetAddressesExtra sets AddressesExtra field to given value. + +### HasAddressesExtra + +`func (o *Vulnerability) HasAddressesExtra() bool` + +HasAddressesExtra returns a boolean if a field has been set. + +### GetMacs + +`func (o *Vulnerability) GetMacs() []string` + +GetMacs returns the Macs field if non-nil, zero value otherwise. + +### GetMacsOk + +`func (o *Vulnerability) GetMacsOk() (*[]string, bool)` + +GetMacsOk returns a tuple with the Macs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacs + +`func (o *Vulnerability) SetMacs(v []string)` + +SetMacs sets Macs field to given value. + +### HasMacs + +`func (o *Vulnerability) HasMacs() bool` + +HasMacs returns a boolean if a field has been set. + +### GetMacVendors + +`func (o *Vulnerability) GetMacVendors() []string` + +GetMacVendors returns the MacVendors field if non-nil, zero value otherwise. + +### GetMacVendorsOk + +`func (o *Vulnerability) GetMacVendorsOk() (*[]string, bool)` + +GetMacVendorsOk returns a tuple with the MacVendors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacVendors + +`func (o *Vulnerability) SetMacVendors(v []string)` + +SetMacVendors sets MacVendors field to given value. + +### HasMacVendors + +`func (o *Vulnerability) HasMacVendors() bool` + +HasMacVendors returns a boolean if a field has been set. + +### GetNames + +`func (o *Vulnerability) GetNames() []string` + +GetNames returns the Names field if non-nil, zero value otherwise. + +### GetNamesOk + +`func (o *Vulnerability) GetNamesOk() (*[]string, bool)` + +GetNamesOk returns a tuple with the Names field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNames + +`func (o *Vulnerability) SetNames(v []string)` + +SetNames sets Names field to given value. + +### HasNames + +`func (o *Vulnerability) HasNames() bool` + +HasNames returns a boolean if a field has been set. + +### GetDomains + +`func (o *Vulnerability) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *Vulnerability) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *Vulnerability) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *Vulnerability) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetServiceCount + +`func (o *Vulnerability) GetServiceCount() int64` + +GetServiceCount returns the ServiceCount field if non-nil, zero value otherwise. + +### GetServiceCountOk + +`func (o *Vulnerability) GetServiceCountOk() (*int64, bool)` + +GetServiceCountOk returns a tuple with the ServiceCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCount + +`func (o *Vulnerability) SetServiceCount(v int64)` + +SetServiceCount sets ServiceCount field to given value. + +### HasServiceCount + +`func (o *Vulnerability) HasServiceCount() bool` + +HasServiceCount returns a boolean if a field has been set. + +### GetServiceCountTcp + +`func (o *Vulnerability) GetServiceCountTcp() int64` + +GetServiceCountTcp returns the ServiceCountTcp field if non-nil, zero value otherwise. + +### GetServiceCountTcpOk + +`func (o *Vulnerability) GetServiceCountTcpOk() (*int64, bool)` + +GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountTcp + +`func (o *Vulnerability) SetServiceCountTcp(v int64)` + +SetServiceCountTcp sets ServiceCountTcp field to given value. + +### HasServiceCountTcp + +`func (o *Vulnerability) HasServiceCountTcp() bool` + +HasServiceCountTcp returns a boolean if a field has been set. + +### GetServiceCountUdp + +`func (o *Vulnerability) GetServiceCountUdp() int64` + +GetServiceCountUdp returns the ServiceCountUdp field if non-nil, zero value otherwise. + +### GetServiceCountUdpOk + +`func (o *Vulnerability) GetServiceCountUdpOk() (*int64, bool)` + +GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountUdp + +`func (o *Vulnerability) SetServiceCountUdp(v int64)` + +SetServiceCountUdp sets ServiceCountUdp field to given value. + +### HasServiceCountUdp + +`func (o *Vulnerability) HasServiceCountUdp() bool` + +HasServiceCountUdp returns a boolean if a field has been set. + +### GetServiceCountArp + +`func (o *Vulnerability) GetServiceCountArp() int64` + +GetServiceCountArp returns the ServiceCountArp field if non-nil, zero value otherwise. + +### GetServiceCountArpOk + +`func (o *Vulnerability) GetServiceCountArpOk() (*int64, bool)` + +GetServiceCountArpOk returns a tuple with the ServiceCountArp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountArp + +`func (o *Vulnerability) SetServiceCountArp(v int64)` + +SetServiceCountArp sets ServiceCountArp field to given value. + +### HasServiceCountArp + +`func (o *Vulnerability) HasServiceCountArp() bool` + +HasServiceCountArp returns a boolean if a field has been set. + +### GetServiceCountIcmp + +`func (o *Vulnerability) GetServiceCountIcmp() int64` + +GetServiceCountIcmp returns the ServiceCountIcmp field if non-nil, zero value otherwise. + +### GetServiceCountIcmpOk + +`func (o *Vulnerability) GetServiceCountIcmpOk() (*int64, bool)` + +GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCountIcmp + +`func (o *Vulnerability) SetServiceCountIcmp(v int64)` + +SetServiceCountIcmp sets ServiceCountIcmp field to given value. + +### HasServiceCountIcmp + +`func (o *Vulnerability) HasServiceCountIcmp() bool` + +HasServiceCountIcmp returns a boolean if a field has been set. + +### GetLowestTtl + +`func (o *Vulnerability) GetLowestTtl() int64` + +GetLowestTtl returns the LowestTtl field if non-nil, zero value otherwise. + +### GetLowestTtlOk + +`func (o *Vulnerability) GetLowestTtlOk() (*int64, bool)` + +GetLowestTtlOk returns a tuple with the LowestTtl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLowestTtl + +`func (o *Vulnerability) SetLowestTtl(v int64)` + +SetLowestTtl sets LowestTtl field to given value. + +### HasLowestTtl + +`func (o *Vulnerability) HasLowestTtl() bool` + +HasLowestTtl returns a boolean if a field has been set. + +### GetLowestRtt + +`func (o *Vulnerability) GetLowestRtt() int64` + +GetLowestRtt returns the LowestRtt field if non-nil, zero value otherwise. + +### GetLowestRttOk + +`func (o *Vulnerability) GetLowestRttOk() (*int64, bool)` + +GetLowestRttOk returns a tuple with the LowestRtt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLowestRtt + +`func (o *Vulnerability) SetLowestRtt(v int64)` + +SetLowestRtt sets LowestRtt field to given value. + +### HasLowestRtt + +`func (o *Vulnerability) HasLowestRtt() bool` + +HasLowestRtt returns a boolean if a field has been set. + +### GetLastAgentId + +`func (o *Vulnerability) GetLastAgentId() string` + +GetLastAgentId returns the LastAgentId field if non-nil, zero value otherwise. + +### GetLastAgentIdOk + +`func (o *Vulnerability) GetLastAgentIdOk() (*string, bool)` + +GetLastAgentIdOk returns a tuple with the LastAgentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastAgentId + +`func (o *Vulnerability) SetLastAgentId(v string)` + +SetLastAgentId sets LastAgentId field to given value. + +### HasLastAgentId + +`func (o *Vulnerability) HasLastAgentId() bool` + +HasLastAgentId returns a boolean if a field has been set. + +### GetLastTaskId + +`func (o *Vulnerability) GetLastTaskId() string` + +GetLastTaskId returns the LastTaskId field if non-nil, zero value otherwise. + +### GetLastTaskIdOk + +`func (o *Vulnerability) GetLastTaskIdOk() (*string, bool)` + +GetLastTaskIdOk returns a tuple with the LastTaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastTaskId + +`func (o *Vulnerability) SetLastTaskId(v string)` + +SetLastTaskId sets LastTaskId field to given value. + +### HasLastTaskId + +`func (o *Vulnerability) HasLastTaskId() bool` + +HasLastTaskId returns a boolean if a field has been set. + +### GetNewestMac + +`func (o *Vulnerability) GetNewestMac() string` + +GetNewestMac returns the NewestMac field if non-nil, zero value otherwise. + +### GetNewestMacOk + +`func (o *Vulnerability) GetNewestMacOk() (*string, bool)` + +GetNewestMacOk returns a tuple with the NewestMac field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewestMac + +`func (o *Vulnerability) SetNewestMac(v string)` + +SetNewestMac sets NewestMac field to given value. + +### HasNewestMac + +`func (o *Vulnerability) HasNewestMac() bool` + +HasNewestMac returns a boolean if a field has been set. + +### GetNewestMacVendor + +`func (o *Vulnerability) GetNewestMacVendor() string` + +GetNewestMacVendor returns the NewestMacVendor field if non-nil, zero value otherwise. + +### GetNewestMacVendorOk + +`func (o *Vulnerability) GetNewestMacVendorOk() (*string, bool)` + +GetNewestMacVendorOk returns a tuple with the NewestMacVendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewestMacVendor + +`func (o *Vulnerability) SetNewestMacVendor(v string)` + +SetNewestMacVendor sets NewestMacVendor field to given value. + +### HasNewestMacVendor + +`func (o *Vulnerability) HasNewestMacVendor() bool` + +HasNewestMacVendor returns a boolean if a field has been set. + +### GetNewestMacAge + +`func (o *Vulnerability) GetNewestMacAge() int64` + +GetNewestMacAge returns the NewestMacAge field if non-nil, zero value otherwise. + +### GetNewestMacAgeOk + +`func (o *Vulnerability) GetNewestMacAgeOk() (*int64, bool)` + +GetNewestMacAgeOk returns a tuple with the NewestMacAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewestMacAge + +`func (o *Vulnerability) SetNewestMacAge(v int64)` + +SetNewestMacAge sets NewestMacAge field to given value. + +### HasNewestMacAge + +`func (o *Vulnerability) HasNewestMacAge() bool` + +HasNewestMacAge returns a boolean if a field has been set. + +### GetComments + +`func (o *Vulnerability) GetComments() string` + +GetComments returns the Comments field if non-nil, zero value otherwise. + +### GetCommentsOk + +`func (o *Vulnerability) GetCommentsOk() (*string, bool)` + +GetCommentsOk returns a tuple with the Comments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComments + +`func (o *Vulnerability) SetComments(v string)` + +SetComments sets Comments field to given value. + +### HasComments + +`func (o *Vulnerability) HasComments() bool` + +HasComments returns a boolean if a field has been set. + +### GetServicePortsTcp + +`func (o *Vulnerability) GetServicePortsTcp() []string` + +GetServicePortsTcp returns the ServicePortsTcp field if non-nil, zero value otherwise. + +### GetServicePortsTcpOk + +`func (o *Vulnerability) GetServicePortsTcpOk() (*[]string, bool)` + +GetServicePortsTcpOk returns a tuple with the ServicePortsTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServicePortsTcp + +`func (o *Vulnerability) SetServicePortsTcp(v []string)` + +SetServicePortsTcp sets ServicePortsTcp field to given value. + +### HasServicePortsTcp + +`func (o *Vulnerability) HasServicePortsTcp() bool` + +HasServicePortsTcp returns a boolean if a field has been set. + +### GetServicePortsUdp + +`func (o *Vulnerability) GetServicePortsUdp() []string` + +GetServicePortsUdp returns the ServicePortsUdp field if non-nil, zero value otherwise. + +### GetServicePortsUdpOk + +`func (o *Vulnerability) GetServicePortsUdpOk() (*[]string, bool)` + +GetServicePortsUdpOk returns a tuple with the ServicePortsUdp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServicePortsUdp + +`func (o *Vulnerability) SetServicePortsUdp(v []string)` + +SetServicePortsUdp sets ServicePortsUdp field to given value. + +### HasServicePortsUdp + +`func (o *Vulnerability) HasServicePortsUdp() bool` + +HasServicePortsUdp returns a boolean if a field has been set. + +### GetServicePortsProtocols + +`func (o *Vulnerability) GetServicePortsProtocols() []string` + +GetServicePortsProtocols returns the ServicePortsProtocols field if non-nil, zero value otherwise. + +### GetServicePortsProtocolsOk + +`func (o *Vulnerability) GetServicePortsProtocolsOk() (*[]string, bool)` + +GetServicePortsProtocolsOk returns a tuple with the ServicePortsProtocols field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServicePortsProtocols + +`func (o *Vulnerability) SetServicePortsProtocols(v []string)` + +SetServicePortsProtocols sets ServicePortsProtocols field to given value. + +### HasServicePortsProtocols + +`func (o *Vulnerability) HasServicePortsProtocols() bool` + +HasServicePortsProtocols returns a boolean if a field has been set. + +### GetServicePortsProducts + +`func (o *Vulnerability) GetServicePortsProducts() []string` + +GetServicePortsProducts returns the ServicePortsProducts field if non-nil, zero value otherwise. + +### GetServicePortsProductsOk + +`func (o *Vulnerability) GetServicePortsProductsOk() (*[]string, bool)` + +GetServicePortsProductsOk returns a tuple with the ServicePortsProducts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServicePortsProducts + +`func (o *Vulnerability) SetServicePortsProducts(v []string)` + +SetServicePortsProducts sets ServicePortsProducts field to given value. + +### HasServicePortsProducts + +`func (o *Vulnerability) HasServicePortsProducts() bool` + +HasServicePortsProducts returns a boolean if a field has been set. + +### GetOrgName + +`func (o *Vulnerability) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *Vulnerability) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *Vulnerability) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *Vulnerability) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetSiteName + +`func (o *Vulnerability) GetSiteName() string` + +GetSiteName returns the SiteName field if non-nil, zero value otherwise. + +### GetSiteNameOk + +`func (o *Vulnerability) GetSiteNameOk() (*string, bool)` + +GetSiteNameOk returns a tuple with the SiteName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSiteName + +`func (o *Vulnerability) SetSiteName(v string)` + +SetSiteName sets SiteName field to given value. + +### HasSiteName + +`func (o *Vulnerability) HasSiteName() bool` + +HasSiteName returns a boolean if a field has been set. + +### GetAgentName + +`func (o *Vulnerability) GetAgentName() string` + +GetAgentName returns the AgentName field if non-nil, zero value otherwise. + +### GetAgentNameOk + +`func (o *Vulnerability) GetAgentNameOk() (*string, bool)` + +GetAgentNameOk returns a tuple with the AgentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgentName + +`func (o *Vulnerability) SetAgentName(v string)` + +SetAgentName sets AgentName field to given value. + +### HasAgentName + +`func (o *Vulnerability) HasAgentName() bool` + +HasAgentName returns a boolean if a field has been set. + +### GetTags + +`func (o *Vulnerability) GetTags() map[string]string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Vulnerability) GetTagsOk() (*map[string]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Vulnerability) SetTags(v map[string]string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Vulnerability) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetServices + +`func (o *Vulnerability) GetServices() map[string]map[string]string` + +GetServices returns the Services field if non-nil, zero value otherwise. + +### GetServicesOk + +`func (o *Vulnerability) GetServicesOk() (*map[string]map[string]string, bool)` + +GetServicesOk returns a tuple with the Services field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServices + +`func (o *Vulnerability) SetServices(v map[string]map[string]string)` + +SetServices sets Services field to given value. + +### HasServices + +`func (o *Vulnerability) HasServices() bool` + +HasServices returns a boolean if a field has been set. + +### GetRtts + +`func (o *Vulnerability) GetRtts() map[string]interface{}` + +GetRtts returns the Rtts field if non-nil, zero value otherwise. + +### GetRttsOk + +`func (o *Vulnerability) GetRttsOk() (*map[string]interface{}, bool)` + +GetRttsOk returns a tuple with the Rtts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRtts + +`func (o *Vulnerability) SetRtts(v map[string]interface{})` + +SetRtts sets Rtts field to given value. + +### HasRtts + +`func (o *Vulnerability) HasRtts() bool` + +HasRtts returns a boolean if a field has been set. + +### GetCredentials + +`func (o *Vulnerability) GetCredentials() map[string]map[string]bool` + +GetCredentials returns the Credentials field if non-nil, zero value otherwise. + +### GetCredentialsOk + +`func (o *Vulnerability) GetCredentialsOk() (*map[string]map[string]bool, bool)` + +GetCredentialsOk returns a tuple with the Credentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentials + +`func (o *Vulnerability) SetCredentials(v map[string]map[string]bool)` + +SetCredentials sets Credentials field to given value. + +### HasCredentials + +`func (o *Vulnerability) HasCredentials() bool` + +HasCredentials returns a boolean if a field has been set. + +### GetAttributes + +`func (o *Vulnerability) GetAttributes() map[string]string` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *Vulnerability) GetAttributesOk() (*map[string]string, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *Vulnerability) SetAttributes(v map[string]string)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *Vulnerability) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/VulnerabilityExportResponse.md b/go/docs/VulnerabilityExportResponse.md new file mode 100644 index 0000000..d242077 --- /dev/null +++ b/go/docs/VulnerabilityExportResponse.md @@ -0,0 +1,82 @@ +# VulnerabilityExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vulnerabilities** | Pointer to [**[]Vulnerability**](Vulnerability.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewVulnerabilityExportResponse + +`func NewVulnerabilityExportResponse() *VulnerabilityExportResponse` + +NewVulnerabilityExportResponse instantiates a new VulnerabilityExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityExportResponseWithDefaults + +`func NewVulnerabilityExportResponseWithDefaults() *VulnerabilityExportResponse` + +NewVulnerabilityExportResponseWithDefaults instantiates a new VulnerabilityExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVulnerabilities + +`func (o *VulnerabilityExportResponse) GetVulnerabilities() []Vulnerability` + +GetVulnerabilities returns the Vulnerabilities field if non-nil, zero value otherwise. + +### GetVulnerabilitiesOk + +`func (o *VulnerabilityExportResponse) GetVulnerabilitiesOk() (*[]Vulnerability, bool)` + +GetVulnerabilitiesOk returns a tuple with the Vulnerabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilities + +`func (o *VulnerabilityExportResponse) SetVulnerabilities(v []Vulnerability)` + +SetVulnerabilities sets Vulnerabilities field to given value. + +### HasVulnerabilities + +`func (o *VulnerabilityExportResponse) HasVulnerabilities() bool` + +HasVulnerabilities returns a boolean if a field has been set. + +### GetNextKey + +`func (o *VulnerabilityExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *VulnerabilityExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *VulnerabilityExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *VulnerabilityExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/VulnerabilityPage.md b/go/docs/VulnerabilityPage.md new file mode 100644 index 0000000..052eee8 --- /dev/null +++ b/go/docs/VulnerabilityPage.md @@ -0,0 +1,82 @@ +# VulnerabilityPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vulnerabilities** | Pointer to [**[]Vulnerability**](Vulnerability.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewVulnerabilityPage + +`func NewVulnerabilityPage() *VulnerabilityPage` + +NewVulnerabilityPage instantiates a new VulnerabilityPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityPageWithDefaults + +`func NewVulnerabilityPageWithDefaults() *VulnerabilityPage` + +NewVulnerabilityPageWithDefaults instantiates a new VulnerabilityPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVulnerabilities + +`func (o *VulnerabilityPage) GetVulnerabilities() []Vulnerability` + +GetVulnerabilities returns the Vulnerabilities field if non-nil, zero value otherwise. + +### GetVulnerabilitiesOk + +`func (o *VulnerabilityPage) GetVulnerabilitiesOk() (*[]Vulnerability, bool)` + +GetVulnerabilitiesOk returns a tuple with the Vulnerabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilities + +`func (o *VulnerabilityPage) SetVulnerabilities(v []Vulnerability)` + +SetVulnerabilities sets Vulnerabilities field to given value. + +### HasVulnerabilities + +`func (o *VulnerabilityPage) HasVulnerabilities() bool` + +HasVulnerabilities returns a boolean if a field has been set. + +### GetNextKey + +`func (o *VulnerabilityPage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *VulnerabilityPage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *VulnerabilityPage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *VulnerabilityPage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/Wireless.md b/go/docs/Wireless.md index ad2e1be..5dee1e7 100644 --- a/go/docs/Wireless.md +++ b/go/docs/Wireless.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | +**Id** | **string** | | **CreatedAt** | Pointer to **int64** | | [optional] **LastSeen** | Pointer to **int64** | | [optional] **OrganizationId** | Pointer to **string** | | [optional] diff --git a/go/docs/WirelessExportResponse.md b/go/docs/WirelessExportResponse.md new file mode 100644 index 0000000..b4e9b19 --- /dev/null +++ b/go/docs/WirelessExportResponse.md @@ -0,0 +1,82 @@ +# WirelessExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Wireless** | Pointer to [**[]Wireless**](Wireless.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewWirelessExportResponse + +`func NewWirelessExportResponse() *WirelessExportResponse` + +NewWirelessExportResponse instantiates a new WirelessExportResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWirelessExportResponseWithDefaults + +`func NewWirelessExportResponseWithDefaults() *WirelessExportResponse` + +NewWirelessExportResponseWithDefaults instantiates a new WirelessExportResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWireless + +`func (o *WirelessExportResponse) GetWireless() []Wireless` + +GetWireless returns the Wireless field if non-nil, zero value otherwise. + +### GetWirelessOk + +`func (o *WirelessExportResponse) GetWirelessOk() (*[]Wireless, bool)` + +GetWirelessOk returns a tuple with the Wireless field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWireless + +`func (o *WirelessExportResponse) SetWireless(v []Wireless)` + +SetWireless sets Wireless field to given value. + +### HasWireless + +`func (o *WirelessExportResponse) HasWireless() bool` + +HasWireless returns a boolean if a field has been set. + +### GetNextKey + +`func (o *WirelessExportResponse) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *WirelessExportResponse) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *WirelessExportResponse) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *WirelessExportResponse) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/WirelessPage.md b/go/docs/WirelessPage.md new file mode 100644 index 0000000..d2cc7b2 --- /dev/null +++ b/go/docs/WirelessPage.md @@ -0,0 +1,82 @@ +# WirelessPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Wireless** | Pointer to [**[]Wireless**](Wireless.md) | | [optional] +**NextKey** | Pointer to **string** | The key to use for the next page of results | [optional] + +## Methods + +### NewWirelessPage + +`func NewWirelessPage() *WirelessPage` + +NewWirelessPage instantiates a new WirelessPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWirelessPageWithDefaults + +`func NewWirelessPageWithDefaults() *WirelessPage` + +NewWirelessPageWithDefaults instantiates a new WirelessPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWireless + +`func (o *WirelessPage) GetWireless() []Wireless` + +GetWireless returns the Wireless field if non-nil, zero value otherwise. + +### GetWirelessOk + +`func (o *WirelessPage) GetWirelessOk() (*[]Wireless, bool)` + +GetWirelessOk returns a tuple with the Wireless field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWireless + +`func (o *WirelessPage) SetWireless(v []Wireless)` + +SetWireless sets Wireless field to given value. + +### HasWireless + +`func (o *WirelessPage) HasWireless() bool` + +HasWireless returns a boolean if a field has been set. + +### GetNextKey + +`func (o *WirelessPage) GetNextKey() string` + +GetNextKey returns the NextKey field if non-nil, zero value otherwise. + +### GetNextKeyOk + +`func (o *WirelessPage) GetNextKeyOk() (*string, bool)` + +GetNextKeyOk returns a tuple with the NextKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextKey + +`func (o *WirelessPage) SetNextKey(v string)` + +SetNextKey sets NextKey field to given value. + +### HasNextKey + +`func (o *WirelessPage) HasNextKey() bool` + +HasNextKey returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/WizCredentialFields.md b/go/docs/WizCredentialFields.md new file mode 100644 index 0000000..49dc9c0 --- /dev/null +++ b/go/docs/WizCredentialFields.md @@ -0,0 +1,114 @@ +# WizCredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthUrl** | **string** | | +**ApiUrl** | **string** | | +**ClientId** | **string** | | +**ClientSecret** | **string** | | + +## Methods + +### NewWizCredentialFields + +`func NewWizCredentialFields(authUrl string, apiUrl string, clientId string, clientSecret string, ) *WizCredentialFields` + +NewWizCredentialFields instantiates a new WizCredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWizCredentialFieldsWithDefaults + +`func NewWizCredentialFieldsWithDefaults() *WizCredentialFields` + +NewWizCredentialFieldsWithDefaults instantiates a new WizCredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuthUrl + +`func (o *WizCredentialFields) GetAuthUrl() string` + +GetAuthUrl returns the AuthUrl field if non-nil, zero value otherwise. + +### GetAuthUrlOk + +`func (o *WizCredentialFields) GetAuthUrlOk() (*string, bool)` + +GetAuthUrlOk returns a tuple with the AuthUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthUrl + +`func (o *WizCredentialFields) SetAuthUrl(v string)` + +SetAuthUrl sets AuthUrl field to given value. + + +### GetApiUrl + +`func (o *WizCredentialFields) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *WizCredentialFields) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *WizCredentialFields) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetClientId + +`func (o *WizCredentialFields) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *WizCredentialFields) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *WizCredentialFields) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetClientSecret + +`func (o *WizCredentialFields) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *WizCredentialFields) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *WizCredentialFields) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/docs/X509CredentialFields.md b/go/docs/X509CredentialFields.md new file mode 100644 index 0000000..7fbef9d --- /dev/null +++ b/go/docs/X509CredentialFields.md @@ -0,0 +1,72 @@ +# X509CredentialFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**X509Certificate** | **string** | | +**PrivateKey** | **string** | | + +## Methods + +### NewX509CredentialFields + +`func NewX509CredentialFields(x509Certificate string, privateKey string, ) *X509CredentialFields` + +NewX509CredentialFields instantiates a new X509CredentialFields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewX509CredentialFieldsWithDefaults + +`func NewX509CredentialFieldsWithDefaults() *X509CredentialFields` + +NewX509CredentialFieldsWithDefaults instantiates a new X509CredentialFields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetX509Certificate + +`func (o *X509CredentialFields) GetX509Certificate() string` + +GetX509Certificate returns the X509Certificate field if non-nil, zero value otherwise. + +### GetX509CertificateOk + +`func (o *X509CredentialFields) GetX509CertificateOk() (*string, bool)` + +GetX509CertificateOk returns a tuple with the X509Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetX509Certificate + +`func (o *X509CredentialFields) SetX509Certificate(v string)` + +SetX509Certificate sets X509Certificate field to given value. + + +### GetPrivateKey + +`func (o *X509CredentialFields) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *X509CredentialFields) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *X509CredentialFields) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go/git_push.sh b/go/git_push.sh index ced3be2..f53a75d 100644 --- a/go/git_push.sh +++ b/go/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/go/model_access_token.go b/go/model_access_token.go new file mode 100644 index 0000000..3929d47 --- /dev/null +++ b/go/model_access_token.go @@ -0,0 +1,199 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AccessToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessToken{} + +// AccessToken struct for AccessToken +type AccessToken struct { + AccessToken *string `json:"access_token,omitempty"` + TokenType *string `json:"token_type,omitempty"` + ExpiresIn *int32 `json:"expires_in,omitempty"` +} + +// NewAccessToken instantiates a new AccessToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessToken() *AccessToken { + this := AccessToken{} + return &this +} + +// NewAccessTokenWithDefaults instantiates a new AccessToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessTokenWithDefaults() *AccessToken { + this := AccessToken{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. +func (o *AccessToken) GetAccessToken() string { + if o == nil || IsNil(o.AccessToken) { + var ret string + return ret + } + return *o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessToken) GetAccessTokenOk() (*string, bool) { + if o == nil || IsNil(o.AccessToken) { + return nil, false + } + return o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *AccessToken) HasAccessToken() bool { + if o != nil && !IsNil(o.AccessToken) { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. +func (o *AccessToken) SetAccessToken(v string) { + o.AccessToken = &v +} + +// GetTokenType returns the TokenType field value if set, zero value otherwise. +func (o *AccessToken) GetTokenType() string { + if o == nil || IsNil(o.TokenType) { + var ret string + return ret + } + return *o.TokenType +} + +// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessToken) GetTokenTypeOk() (*string, bool) { + if o == nil || IsNil(o.TokenType) { + return nil, false + } + return o.TokenType, true +} + +// HasTokenType returns a boolean if a field has been set. +func (o *AccessToken) HasTokenType() bool { + if o != nil && !IsNil(o.TokenType) { + return true + } + + return false +} + +// SetTokenType gets a reference to the given string and assigns it to the TokenType field. +func (o *AccessToken) SetTokenType(v string) { + o.TokenType = &v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *AccessToken) GetExpiresIn() int32 { + if o == nil || IsNil(o.ExpiresIn) { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessToken) GetExpiresInOk() (*int32, bool) { + if o == nil || IsNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *AccessToken) HasExpiresIn() bool { + if o != nil && !IsNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *AccessToken) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +func (o AccessToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessToken) { + toSerialize["access_token"] = o.AccessToken + } + if !IsNil(o.TokenType) { + toSerialize["token_type"] = o.TokenType + } + if !IsNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + return toSerialize, nil +} + +type NullableAccessToken struct { + value *AccessToken + isSet bool +} + +func (v NullableAccessToken) Get() *AccessToken { + return v.value +} + +func (v *NullableAccessToken) Set(val *AccessToken) { + v.value = val + v.isSet = true +} + +func (v NullableAccessToken) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessToken(val *AccessToken) *NullableAccessToken { + return &NullableAccessToken{value: val, isSet: true} +} + +func (v NullableAccessToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_agent.go b/go/model_agent.go index 8c92f37..32b78e6 100644 --- a/go/model_agent.go +++ b/go/model_agent.go @@ -1,41 +1,49 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) -// Agent struct for Agent +// checks if the Agent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Agent{} + +// Agent A deployed service which performs scan tasks. Explorers may be referred to by their legacy name, Agents. type Agent struct { - Id string `json:"id"` - ClientId *string `json:"client_id,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - HostId *string `json:"host_id,omitempty"` - HubId *string `json:"hub_id,omitempty"` - Name *string `json:"name,omitempty"` - SiteId *string `json:"site_id,omitempty"` - LastCheckin *int64 `json:"last_checkin,omitempty"` - Os *string `json:"os,omitempty"` - Arch *string `json:"arch,omitempty"` - Version *string `json:"version,omitempty"` - ExternalIp *string `json:"external_ip,omitempty"` - InternalIp *string `json:"internal_ip,omitempty"` - SystemInfo *map[string]interface{} `json:"system_info,omitempty"` - Connected *bool `json:"connected,omitempty"` - Inactive *bool `json:"inactive,omitempty"` - DeactivatedAt *int64 `json:"deactivated_at,omitempty"` -} + Id string `json:"id"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + HostId *string `json:"host_id,omitempty"` + HubId *string `json:"hub_id,omitempty"` + Name *string `json:"name,omitempty"` + SiteId *string `json:"site_id,omitempty"` + LastCheckin *int64 `json:"last_checkin,omitempty"` + Os *string `json:"os,omitempty"` + Arch *string `json:"arch,omitempty"` + Version *string `json:"version,omitempty"` + ExternalIp *string `json:"external_ip,omitempty"` + InternalIp NullableString `json:"internal_ip,omitempty"` + SystemInfo map[string]interface{} `json:"system_info,omitempty"` + Connected *bool `json:"connected,omitempty"` + Inactive *bool `json:"inactive,omitempty"` + DeactivatedAt *int64 `json:"deactivated_at,omitempty"` +} + +type _Agent Agent // NewAgent instantiates a new Agent object // This constructor will assign default values to properties that have it defined, @@ -81,7 +89,7 @@ func (o *Agent) SetId(v string) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *Agent) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -91,7 +99,7 @@ func (o *Agent) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -99,7 +107,7 @@ func (o *Agent) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *Agent) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -113,7 +121,7 @@ func (o *Agent) SetClientId(v string) { // GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. func (o *Agent) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { var ret string return ret } @@ -123,7 +131,7 @@ func (o *Agent) GetOrganizationId() string { // GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { return nil, false } return o.OrganizationId, true @@ -131,7 +139,7 @@ func (o *Agent) GetOrganizationIdOk() (*string, bool) { // HasOrganizationId returns a boolean if a field has been set. func (o *Agent) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { + if o != nil && !IsNil(o.OrganizationId) { return true } @@ -145,7 +153,7 @@ func (o *Agent) SetOrganizationId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Agent) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -155,7 +163,7 @@ func (o *Agent) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -163,7 +171,7 @@ func (o *Agent) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Agent) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -177,7 +185,7 @@ func (o *Agent) SetCreatedAt(v int64) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Agent) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -187,7 +195,7 @@ func (o *Agent) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -195,7 +203,7 @@ func (o *Agent) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Agent) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -209,7 +217,7 @@ func (o *Agent) SetUpdatedAt(v int64) { // GetHostId returns the HostId field value if set, zero value otherwise. func (o *Agent) GetHostId() string { - if o == nil || o.HostId == nil { + if o == nil || IsNil(o.HostId) { var ret string return ret } @@ -219,7 +227,7 @@ func (o *Agent) GetHostId() string { // GetHostIdOk returns a tuple with the HostId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetHostIdOk() (*string, bool) { - if o == nil || o.HostId == nil { + if o == nil || IsNil(o.HostId) { return nil, false } return o.HostId, true @@ -227,7 +235,7 @@ func (o *Agent) GetHostIdOk() (*string, bool) { // HasHostId returns a boolean if a field has been set. func (o *Agent) HasHostId() bool { - if o != nil && o.HostId != nil { + if o != nil && !IsNil(o.HostId) { return true } @@ -241,7 +249,7 @@ func (o *Agent) SetHostId(v string) { // GetHubId returns the HubId field value if set, zero value otherwise. func (o *Agent) GetHubId() string { - if o == nil || o.HubId == nil { + if o == nil || IsNil(o.HubId) { var ret string return ret } @@ -251,7 +259,7 @@ func (o *Agent) GetHubId() string { // GetHubIdOk returns a tuple with the HubId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetHubIdOk() (*string, bool) { - if o == nil || o.HubId == nil { + if o == nil || IsNil(o.HubId) { return nil, false } return o.HubId, true @@ -259,7 +267,7 @@ func (o *Agent) GetHubIdOk() (*string, bool) { // HasHubId returns a boolean if a field has been set. func (o *Agent) HasHubId() bool { - if o != nil && o.HubId != nil { + if o != nil && !IsNil(o.HubId) { return true } @@ -273,7 +281,7 @@ func (o *Agent) SetHubId(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *Agent) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -283,7 +291,7 @@ func (o *Agent) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -291,7 +299,7 @@ func (o *Agent) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *Agent) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -305,7 +313,7 @@ func (o *Agent) SetName(v string) { // GetSiteId returns the SiteId field value if set, zero value otherwise. func (o *Agent) GetSiteId() string { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { var ret string return ret } @@ -315,7 +323,7 @@ func (o *Agent) GetSiteId() string { // GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetSiteIdOk() (*string, bool) { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { return nil, false } return o.SiteId, true @@ -323,7 +331,7 @@ func (o *Agent) GetSiteIdOk() (*string, bool) { // HasSiteId returns a boolean if a field has been set. func (o *Agent) HasSiteId() bool { - if o != nil && o.SiteId != nil { + if o != nil && !IsNil(o.SiteId) { return true } @@ -337,7 +345,7 @@ func (o *Agent) SetSiteId(v string) { // GetLastCheckin returns the LastCheckin field value if set, zero value otherwise. func (o *Agent) GetLastCheckin() int64 { - if o == nil || o.LastCheckin == nil { + if o == nil || IsNil(o.LastCheckin) { var ret int64 return ret } @@ -347,7 +355,7 @@ func (o *Agent) GetLastCheckin() int64 { // GetLastCheckinOk returns a tuple with the LastCheckin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetLastCheckinOk() (*int64, bool) { - if o == nil || o.LastCheckin == nil { + if o == nil || IsNil(o.LastCheckin) { return nil, false } return o.LastCheckin, true @@ -355,7 +363,7 @@ func (o *Agent) GetLastCheckinOk() (*int64, bool) { // HasLastCheckin returns a boolean if a field has been set. func (o *Agent) HasLastCheckin() bool { - if o != nil && o.LastCheckin != nil { + if o != nil && !IsNil(o.LastCheckin) { return true } @@ -369,7 +377,7 @@ func (o *Agent) SetLastCheckin(v int64) { // GetOs returns the Os field value if set, zero value otherwise. func (o *Agent) GetOs() string { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { var ret string return ret } @@ -379,7 +387,7 @@ func (o *Agent) GetOs() string { // GetOsOk returns a tuple with the Os field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetOsOk() (*string, bool) { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { return nil, false } return o.Os, true @@ -387,7 +395,7 @@ func (o *Agent) GetOsOk() (*string, bool) { // HasOs returns a boolean if a field has been set. func (o *Agent) HasOs() bool { - if o != nil && o.Os != nil { + if o != nil && !IsNil(o.Os) { return true } @@ -401,7 +409,7 @@ func (o *Agent) SetOs(v string) { // GetArch returns the Arch field value if set, zero value otherwise. func (o *Agent) GetArch() string { - if o == nil || o.Arch == nil { + if o == nil || IsNil(o.Arch) { var ret string return ret } @@ -411,7 +419,7 @@ func (o *Agent) GetArch() string { // GetArchOk returns a tuple with the Arch field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetArchOk() (*string, bool) { - if o == nil || o.Arch == nil { + if o == nil || IsNil(o.Arch) { return nil, false } return o.Arch, true @@ -419,7 +427,7 @@ func (o *Agent) GetArchOk() (*string, bool) { // HasArch returns a boolean if a field has been set. func (o *Agent) HasArch() bool { - if o != nil && o.Arch != nil { + if o != nil && !IsNil(o.Arch) { return true } @@ -433,7 +441,7 @@ func (o *Agent) SetArch(v string) { // GetVersion returns the Version field value if set, zero value otherwise. func (o *Agent) GetVersion() string { - if o == nil || o.Version == nil { + if o == nil || IsNil(o.Version) { var ret string return ret } @@ -443,7 +451,7 @@ func (o *Agent) GetVersion() string { // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetVersionOk() (*string, bool) { - if o == nil || o.Version == nil { + if o == nil || IsNil(o.Version) { return nil, false } return o.Version, true @@ -451,7 +459,7 @@ func (o *Agent) GetVersionOk() (*string, bool) { // HasVersion returns a boolean if a field has been set. func (o *Agent) HasVersion() bool { - if o != nil && o.Version != nil { + if o != nil && !IsNil(o.Version) { return true } @@ -465,7 +473,7 @@ func (o *Agent) SetVersion(v string) { // GetExternalIp returns the ExternalIp field value if set, zero value otherwise. func (o *Agent) GetExternalIp() string { - if o == nil || o.ExternalIp == nil { + if o == nil || IsNil(o.ExternalIp) { var ret string return ret } @@ -475,7 +483,7 @@ func (o *Agent) GetExternalIp() string { // GetExternalIpOk returns a tuple with the ExternalIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetExternalIpOk() (*string, bool) { - if o == nil || o.ExternalIp == nil { + if o == nil || IsNil(o.ExternalIp) { return nil, false } return o.ExternalIp, true @@ -483,7 +491,7 @@ func (o *Agent) GetExternalIpOk() (*string, bool) { // HasExternalIp returns a boolean if a field has been set. func (o *Agent) HasExternalIp() bool { - if o != nil && o.ExternalIp != nil { + if o != nil && !IsNil(o.ExternalIp) { return true } @@ -495,59 +503,69 @@ func (o *Agent) SetExternalIp(v string) { o.ExternalIp = &v } -// GetInternalIp returns the InternalIp field value if set, zero value otherwise. +// GetInternalIp returns the InternalIp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Agent) GetInternalIp() string { - if o == nil || o.InternalIp == nil { + if o == nil || IsNil(o.InternalIp.Get()) { var ret string return ret } - return *o.InternalIp + return *o.InternalIp.Get() } // GetInternalIpOk returns a tuple with the InternalIp field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Agent) GetInternalIpOk() (*string, bool) { - if o == nil || o.InternalIp == nil { + if o == nil { return nil, false } - return o.InternalIp, true + return o.InternalIp.Get(), o.InternalIp.IsSet() } // HasInternalIp returns a boolean if a field has been set. func (o *Agent) HasInternalIp() bool { - if o != nil && o.InternalIp != nil { + if o != nil && o.InternalIp.IsSet() { return true } return false } -// SetInternalIp gets a reference to the given string and assigns it to the InternalIp field. +// SetInternalIp gets a reference to the given NullableString and assigns it to the InternalIp field. func (o *Agent) SetInternalIp(v string) { - o.InternalIp = &v + o.InternalIp.Set(&v) +} +// SetInternalIpNil sets the value for InternalIp to be an explicit nil +func (o *Agent) SetInternalIpNil() { + o.InternalIp.Set(nil) +} + +// UnsetInternalIp ensures that no value is present for InternalIp, not even an explicit nil +func (o *Agent) UnsetInternalIp() { + o.InternalIp.Unset() } // GetSystemInfo returns the SystemInfo field value if set, zero value otherwise. func (o *Agent) GetSystemInfo() map[string]interface{} { - if o == nil || o.SystemInfo == nil { + if o == nil || IsNil(o.SystemInfo) { var ret map[string]interface{} return ret } - return *o.SystemInfo + return o.SystemInfo } // GetSystemInfoOk returns a tuple with the SystemInfo field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Agent) GetSystemInfoOk() (*map[string]interface{}, bool) { - if o == nil || o.SystemInfo == nil { - return nil, false +func (o *Agent) GetSystemInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SystemInfo) { + return map[string]interface{}{}, false } return o.SystemInfo, true } // HasSystemInfo returns a boolean if a field has been set. func (o *Agent) HasSystemInfo() bool { - if o != nil && o.SystemInfo != nil { + if o != nil && !IsNil(o.SystemInfo) { return true } @@ -556,12 +574,12 @@ func (o *Agent) HasSystemInfo() bool { // SetSystemInfo gets a reference to the given map[string]interface{} and assigns it to the SystemInfo field. func (o *Agent) SetSystemInfo(v map[string]interface{}) { - o.SystemInfo = &v + o.SystemInfo = v } // GetConnected returns the Connected field value if set, zero value otherwise. func (o *Agent) GetConnected() bool { - if o == nil || o.Connected == nil { + if o == nil || IsNil(o.Connected) { var ret bool return ret } @@ -571,7 +589,7 @@ func (o *Agent) GetConnected() bool { // GetConnectedOk returns a tuple with the Connected field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetConnectedOk() (*bool, bool) { - if o == nil || o.Connected == nil { + if o == nil || IsNil(o.Connected) { return nil, false } return o.Connected, true @@ -579,7 +597,7 @@ func (o *Agent) GetConnectedOk() (*bool, bool) { // HasConnected returns a boolean if a field has been set. func (o *Agent) HasConnected() bool { - if o != nil && o.Connected != nil { + if o != nil && !IsNil(o.Connected) { return true } @@ -593,7 +611,7 @@ func (o *Agent) SetConnected(v bool) { // GetInactive returns the Inactive field value if set, zero value otherwise. func (o *Agent) GetInactive() bool { - if o == nil || o.Inactive == nil { + if o == nil || IsNil(o.Inactive) { var ret bool return ret } @@ -603,7 +621,7 @@ func (o *Agent) GetInactive() bool { // GetInactiveOk returns a tuple with the Inactive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetInactiveOk() (*bool, bool) { - if o == nil || o.Inactive == nil { + if o == nil || IsNil(o.Inactive) { return nil, false } return o.Inactive, true @@ -611,7 +629,7 @@ func (o *Agent) GetInactiveOk() (*bool, bool) { // HasInactive returns a boolean if a field has been set. func (o *Agent) HasInactive() bool { - if o != nil && o.Inactive != nil { + if o != nil && !IsNil(o.Inactive) { return true } @@ -625,7 +643,7 @@ func (o *Agent) SetInactive(v bool) { // GetDeactivatedAt returns the DeactivatedAt field value if set, zero value otherwise. func (o *Agent) GetDeactivatedAt() int64 { - if o == nil || o.DeactivatedAt == nil { + if o == nil || IsNil(o.DeactivatedAt) { var ret int64 return ret } @@ -635,7 +653,7 @@ func (o *Agent) GetDeactivatedAt() int64 { // GetDeactivatedAtOk returns a tuple with the DeactivatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Agent) GetDeactivatedAtOk() (*int64, bool) { - if o == nil || o.DeactivatedAt == nil { + if o == nil || IsNil(o.DeactivatedAt) { return nil, false } return o.DeactivatedAt, true @@ -643,7 +661,7 @@ func (o *Agent) GetDeactivatedAtOk() (*int64, bool) { // HasDeactivatedAt returns a boolean if a field has been set. func (o *Agent) HasDeactivatedAt() bool { - if o != nil && o.DeactivatedAt != nil { + if o != nil && !IsNil(o.DeactivatedAt) { return true } @@ -656,65 +674,108 @@ func (o *Agent) SetDeactivatedAt(v int64) { } func (o Agent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ClientId != nil { + return json.Marshal(toSerialize) +} + +func (o Agent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.OrganizationId != nil { + if !IsNil(o.OrganizationId) { toSerialize["organization_id"] = o.OrganizationId } - if o.CreatedAt != nil { + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.HostId != nil { + if !IsNil(o.HostId) { toSerialize["host_id"] = o.HostId } - if o.HubId != nil { + if !IsNil(o.HubId) { toSerialize["hub_id"] = o.HubId } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.SiteId != nil { + if !IsNil(o.SiteId) { toSerialize["site_id"] = o.SiteId } - if o.LastCheckin != nil { + if !IsNil(o.LastCheckin) { toSerialize["last_checkin"] = o.LastCheckin } - if o.Os != nil { + if !IsNil(o.Os) { toSerialize["os"] = o.Os } - if o.Arch != nil { + if !IsNil(o.Arch) { toSerialize["arch"] = o.Arch } - if o.Version != nil { + if !IsNil(o.Version) { toSerialize["version"] = o.Version } - if o.ExternalIp != nil { + if !IsNil(o.ExternalIp) { toSerialize["external_ip"] = o.ExternalIp } - if o.InternalIp != nil { - toSerialize["internal_ip"] = o.InternalIp + if o.InternalIp.IsSet() { + toSerialize["internal_ip"] = o.InternalIp.Get() } - if o.SystemInfo != nil { + if !IsNil(o.SystemInfo) { toSerialize["system_info"] = o.SystemInfo } - if o.Connected != nil { + if !IsNil(o.Connected) { toSerialize["connected"] = o.Connected } - if o.Inactive != nil { + if !IsNil(o.Inactive) { toSerialize["inactive"] = o.Inactive } - if o.DeactivatedAt != nil { + if !IsNil(o.DeactivatedAt) { toSerialize["deactivated_at"] = o.DeactivatedAt } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *Agent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgent := _Agent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgent) + + if err != nil { + return err + } + + *o = Agent(varAgent) + + return err } type NullableAgent struct { @@ -752,3 +813,5 @@ func (v *NullableAgent) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_agent_patched_settings.go b/go/model_agent_patched_settings.go new file mode 100644 index 0000000..e337118 --- /dev/null +++ b/go/model_agent_patched_settings.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AgentPatchedSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentPatchedSettings{} + +// AgentPatchedSettings struct for AgentPatchedSettings +type AgentPatchedSettings struct { + SiteId *string `json:"site_id,omitempty"` + Settings *AgentPatchedSettingsSettings `json:"settings,omitempty"` +} + +// NewAgentPatchedSettings instantiates a new AgentPatchedSettings object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentPatchedSettings() *AgentPatchedSettings { + this := AgentPatchedSettings{} + return &this +} + +// NewAgentPatchedSettingsWithDefaults instantiates a new AgentPatchedSettings object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentPatchedSettingsWithDefaults() *AgentPatchedSettings { + this := AgentPatchedSettings{} + return &this +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *AgentPatchedSettings) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentPatchedSettings) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *AgentPatchedSettings) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *AgentPatchedSettings) SetSiteId(v string) { + o.SiteId = &v +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *AgentPatchedSettings) GetSettings() AgentPatchedSettingsSettings { + if o == nil || IsNil(o.Settings) { + var ret AgentPatchedSettingsSettings + return ret + } + return *o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentPatchedSettings) GetSettingsOk() (*AgentPatchedSettingsSettings, bool) { + if o == nil || IsNil(o.Settings) { + return nil, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *AgentPatchedSettings) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given AgentPatchedSettingsSettings and assigns it to the Settings field. +func (o *AgentPatchedSettings) SetSettings(v AgentPatchedSettingsSettings) { + o.Settings = &v +} + +func (o AgentPatchedSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentPatchedSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + return toSerialize, nil +} + +type NullableAgentPatchedSettings struct { + value *AgentPatchedSettings + isSet bool +} + +func (v NullableAgentPatchedSettings) Get() *AgentPatchedSettings { + return v.value +} + +func (v *NullableAgentPatchedSettings) Set(val *AgentPatchedSettings) { + v.value = val + v.isSet = true +} + +func (v NullableAgentPatchedSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentPatchedSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentPatchedSettings(val *AgentPatchedSettings) *NullableAgentPatchedSettings { + return &NullableAgentPatchedSettings{value: val, isSet: true} +} + +func (v NullableAgentPatchedSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentPatchedSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_agent_patched_settings_settings.go b/go/model_agent_patched_settings_settings.go new file mode 100644 index 0000000..c99d6ab --- /dev/null +++ b/go/model_agent_patched_settings_settings.go @@ -0,0 +1,127 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AgentPatchedSettingsSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentPatchedSettingsSettings{} + +// AgentPatchedSettingsSettings struct for AgentPatchedSettingsSettings +type AgentPatchedSettingsSettings struct { + MaxConcurrentScans *int64 `json:"max_concurrent_scans,omitempty"` +} + +// NewAgentPatchedSettingsSettings instantiates a new AgentPatchedSettingsSettings object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentPatchedSettingsSettings() *AgentPatchedSettingsSettings { + this := AgentPatchedSettingsSettings{} + return &this +} + +// NewAgentPatchedSettingsSettingsWithDefaults instantiates a new AgentPatchedSettingsSettings object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentPatchedSettingsSettingsWithDefaults() *AgentPatchedSettingsSettings { + this := AgentPatchedSettingsSettings{} + return &this +} + +// GetMaxConcurrentScans returns the MaxConcurrentScans field value if set, zero value otherwise. +func (o *AgentPatchedSettingsSettings) GetMaxConcurrentScans() int64 { + if o == nil || IsNil(o.MaxConcurrentScans) { + var ret int64 + return ret + } + return *o.MaxConcurrentScans +} + +// GetMaxConcurrentScansOk returns a tuple with the MaxConcurrentScans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentPatchedSettingsSettings) GetMaxConcurrentScansOk() (*int64, bool) { + if o == nil || IsNil(o.MaxConcurrentScans) { + return nil, false + } + return o.MaxConcurrentScans, true +} + +// HasMaxConcurrentScans returns a boolean if a field has been set. +func (o *AgentPatchedSettingsSettings) HasMaxConcurrentScans() bool { + if o != nil && !IsNil(o.MaxConcurrentScans) { + return true + } + + return false +} + +// SetMaxConcurrentScans gets a reference to the given int64 and assigns it to the MaxConcurrentScans field. +func (o *AgentPatchedSettingsSettings) SetMaxConcurrentScans(v int64) { + o.MaxConcurrentScans = &v +} + +func (o AgentPatchedSettingsSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentPatchedSettingsSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MaxConcurrentScans) { + toSerialize["max_concurrent_scans"] = o.MaxConcurrentScans + } + return toSerialize, nil +} + +type NullableAgentPatchedSettingsSettings struct { + value *AgentPatchedSettingsSettings + isSet bool +} + +func (v NullableAgentPatchedSettingsSettings) Get() *AgentPatchedSettingsSettings { + return v.value +} + +func (v *NullableAgentPatchedSettingsSettings) Set(val *AgentPatchedSettingsSettings) { + v.value = val + v.isSet = true +} + +func (v NullableAgentPatchedSettingsSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentPatchedSettingsSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentPatchedSettingsSettings(val *AgentPatchedSettingsSettings) *NullableAgentPatchedSettingsSettings { + return &NullableAgentPatchedSettingsSettings{value: val, isSet: true} +} + +func (v NullableAgentPatchedSettingsSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentPatchedSettingsSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_agent_site_id.go b/go/model_agent_site_id.go deleted file mode 100644 index 7ab0f31..0000000 --- a/go/model_agent_site_id.go +++ /dev/null @@ -1,106 +0,0 @@ -/* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi - -import ( - "encoding/json" -) - -// AgentSiteID struct for AgentSiteID -type AgentSiteID struct { - SiteId string `json:"site_id"` -} - -// NewAgentSiteID instantiates a new AgentSiteID object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAgentSiteID(siteId string) *AgentSiteID { - this := AgentSiteID{} - this.SiteId = siteId - return &this -} - -// NewAgentSiteIDWithDefaults instantiates a new AgentSiteID object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAgentSiteIDWithDefaults() *AgentSiteID { - this := AgentSiteID{} - return &this -} - -// GetSiteId returns the SiteId field value -func (o *AgentSiteID) GetSiteId() string { - if o == nil { - var ret string - return ret - } - - return o.SiteId -} - -// GetSiteIdOk returns a tuple with the SiteId field value -// and a boolean to check if the value has been set. -func (o *AgentSiteID) GetSiteIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SiteId, true -} - -// SetSiteId sets field value -func (o *AgentSiteID) SetSiteId(v string) { - o.SiteId = v -} - -func (o AgentSiteID) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["site_id"] = o.SiteId - } - return json.Marshal(toSerialize) -} - -type NullableAgentSiteID struct { - value *AgentSiteID - isSet bool -} - -func (v NullableAgentSiteID) Get() *AgentSiteID { - return v.value -} - -func (v *NullableAgentSiteID) Set(val *AgentSiteID) { - v.value = val - v.isSet = true -} - -func (v NullableAgentSiteID) IsSet() bool { - return v.isSet -} - -func (v *NullableAgentSiteID) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAgentSiteID(val *AgentSiteID) *NullableAgentSiteID { - return &NullableAgentSiteID{value: val, isSet: true} -} - -func (v NullableAgentSiteID) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAgentSiteID) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/go/model_api_client_credentials.go b/go/model_api_client_credentials.go new file mode 100644 index 0000000..4db96f6 --- /dev/null +++ b/go/model_api_client_credentials.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the APIClientCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIClientCredentials{} + +// APIClientCredentials Newly-issued OAuth client credentials returned when creating an API client. +type APIClientCredentials struct { + ApiClientId *string `json:"api_client_id,omitempty"` + ApiClientSecret *string `json:"api_client_secret,omitempty"` +} + +// NewAPIClientCredentials instantiates a new APIClientCredentials object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAPIClientCredentials() *APIClientCredentials { + this := APIClientCredentials{} + return &this +} + +// NewAPIClientCredentialsWithDefaults instantiates a new APIClientCredentials object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAPIClientCredentialsWithDefaults() *APIClientCredentials { + this := APIClientCredentials{} + return &this +} + +// GetApiClientId returns the ApiClientId field value if set, zero value otherwise. +func (o *APIClientCredentials) GetApiClientId() string { + if o == nil || IsNil(o.ApiClientId) { + var ret string + return ret + } + return *o.ApiClientId +} + +// GetApiClientIdOk returns a tuple with the ApiClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIClientCredentials) GetApiClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ApiClientId) { + return nil, false + } + return o.ApiClientId, true +} + +// HasApiClientId returns a boolean if a field has been set. +func (o *APIClientCredentials) HasApiClientId() bool { + if o != nil && !IsNil(o.ApiClientId) { + return true + } + + return false +} + +// SetApiClientId gets a reference to the given string and assigns it to the ApiClientId field. +func (o *APIClientCredentials) SetApiClientId(v string) { + o.ApiClientId = &v +} + +// GetApiClientSecret returns the ApiClientSecret field value if set, zero value otherwise. +func (o *APIClientCredentials) GetApiClientSecret() string { + if o == nil || IsNil(o.ApiClientSecret) { + var ret string + return ret + } + return *o.ApiClientSecret +} + +// GetApiClientSecretOk returns a tuple with the ApiClientSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIClientCredentials) GetApiClientSecretOk() (*string, bool) { + if o == nil || IsNil(o.ApiClientSecret) { + return nil, false + } + return o.ApiClientSecret, true +} + +// HasApiClientSecret returns a boolean if a field has been set. +func (o *APIClientCredentials) HasApiClientSecret() bool { + if o != nil && !IsNil(o.ApiClientSecret) { + return true + } + + return false +} + +// SetApiClientSecret gets a reference to the given string and assigns it to the ApiClientSecret field. +func (o *APIClientCredentials) SetApiClientSecret(v string) { + o.ApiClientSecret = &v +} + +func (o APIClientCredentials) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIClientCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApiClientId) { + toSerialize["api_client_id"] = o.ApiClientId + } + if !IsNil(o.ApiClientSecret) { + toSerialize["api_client_secret"] = o.ApiClientSecret + } + return toSerialize, nil +} + +type NullableAPIClientCredentials struct { + value *APIClientCredentials + isSet bool +} + +func (v NullableAPIClientCredentials) Get() *APIClientCredentials { + return v.value +} + +func (v *NullableAPIClientCredentials) Set(val *APIClientCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableAPIClientCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIClientCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIClientCredentials(val *APIClientCredentials) *NullableAPIClientCredentials { + return &NullableAPIClientCredentials{value: val, isSet: true} +} + +func (v NullableAPIClientCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIClientCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_api_key.go b/go/model_api_key.go deleted file mode 100644 index 96159db..0000000 --- a/go/model_api_key.go +++ /dev/null @@ -1,574 +0,0 @@ -/* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi - -import ( - "encoding/json" -) - -// RunZeroAPIKey struct for RunZeroAPIKey -type RunZeroAPIKey struct { - Id string `json:"id"` - ClientId *string `json:"client_id,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - CreatedBy *string `json:"created_by,omitempty"` - Comment *string `json:"comment,omitempty"` - LastUsedAt *int64 `json:"last_used_at,omitempty"` - LastUsedIp *string `json:"last_used_ip,omitempty"` - LastUsedUa *string `json:"last_used_ua,omitempty"` - Counter *int64 `json:"counter,omitempty"` - UsageToday *int64 `json:"usage_today,omitempty"` - UsageLimit *int64 `json:"usage_limit,omitempty"` - Token *string `json:"token,omitempty"` - Inactive *bool `json:"inactive,omitempty"` -} - -// NewRunZeroAPIKey instantiates a new RunZeroAPIKey object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunZeroAPIKey(id string) *RunZeroAPIKey { - this := RunZeroAPIKey{} - this.Id = id - return &this -} - -// NewRunZeroAPIKeyWithDefaults instantiates a new RunZeroAPIKey object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunZeroAPIKeyWithDefaults() *RunZeroAPIKey { - this := RunZeroAPIKey{} - return &this -} - -// GetId returns the Id field value -func (o *RunZeroAPIKey) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RunZeroAPIKey) SetId(v string) { - o.Id = v -} - -// GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetClientId() string { - if o == nil || o.ClientId == nil { - var ret string - return ret - } - return *o.ClientId -} - -// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { - return nil, false - } - return o.ClientId, true -} - -// HasClientId returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasClientId() bool { - if o != nil && o.ClientId != nil { - return true - } - - return false -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *RunZeroAPIKey) SetClientId(v string) { - o.ClientId = &v -} - -// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { - var ret string - return ret - } - return *o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { - return nil, false - } - return o.OrganizationId, true -} - -// HasOrganizationId returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { - return true - } - - return false -} - -// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. -func (o *RunZeroAPIKey) SetOrganizationId(v string) { - o.OrganizationId = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { - var ret int64 - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. -func (o *RunZeroAPIKey) SetCreatedAt(v int64) { - o.CreatedAt = &v -} - -// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetCreatedBy() string { - if o == nil || o.CreatedBy == nil { - var ret string - return ret - } - return *o.CreatedBy -} - -// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetCreatedByOk() (*string, bool) { - if o == nil || o.CreatedBy == nil { - return nil, false - } - return o.CreatedBy, true -} - -// HasCreatedBy returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasCreatedBy() bool { - if o != nil && o.CreatedBy != nil { - return true - } - - return false -} - -// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. -func (o *RunZeroAPIKey) SetCreatedBy(v string) { - o.CreatedBy = &v -} - -// GetComment returns the Comment field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetComment() string { - if o == nil || o.Comment == nil { - var ret string - return ret - } - return *o.Comment -} - -// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetCommentOk() (*string, bool) { - if o == nil || o.Comment == nil { - return nil, false - } - return o.Comment, true -} - -// HasComment returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasComment() bool { - if o != nil && o.Comment != nil { - return true - } - - return false -} - -// SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *RunZeroAPIKey) SetComment(v string) { - o.Comment = &v -} - -// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetLastUsedAt() int64 { - if o == nil || o.LastUsedAt == nil { - var ret int64 - return ret - } - return *o.LastUsedAt -} - -// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetLastUsedAtOk() (*int64, bool) { - if o == nil || o.LastUsedAt == nil { - return nil, false - } - return o.LastUsedAt, true -} - -// HasLastUsedAt returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasLastUsedAt() bool { - if o != nil && o.LastUsedAt != nil { - return true - } - - return false -} - -// SetLastUsedAt gets a reference to the given int64 and assigns it to the LastUsedAt field. -func (o *RunZeroAPIKey) SetLastUsedAt(v int64) { - o.LastUsedAt = &v -} - -// GetLastUsedIp returns the LastUsedIp field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetLastUsedIp() string { - if o == nil || o.LastUsedIp == nil { - var ret string - return ret - } - return *o.LastUsedIp -} - -// GetLastUsedIpOk returns a tuple with the LastUsedIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetLastUsedIpOk() (*string, bool) { - if o == nil || o.LastUsedIp == nil { - return nil, false - } - return o.LastUsedIp, true -} - -// HasLastUsedIp returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasLastUsedIp() bool { - if o != nil && o.LastUsedIp != nil { - return true - } - - return false -} - -// SetLastUsedIp gets a reference to the given string and assigns it to the LastUsedIp field. -func (o *RunZeroAPIKey) SetLastUsedIp(v string) { - o.LastUsedIp = &v -} - -// GetLastUsedUa returns the LastUsedUa field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetLastUsedUa() string { - if o == nil || o.LastUsedUa == nil { - var ret string - return ret - } - return *o.LastUsedUa -} - -// GetLastUsedUaOk returns a tuple with the LastUsedUa field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetLastUsedUaOk() (*string, bool) { - if o == nil || o.LastUsedUa == nil { - return nil, false - } - return o.LastUsedUa, true -} - -// HasLastUsedUa returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasLastUsedUa() bool { - if o != nil && o.LastUsedUa != nil { - return true - } - - return false -} - -// SetLastUsedUa gets a reference to the given string and assigns it to the LastUsedUa field. -func (o *RunZeroAPIKey) SetLastUsedUa(v string) { - o.LastUsedUa = &v -} - -// GetCounter returns the Counter field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetCounter() int64 { - if o == nil || o.Counter == nil { - var ret int64 - return ret - } - return *o.Counter -} - -// GetCounterOk returns a tuple with the Counter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetCounterOk() (*int64, bool) { - if o == nil || o.Counter == nil { - return nil, false - } - return o.Counter, true -} - -// HasCounter returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasCounter() bool { - if o != nil && o.Counter != nil { - return true - } - - return false -} - -// SetCounter gets a reference to the given int64 and assigns it to the Counter field. -func (o *RunZeroAPIKey) SetCounter(v int64) { - o.Counter = &v -} - -// GetUsageToday returns the UsageToday field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetUsageToday() int64 { - if o == nil || o.UsageToday == nil { - var ret int64 - return ret - } - return *o.UsageToday -} - -// GetUsageTodayOk returns a tuple with the UsageToday field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetUsageTodayOk() (*int64, bool) { - if o == nil || o.UsageToday == nil { - return nil, false - } - return o.UsageToday, true -} - -// HasUsageToday returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasUsageToday() bool { - if o != nil && o.UsageToday != nil { - return true - } - - return false -} - -// SetUsageToday gets a reference to the given int64 and assigns it to the UsageToday field. -func (o *RunZeroAPIKey) SetUsageToday(v int64) { - o.UsageToday = &v -} - -// GetUsageLimit returns the UsageLimit field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetUsageLimit() int64 { - if o == nil || o.UsageLimit == nil { - var ret int64 - return ret - } - return *o.UsageLimit -} - -// GetUsageLimitOk returns a tuple with the UsageLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetUsageLimitOk() (*int64, bool) { - if o == nil || o.UsageLimit == nil { - return nil, false - } - return o.UsageLimit, true -} - -// HasUsageLimit returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasUsageLimit() bool { - if o != nil && o.UsageLimit != nil { - return true - } - - return false -} - -// SetUsageLimit gets a reference to the given int64 and assigns it to the UsageLimit field. -func (o *RunZeroAPIKey) SetUsageLimit(v int64) { - o.UsageLimit = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetToken() string { - if o == nil || o.Token == nil { - var ret string - return ret - } - return *o.Token -} - -// GetTokenOk returns a tuple with the Token field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetTokenOk() (*string, bool) { - if o == nil || o.Token == nil { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasToken() bool { - if o != nil && o.Token != nil { - return true - } - - return false -} - -// SetToken gets a reference to the given string and assigns it to the Token field. -func (o *RunZeroAPIKey) SetToken(v string) { - o.Token = &v -} - -// GetInactive returns the Inactive field value if set, zero value otherwise. -func (o *RunZeroAPIKey) GetInactive() bool { - if o == nil || o.Inactive == nil { - var ret bool - return ret - } - return *o.Inactive -} - -// GetInactiveOk returns a tuple with the Inactive field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunZeroAPIKey) GetInactiveOk() (*bool, bool) { - if o == nil || o.Inactive == nil { - return nil, false - } - return o.Inactive, true -} - -// HasInactive returns a boolean if a field has been set. -func (o *RunZeroAPIKey) HasInactive() bool { - if o != nil && o.Inactive != nil { - return true - } - - return false -} - -// SetInactive gets a reference to the given bool and assigns it to the Inactive field. -func (o *RunZeroAPIKey) SetInactive(v bool) { - o.Inactive = &v -} - -func (o RunZeroAPIKey) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id - } - if o.ClientId != nil { - toSerialize["client_id"] = o.ClientId - } - if o.OrganizationId != nil { - toSerialize["organization_id"] = o.OrganizationId - } - if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt - } - if o.CreatedBy != nil { - toSerialize["created_by"] = o.CreatedBy - } - if o.Comment != nil { - toSerialize["comment"] = o.Comment - } - if o.LastUsedAt != nil { - toSerialize["last_used_at"] = o.LastUsedAt - } - if o.LastUsedIp != nil { - toSerialize["last_used_ip"] = o.LastUsedIp - } - if o.LastUsedUa != nil { - toSerialize["last_used_ua"] = o.LastUsedUa - } - if o.Counter != nil { - toSerialize["counter"] = o.Counter - } - if o.UsageToday != nil { - toSerialize["usage_today"] = o.UsageToday - } - if o.UsageLimit != nil { - toSerialize["usage_limit"] = o.UsageLimit - } - if o.Token != nil { - toSerialize["token"] = o.Token - } - if o.Inactive != nil { - toSerialize["inactive"] = o.Inactive - } - return json.Marshal(toSerialize) -} - -type NullableRunZeroAPIKey struct { - value *RunZeroAPIKey - isSet bool -} - -func (v NullableRunZeroAPIKey) Get() *RunZeroAPIKey { - return v.value -} - -func (v *NullableRunZeroAPIKey) Set(val *RunZeroAPIKey) { - v.value = val - v.isSet = true -} - -func (v NullableRunZeroAPIKey) IsSet() bool { - return v.isSet -} - -func (v *NullableRunZeroAPIKey) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunZeroAPIKey(val *RunZeroAPIKey) *NullableRunZeroAPIKey { - return &NullableRunZeroAPIKey{value: val, isSet: true} -} - -func (v NullableRunZeroAPIKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunZeroAPIKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/go/model_api_key_options.go b/go/model_api_key_options.go new file mode 100644 index 0000000..b685c0b --- /dev/null +++ b/go/model_api_key_options.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the APIKeyOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIKeyOptions{} + +// APIKeyOptions struct for APIKeyOptions +type APIKeyOptions struct { + Comment *string `json:"comment,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` +} + +// NewAPIKeyOptions instantiates a new APIKeyOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAPIKeyOptions() *APIKeyOptions { + this := APIKeyOptions{} + return &this +} + +// NewAPIKeyOptionsWithDefaults instantiates a new APIKeyOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAPIKeyOptionsWithDefaults() *APIKeyOptions { + this := APIKeyOptions{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *APIKeyOptions) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyOptions) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *APIKeyOptions) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *APIKeyOptions) SetComment(v string) { + o.Comment = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *APIKeyOptions) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyOptions) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *APIKeyOptions) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *APIKeyOptions) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +func (o APIKeyOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIKeyOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + return toSerialize, nil +} + +type NullableAPIKeyOptions struct { + value *APIKeyOptions + isSet bool +} + +func (v NullableAPIKeyOptions) Get() *APIKeyOptions { + return v.value +} + +func (v *NullableAPIKeyOptions) Set(val *APIKeyOptions) { + v.value = val + v.isSet = true +} + +func (v NullableAPIKeyOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIKeyOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIKeyOptions(val *APIKeyOptions) *NullableAPIKeyOptions { + return &NullableAPIKeyOptions{value: val, isSet: true} +} + +func (v NullableAPIKeyOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIKeyOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset.go b/go/model_asset.go index 1e0e165..eb61218 100644 --- a/go/model_asset.go +++ b/go/model_asset.go @@ -1,66 +1,86 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the Asset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Asset{} + // Asset struct for Asset type Asset struct { - Id string `json:"id"` - CreatedAt *int64 `json:"created_at,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - SiteId *string `json:"site_id,omitempty"` - Alive *bool `json:"alive,omitempty"` - FirstSeen *int64 `json:"first_seen,omitempty"` - LastSeen *int64 `json:"last_seen,omitempty"` - DetectedBy *string `json:"detected_by,omitempty"` - Type *string `json:"type,omitempty"` - Os *string `json:"os,omitempty"` - OsVersion *string `json:"os_version,omitempty"` - Hw *string `json:"hw,omitempty"` - Addresses *[]string `json:"addresses,omitempty"` - AddressesExtra *[]string `json:"addresses_extra,omitempty"` - Macs *[]string `json:"macs,omitempty"` - MacVendors *[]string `json:"mac_vendors,omitempty"` - Names *[]string `json:"names,omitempty"` - Domains *[]string `json:"domains,omitempty"` - ServiceCount *int64 `json:"service_count,omitempty"` - ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` - ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` - ServiceCountArp *int64 `json:"service_count_arp,omitempty"` - ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` - LowestTtl *int64 `json:"lowest_ttl,omitempty"` - LowestRtt *int64 `json:"lowest_rtt,omitempty"` - LastAgentId *string `json:"last_agent_id,omitempty"` - LastTaskId *string `json:"last_task_id,omitempty"` - NewestMac *string `json:"newest_mac,omitempty"` - NewestMacVendor *string `json:"newest_mac_vendor,omitempty"` - NewestMacAge *int64 `json:"newest_mac_age,omitempty"` - Comments *string `json:"comments,omitempty"` - ServicePortsTcp *[]string `json:"service_ports_tcp,omitempty"` - ServicePortsUdp *[]string `json:"service_ports_udp,omitempty"` - ServicePortsProtocols *[]string `json:"service_ports_protocols,omitempty"` - ServicePortsProducts *[]string `json:"service_ports_products,omitempty"` - OrgName *string `json:"org_name,omitempty"` - SiteName *string `json:"site_name,omitempty"` - AgentName *string `json:"agent_name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Services *map[string]map[string]string `json:"services,omitempty"` - Rtts *map[string]map[string]interface{} `json:"rtts,omitempty"` - Credentials *map[string]map[string]bool `json:"credentials,omitempty"` - Attributes *map[string]string `json:"attributes,omitempty"` -} + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + Scanned *bool `json:"scanned,omitempty"` + Alive *bool `json:"alive,omitempty"` + FirstSeen *int64 `json:"first_seen,omitempty"` + LastSeen *int64 `json:"last_seen,omitempty"` + DetectedBy *string `json:"detected_by,omitempty"` + Type *string `json:"type,omitempty"` + Os *string `json:"os,omitempty"` + OsVersion *string `json:"os_version,omitempty"` + Hw *string `json:"hw,omitempty"` + Addresses []*string `json:"addresses,omitempty"` + AddressesExtra []*string `json:"addresses_extra,omitempty"` + Macs []string `json:"macs,omitempty"` + MacVendors []string `json:"mac_vendors,omitempty"` + Names []string `json:"names,omitempty"` + Domains []string `json:"domains,omitempty"` + ServiceCount *int64 `json:"service_count,omitempty"` + ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` + ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` + ServiceCountArp *int64 `json:"service_count_arp,omitempty"` + ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` + LowestTtl *int64 `json:"lowest_ttl,omitempty"` + LowestRtt *int64 `json:"lowest_rtt,omitempty"` + LastAgentId *string `json:"last_agent_id,omitempty"` + LastTaskId *string `json:"last_task_id,omitempty"` + NewestMac *string `json:"newest_mac,omitempty"` + NewestMacVendor *string `json:"newest_mac_vendor,omitempty"` + NewestMacAge *int64 `json:"newest_mac_age,omitempty"` + Comments *string `json:"comments,omitempty"` + ServicePortsTcp []string `json:"service_ports_tcp,omitempty"` + ServicePortsUdp []string `json:"service_ports_udp,omitempty"` + ServiceProtocols []string `json:"service_protocols,omitempty"` + ServiceProducts []string `json:"service_products,omitempty"` + OrgName *string `json:"org_name,omitempty"` + SiteName *string `json:"site_name,omitempty"` + AgentName *string `json:"agent_name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Services *map[string]map[string]string `json:"services,omitempty"` + Rtts map[string]interface{} `json:"rtts,omitempty"` + // -1 = none, 0 = info, 4 = critical + RiskRank *float32 `json:"risk_rank,omitempty"` + Risk *string `json:"risk,omitempty"` + Credentials *map[string]map[string]bool `json:"credentials,omitempty"` + VulnerabilityCount *float32 `json:"vulnerability_count,omitempty"` + FindingCount *float32 `json:"finding_count,omitempty"` + // OS main EOL date + EolOs *float32 `json:"eol_os,omitempty"` + // OS extended support EOL date + EolOsExt *float32 `json:"eol_os_ext,omitempty"` + // Sources used for asset data + Sources []string `json:"sources,omitempty"` + Attributes *map[string]string `json:"attributes,omitempty"` +} + +type _Asset Asset // NewAsset instantiates a new Asset object // This constructor will assign default values to properties that have it defined, @@ -106,7 +126,7 @@ func (o *Asset) SetId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Asset) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -116,7 +136,7 @@ func (o *Asset) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -124,7 +144,7 @@ func (o *Asset) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Asset) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -138,7 +158,7 @@ func (o *Asset) SetCreatedAt(v int64) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Asset) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -148,7 +168,7 @@ func (o *Asset) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -156,7 +176,7 @@ func (o *Asset) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Asset) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -170,7 +190,7 @@ func (o *Asset) SetUpdatedAt(v int64) { // GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. func (o *Asset) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { var ret string return ret } @@ -180,7 +200,7 @@ func (o *Asset) GetOrganizationId() string { // GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { return nil, false } return o.OrganizationId, true @@ -188,7 +208,7 @@ func (o *Asset) GetOrganizationIdOk() (*string, bool) { // HasOrganizationId returns a boolean if a field has been set. func (o *Asset) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { + if o != nil && !IsNil(o.OrganizationId) { return true } @@ -202,7 +222,7 @@ func (o *Asset) SetOrganizationId(v string) { // GetSiteId returns the SiteId field value if set, zero value otherwise. func (o *Asset) GetSiteId() string { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { var ret string return ret } @@ -212,7 +232,7 @@ func (o *Asset) GetSiteId() string { // GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetSiteIdOk() (*string, bool) { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { return nil, false } return o.SiteId, true @@ -220,7 +240,7 @@ func (o *Asset) GetSiteIdOk() (*string, bool) { // HasSiteId returns a boolean if a field has been set. func (o *Asset) HasSiteId() bool { - if o != nil && o.SiteId != nil { + if o != nil && !IsNil(o.SiteId) { return true } @@ -232,9 +252,41 @@ func (o *Asset) SetSiteId(v string) { o.SiteId = &v } +// GetScanned returns the Scanned field value if set, zero value otherwise. +func (o *Asset) GetScanned() bool { + if o == nil || IsNil(o.Scanned) { + var ret bool + return ret + } + return *o.Scanned +} + +// GetScannedOk returns a tuple with the Scanned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetScannedOk() (*bool, bool) { + if o == nil || IsNil(o.Scanned) { + return nil, false + } + return o.Scanned, true +} + +// HasScanned returns a boolean if a field has been set. +func (o *Asset) HasScanned() bool { + if o != nil && !IsNil(o.Scanned) { + return true + } + + return false +} + +// SetScanned gets a reference to the given bool and assigns it to the Scanned field. +func (o *Asset) SetScanned(v bool) { + o.Scanned = &v +} + // GetAlive returns the Alive field value if set, zero value otherwise. func (o *Asset) GetAlive() bool { - if o == nil || o.Alive == nil { + if o == nil || IsNil(o.Alive) { var ret bool return ret } @@ -244,7 +296,7 @@ func (o *Asset) GetAlive() bool { // GetAliveOk returns a tuple with the Alive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetAliveOk() (*bool, bool) { - if o == nil || o.Alive == nil { + if o == nil || IsNil(o.Alive) { return nil, false } return o.Alive, true @@ -252,7 +304,7 @@ func (o *Asset) GetAliveOk() (*bool, bool) { // HasAlive returns a boolean if a field has been set. func (o *Asset) HasAlive() bool { - if o != nil && o.Alive != nil { + if o != nil && !IsNil(o.Alive) { return true } @@ -266,7 +318,7 @@ func (o *Asset) SetAlive(v bool) { // GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. func (o *Asset) GetFirstSeen() int64 { - if o == nil || o.FirstSeen == nil { + if o == nil || IsNil(o.FirstSeen) { var ret int64 return ret } @@ -276,7 +328,7 @@ func (o *Asset) GetFirstSeen() int64 { // GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetFirstSeenOk() (*int64, bool) { - if o == nil || o.FirstSeen == nil { + if o == nil || IsNil(o.FirstSeen) { return nil, false } return o.FirstSeen, true @@ -284,7 +336,7 @@ func (o *Asset) GetFirstSeenOk() (*int64, bool) { // HasFirstSeen returns a boolean if a field has been set. func (o *Asset) HasFirstSeen() bool { - if o != nil && o.FirstSeen != nil { + if o != nil && !IsNil(o.FirstSeen) { return true } @@ -298,7 +350,7 @@ func (o *Asset) SetFirstSeen(v int64) { // GetLastSeen returns the LastSeen field value if set, zero value otherwise. func (o *Asset) GetLastSeen() int64 { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { var ret int64 return ret } @@ -308,7 +360,7 @@ func (o *Asset) GetLastSeen() int64 { // GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetLastSeenOk() (*int64, bool) { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { return nil, false } return o.LastSeen, true @@ -316,7 +368,7 @@ func (o *Asset) GetLastSeenOk() (*int64, bool) { // HasLastSeen returns a boolean if a field has been set. func (o *Asset) HasLastSeen() bool { - if o != nil && o.LastSeen != nil { + if o != nil && !IsNil(o.LastSeen) { return true } @@ -330,7 +382,7 @@ func (o *Asset) SetLastSeen(v int64) { // GetDetectedBy returns the DetectedBy field value if set, zero value otherwise. func (o *Asset) GetDetectedBy() string { - if o == nil || o.DetectedBy == nil { + if o == nil || IsNil(o.DetectedBy) { var ret string return ret } @@ -340,7 +392,7 @@ func (o *Asset) GetDetectedBy() string { // GetDetectedByOk returns a tuple with the DetectedBy field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetDetectedByOk() (*string, bool) { - if o == nil || o.DetectedBy == nil { + if o == nil || IsNil(o.DetectedBy) { return nil, false } return o.DetectedBy, true @@ -348,7 +400,7 @@ func (o *Asset) GetDetectedByOk() (*string, bool) { // HasDetectedBy returns a boolean if a field has been set. func (o *Asset) HasDetectedBy() bool { - if o != nil && o.DetectedBy != nil { + if o != nil && !IsNil(o.DetectedBy) { return true } @@ -362,7 +414,7 @@ func (o *Asset) SetDetectedBy(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *Asset) GetType() string { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret string return ret } @@ -372,7 +424,7 @@ func (o *Asset) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -380,7 +432,7 @@ func (o *Asset) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *Asset) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -394,7 +446,7 @@ func (o *Asset) SetType(v string) { // GetOs returns the Os field value if set, zero value otherwise. func (o *Asset) GetOs() string { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { var ret string return ret } @@ -404,7 +456,7 @@ func (o *Asset) GetOs() string { // GetOsOk returns a tuple with the Os field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetOsOk() (*string, bool) { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { return nil, false } return o.Os, true @@ -412,7 +464,7 @@ func (o *Asset) GetOsOk() (*string, bool) { // HasOs returns a boolean if a field has been set. func (o *Asset) HasOs() bool { - if o != nil && o.Os != nil { + if o != nil && !IsNil(o.Os) { return true } @@ -426,7 +478,7 @@ func (o *Asset) SetOs(v string) { // GetOsVersion returns the OsVersion field value if set, zero value otherwise. func (o *Asset) GetOsVersion() string { - if o == nil || o.OsVersion == nil { + if o == nil || IsNil(o.OsVersion) { var ret string return ret } @@ -436,7 +488,7 @@ func (o *Asset) GetOsVersion() string { // GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetOsVersionOk() (*string, bool) { - if o == nil || o.OsVersion == nil { + if o == nil || IsNil(o.OsVersion) { return nil, false } return o.OsVersion, true @@ -444,7 +496,7 @@ func (o *Asset) GetOsVersionOk() (*string, bool) { // HasOsVersion returns a boolean if a field has been set. func (o *Asset) HasOsVersion() bool { - if o != nil && o.OsVersion != nil { + if o != nil && !IsNil(o.OsVersion) { return true } @@ -458,7 +510,7 @@ func (o *Asset) SetOsVersion(v string) { // GetHw returns the Hw field value if set, zero value otherwise. func (o *Asset) GetHw() string { - if o == nil || o.Hw == nil { + if o == nil || IsNil(o.Hw) { var ret string return ret } @@ -468,7 +520,7 @@ func (o *Asset) GetHw() string { // GetHwOk returns a tuple with the Hw field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetHwOk() (*string, bool) { - if o == nil || o.Hw == nil { + if o == nil || IsNil(o.Hw) { return nil, false } return o.Hw, true @@ -476,7 +528,7 @@ func (o *Asset) GetHwOk() (*string, bool) { // HasHw returns a boolean if a field has been set. func (o *Asset) HasHw() bool { - if o != nil && o.Hw != nil { + if o != nil && !IsNil(o.Hw) { return true } @@ -489,18 +541,18 @@ func (o *Asset) SetHw(v string) { } // GetAddresses returns the Addresses field value if set, zero value otherwise. -func (o *Asset) GetAddresses() []string { - if o == nil || o.Addresses == nil { - var ret []string +func (o *Asset) GetAddresses() []*string { + if o == nil || IsNil(o.Addresses) { + var ret []*string return ret } - return *o.Addresses + return o.Addresses } // GetAddressesOk returns a tuple with the Addresses field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetAddressesOk() (*[]string, bool) { - if o == nil || o.Addresses == nil { +func (o *Asset) GetAddressesOk() ([]*string, bool) { + if o == nil || IsNil(o.Addresses) { return nil, false } return o.Addresses, true @@ -508,31 +560,31 @@ func (o *Asset) GetAddressesOk() (*[]string, bool) { // HasAddresses returns a boolean if a field has been set. func (o *Asset) HasAddresses() bool { - if o != nil && o.Addresses != nil { + if o != nil && !IsNil(o.Addresses) { return true } return false } -// SetAddresses gets a reference to the given []string and assigns it to the Addresses field. -func (o *Asset) SetAddresses(v []string) { - o.Addresses = &v +// SetAddresses gets a reference to the given []*string and assigns it to the Addresses field. +func (o *Asset) SetAddresses(v []*string) { + o.Addresses = v } // GetAddressesExtra returns the AddressesExtra field value if set, zero value otherwise. -func (o *Asset) GetAddressesExtra() []string { - if o == nil || o.AddressesExtra == nil { - var ret []string +func (o *Asset) GetAddressesExtra() []*string { + if o == nil || IsNil(o.AddressesExtra) { + var ret []*string return ret } - return *o.AddressesExtra + return o.AddressesExtra } // GetAddressesExtraOk returns a tuple with the AddressesExtra field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetAddressesExtraOk() (*[]string, bool) { - if o == nil || o.AddressesExtra == nil { +func (o *Asset) GetAddressesExtraOk() ([]*string, bool) { + if o == nil || IsNil(o.AddressesExtra) { return nil, false } return o.AddressesExtra, true @@ -540,31 +592,31 @@ func (o *Asset) GetAddressesExtraOk() (*[]string, bool) { // HasAddressesExtra returns a boolean if a field has been set. func (o *Asset) HasAddressesExtra() bool { - if o != nil && o.AddressesExtra != nil { + if o != nil && !IsNil(o.AddressesExtra) { return true } return false } -// SetAddressesExtra gets a reference to the given []string and assigns it to the AddressesExtra field. -func (o *Asset) SetAddressesExtra(v []string) { - o.AddressesExtra = &v +// SetAddressesExtra gets a reference to the given []*string and assigns it to the AddressesExtra field. +func (o *Asset) SetAddressesExtra(v []*string) { + o.AddressesExtra = v } // GetMacs returns the Macs field value if set, zero value otherwise. func (o *Asset) GetMacs() []string { - if o == nil || o.Macs == nil { + if o == nil || IsNil(o.Macs) { var ret []string return ret } - return *o.Macs + return o.Macs } // GetMacsOk returns a tuple with the Macs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetMacsOk() (*[]string, bool) { - if o == nil || o.Macs == nil { +func (o *Asset) GetMacsOk() ([]string, bool) { + if o == nil || IsNil(o.Macs) { return nil, false } return o.Macs, true @@ -572,7 +624,7 @@ func (o *Asset) GetMacsOk() (*[]string, bool) { // HasMacs returns a boolean if a field has been set. func (o *Asset) HasMacs() bool { - if o != nil && o.Macs != nil { + if o != nil && !IsNil(o.Macs) { return true } @@ -581,22 +633,22 @@ func (o *Asset) HasMacs() bool { // SetMacs gets a reference to the given []string and assigns it to the Macs field. func (o *Asset) SetMacs(v []string) { - o.Macs = &v + o.Macs = v } // GetMacVendors returns the MacVendors field value if set, zero value otherwise. func (o *Asset) GetMacVendors() []string { - if o == nil || o.MacVendors == nil { + if o == nil || IsNil(o.MacVendors) { var ret []string return ret } - return *o.MacVendors + return o.MacVendors } // GetMacVendorsOk returns a tuple with the MacVendors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetMacVendorsOk() (*[]string, bool) { - if o == nil || o.MacVendors == nil { +func (o *Asset) GetMacVendorsOk() ([]string, bool) { + if o == nil || IsNil(o.MacVendors) { return nil, false } return o.MacVendors, true @@ -604,7 +656,7 @@ func (o *Asset) GetMacVendorsOk() (*[]string, bool) { // HasMacVendors returns a boolean if a field has been set. func (o *Asset) HasMacVendors() bool { - if o != nil && o.MacVendors != nil { + if o != nil && !IsNil(o.MacVendors) { return true } @@ -613,22 +665,22 @@ func (o *Asset) HasMacVendors() bool { // SetMacVendors gets a reference to the given []string and assigns it to the MacVendors field. func (o *Asset) SetMacVendors(v []string) { - o.MacVendors = &v + o.MacVendors = v } // GetNames returns the Names field value if set, zero value otherwise. func (o *Asset) GetNames() []string { - if o == nil || o.Names == nil { + if o == nil || IsNil(o.Names) { var ret []string return ret } - return *o.Names + return o.Names } // GetNamesOk returns a tuple with the Names field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetNamesOk() (*[]string, bool) { - if o == nil || o.Names == nil { +func (o *Asset) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { return nil, false } return o.Names, true @@ -636,7 +688,7 @@ func (o *Asset) GetNamesOk() (*[]string, bool) { // HasNames returns a boolean if a field has been set. func (o *Asset) HasNames() bool { - if o != nil && o.Names != nil { + if o != nil && !IsNil(o.Names) { return true } @@ -645,22 +697,22 @@ func (o *Asset) HasNames() bool { // SetNames gets a reference to the given []string and assigns it to the Names field. func (o *Asset) SetNames(v []string) { - o.Names = &v + o.Names = v } // GetDomains returns the Domains field value if set, zero value otherwise. func (o *Asset) GetDomains() []string { - if o == nil || o.Domains == nil { + if o == nil || IsNil(o.Domains) { var ret []string return ret } - return *o.Domains + return o.Domains } // GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetDomainsOk() (*[]string, bool) { - if o == nil || o.Domains == nil { +func (o *Asset) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { return nil, false } return o.Domains, true @@ -668,7 +720,7 @@ func (o *Asset) GetDomainsOk() (*[]string, bool) { // HasDomains returns a boolean if a field has been set. func (o *Asset) HasDomains() bool { - if o != nil && o.Domains != nil { + if o != nil && !IsNil(o.Domains) { return true } @@ -677,12 +729,12 @@ func (o *Asset) HasDomains() bool { // SetDomains gets a reference to the given []string and assigns it to the Domains field. func (o *Asset) SetDomains(v []string) { - o.Domains = &v + o.Domains = v } // GetServiceCount returns the ServiceCount field value if set, zero value otherwise. func (o *Asset) GetServiceCount() int64 { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { var ret int64 return ret } @@ -692,7 +744,7 @@ func (o *Asset) GetServiceCount() int64 { // GetServiceCountOk returns a tuple with the ServiceCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServiceCountOk() (*int64, bool) { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { return nil, false } return o.ServiceCount, true @@ -700,7 +752,7 @@ func (o *Asset) GetServiceCountOk() (*int64, bool) { // HasServiceCount returns a boolean if a field has been set. func (o *Asset) HasServiceCount() bool { - if o != nil && o.ServiceCount != nil { + if o != nil && !IsNil(o.ServiceCount) { return true } @@ -714,7 +766,7 @@ func (o *Asset) SetServiceCount(v int64) { // GetServiceCountTcp returns the ServiceCountTcp field value if set, zero value otherwise. func (o *Asset) GetServiceCountTcp() int64 { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { var ret int64 return ret } @@ -724,7 +776,7 @@ func (o *Asset) GetServiceCountTcp() int64 { // GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServiceCountTcpOk() (*int64, bool) { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { return nil, false } return o.ServiceCountTcp, true @@ -732,7 +784,7 @@ func (o *Asset) GetServiceCountTcpOk() (*int64, bool) { // HasServiceCountTcp returns a boolean if a field has been set. func (o *Asset) HasServiceCountTcp() bool { - if o != nil && o.ServiceCountTcp != nil { + if o != nil && !IsNil(o.ServiceCountTcp) { return true } @@ -746,7 +798,7 @@ func (o *Asset) SetServiceCountTcp(v int64) { // GetServiceCountUdp returns the ServiceCountUdp field value if set, zero value otherwise. func (o *Asset) GetServiceCountUdp() int64 { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { var ret int64 return ret } @@ -756,7 +808,7 @@ func (o *Asset) GetServiceCountUdp() int64 { // GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServiceCountUdpOk() (*int64, bool) { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { return nil, false } return o.ServiceCountUdp, true @@ -764,7 +816,7 @@ func (o *Asset) GetServiceCountUdpOk() (*int64, bool) { // HasServiceCountUdp returns a boolean if a field has been set. func (o *Asset) HasServiceCountUdp() bool { - if o != nil && o.ServiceCountUdp != nil { + if o != nil && !IsNil(o.ServiceCountUdp) { return true } @@ -778,7 +830,7 @@ func (o *Asset) SetServiceCountUdp(v int64) { // GetServiceCountArp returns the ServiceCountArp field value if set, zero value otherwise. func (o *Asset) GetServiceCountArp() int64 { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { var ret int64 return ret } @@ -788,7 +840,7 @@ func (o *Asset) GetServiceCountArp() int64 { // GetServiceCountArpOk returns a tuple with the ServiceCountArp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServiceCountArpOk() (*int64, bool) { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { return nil, false } return o.ServiceCountArp, true @@ -796,7 +848,7 @@ func (o *Asset) GetServiceCountArpOk() (*int64, bool) { // HasServiceCountArp returns a boolean if a field has been set. func (o *Asset) HasServiceCountArp() bool { - if o != nil && o.ServiceCountArp != nil { + if o != nil && !IsNil(o.ServiceCountArp) { return true } @@ -810,7 +862,7 @@ func (o *Asset) SetServiceCountArp(v int64) { // GetServiceCountIcmp returns the ServiceCountIcmp field value if set, zero value otherwise. func (o *Asset) GetServiceCountIcmp() int64 { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { var ret int64 return ret } @@ -820,7 +872,7 @@ func (o *Asset) GetServiceCountIcmp() int64 { // GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServiceCountIcmpOk() (*int64, bool) { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { return nil, false } return o.ServiceCountIcmp, true @@ -828,7 +880,7 @@ func (o *Asset) GetServiceCountIcmpOk() (*int64, bool) { // HasServiceCountIcmp returns a boolean if a field has been set. func (o *Asset) HasServiceCountIcmp() bool { - if o != nil && o.ServiceCountIcmp != nil { + if o != nil && !IsNil(o.ServiceCountIcmp) { return true } @@ -842,7 +894,7 @@ func (o *Asset) SetServiceCountIcmp(v int64) { // GetLowestTtl returns the LowestTtl field value if set, zero value otherwise. func (o *Asset) GetLowestTtl() int64 { - if o == nil || o.LowestTtl == nil { + if o == nil || IsNil(o.LowestTtl) { var ret int64 return ret } @@ -852,7 +904,7 @@ func (o *Asset) GetLowestTtl() int64 { // GetLowestTtlOk returns a tuple with the LowestTtl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetLowestTtlOk() (*int64, bool) { - if o == nil || o.LowestTtl == nil { + if o == nil || IsNil(o.LowestTtl) { return nil, false } return o.LowestTtl, true @@ -860,7 +912,7 @@ func (o *Asset) GetLowestTtlOk() (*int64, bool) { // HasLowestTtl returns a boolean if a field has been set. func (o *Asset) HasLowestTtl() bool { - if o != nil && o.LowestTtl != nil { + if o != nil && !IsNil(o.LowestTtl) { return true } @@ -874,7 +926,7 @@ func (o *Asset) SetLowestTtl(v int64) { // GetLowestRtt returns the LowestRtt field value if set, zero value otherwise. func (o *Asset) GetLowestRtt() int64 { - if o == nil || o.LowestRtt == nil { + if o == nil || IsNil(o.LowestRtt) { var ret int64 return ret } @@ -884,7 +936,7 @@ func (o *Asset) GetLowestRtt() int64 { // GetLowestRttOk returns a tuple with the LowestRtt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetLowestRttOk() (*int64, bool) { - if o == nil || o.LowestRtt == nil { + if o == nil || IsNil(o.LowestRtt) { return nil, false } return o.LowestRtt, true @@ -892,7 +944,7 @@ func (o *Asset) GetLowestRttOk() (*int64, bool) { // HasLowestRtt returns a boolean if a field has been set. func (o *Asset) HasLowestRtt() bool { - if o != nil && o.LowestRtt != nil { + if o != nil && !IsNil(o.LowestRtt) { return true } @@ -906,7 +958,7 @@ func (o *Asset) SetLowestRtt(v int64) { // GetLastAgentId returns the LastAgentId field value if set, zero value otherwise. func (o *Asset) GetLastAgentId() string { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { var ret string return ret } @@ -916,7 +968,7 @@ func (o *Asset) GetLastAgentId() string { // GetLastAgentIdOk returns a tuple with the LastAgentId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetLastAgentIdOk() (*string, bool) { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { return nil, false } return o.LastAgentId, true @@ -924,7 +976,7 @@ func (o *Asset) GetLastAgentIdOk() (*string, bool) { // HasLastAgentId returns a boolean if a field has been set. func (o *Asset) HasLastAgentId() bool { - if o != nil && o.LastAgentId != nil { + if o != nil && !IsNil(o.LastAgentId) { return true } @@ -938,7 +990,7 @@ func (o *Asset) SetLastAgentId(v string) { // GetLastTaskId returns the LastTaskId field value if set, zero value otherwise. func (o *Asset) GetLastTaskId() string { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { var ret string return ret } @@ -948,7 +1000,7 @@ func (o *Asset) GetLastTaskId() string { // GetLastTaskIdOk returns a tuple with the LastTaskId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetLastTaskIdOk() (*string, bool) { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { return nil, false } return o.LastTaskId, true @@ -956,7 +1008,7 @@ func (o *Asset) GetLastTaskIdOk() (*string, bool) { // HasLastTaskId returns a boolean if a field has been set. func (o *Asset) HasLastTaskId() bool { - if o != nil && o.LastTaskId != nil { + if o != nil && !IsNil(o.LastTaskId) { return true } @@ -970,7 +1022,7 @@ func (o *Asset) SetLastTaskId(v string) { // GetNewestMac returns the NewestMac field value if set, zero value otherwise. func (o *Asset) GetNewestMac() string { - if o == nil || o.NewestMac == nil { + if o == nil || IsNil(o.NewestMac) { var ret string return ret } @@ -980,7 +1032,7 @@ func (o *Asset) GetNewestMac() string { // GetNewestMacOk returns a tuple with the NewestMac field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetNewestMacOk() (*string, bool) { - if o == nil || o.NewestMac == nil { + if o == nil || IsNil(o.NewestMac) { return nil, false } return o.NewestMac, true @@ -988,7 +1040,7 @@ func (o *Asset) GetNewestMacOk() (*string, bool) { // HasNewestMac returns a boolean if a field has been set. func (o *Asset) HasNewestMac() bool { - if o != nil && o.NewestMac != nil { + if o != nil && !IsNil(o.NewestMac) { return true } @@ -1002,7 +1054,7 @@ func (o *Asset) SetNewestMac(v string) { // GetNewestMacVendor returns the NewestMacVendor field value if set, zero value otherwise. func (o *Asset) GetNewestMacVendor() string { - if o == nil || o.NewestMacVendor == nil { + if o == nil || IsNil(o.NewestMacVendor) { var ret string return ret } @@ -1012,7 +1064,7 @@ func (o *Asset) GetNewestMacVendor() string { // GetNewestMacVendorOk returns a tuple with the NewestMacVendor field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetNewestMacVendorOk() (*string, bool) { - if o == nil || o.NewestMacVendor == nil { + if o == nil || IsNil(o.NewestMacVendor) { return nil, false } return o.NewestMacVendor, true @@ -1020,7 +1072,7 @@ func (o *Asset) GetNewestMacVendorOk() (*string, bool) { // HasNewestMacVendor returns a boolean if a field has been set. func (o *Asset) HasNewestMacVendor() bool { - if o != nil && o.NewestMacVendor != nil { + if o != nil && !IsNil(o.NewestMacVendor) { return true } @@ -1034,7 +1086,7 @@ func (o *Asset) SetNewestMacVendor(v string) { // GetNewestMacAge returns the NewestMacAge field value if set, zero value otherwise. func (o *Asset) GetNewestMacAge() int64 { - if o == nil || o.NewestMacAge == nil { + if o == nil || IsNil(o.NewestMacAge) { var ret int64 return ret } @@ -1044,7 +1096,7 @@ func (o *Asset) GetNewestMacAge() int64 { // GetNewestMacAgeOk returns a tuple with the NewestMacAge field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetNewestMacAgeOk() (*int64, bool) { - if o == nil || o.NewestMacAge == nil { + if o == nil || IsNil(o.NewestMacAge) { return nil, false } return o.NewestMacAge, true @@ -1052,7 +1104,7 @@ func (o *Asset) GetNewestMacAgeOk() (*int64, bool) { // HasNewestMacAge returns a boolean if a field has been set. func (o *Asset) HasNewestMacAge() bool { - if o != nil && o.NewestMacAge != nil { + if o != nil && !IsNil(o.NewestMacAge) { return true } @@ -1066,7 +1118,7 @@ func (o *Asset) SetNewestMacAge(v int64) { // GetComments returns the Comments field value if set, zero value otherwise. func (o *Asset) GetComments() string { - if o == nil || o.Comments == nil { + if o == nil || IsNil(o.Comments) { var ret string return ret } @@ -1076,7 +1128,7 @@ func (o *Asset) GetComments() string { // GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetCommentsOk() (*string, bool) { - if o == nil || o.Comments == nil { + if o == nil || IsNil(o.Comments) { return nil, false } return o.Comments, true @@ -1084,7 +1136,7 @@ func (o *Asset) GetCommentsOk() (*string, bool) { // HasComments returns a boolean if a field has been set. func (o *Asset) HasComments() bool { - if o != nil && o.Comments != nil { + if o != nil && !IsNil(o.Comments) { return true } @@ -1098,17 +1150,17 @@ func (o *Asset) SetComments(v string) { // GetServicePortsTcp returns the ServicePortsTcp field value if set, zero value otherwise. func (o *Asset) GetServicePortsTcp() []string { - if o == nil || o.ServicePortsTcp == nil { + if o == nil || IsNil(o.ServicePortsTcp) { var ret []string return ret } - return *o.ServicePortsTcp + return o.ServicePortsTcp } // GetServicePortsTcpOk returns a tuple with the ServicePortsTcp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetServicePortsTcpOk() (*[]string, bool) { - if o == nil || o.ServicePortsTcp == nil { +func (o *Asset) GetServicePortsTcpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsTcp) { return nil, false } return o.ServicePortsTcp, true @@ -1116,7 +1168,7 @@ func (o *Asset) GetServicePortsTcpOk() (*[]string, bool) { // HasServicePortsTcp returns a boolean if a field has been set. func (o *Asset) HasServicePortsTcp() bool { - if o != nil && o.ServicePortsTcp != nil { + if o != nil && !IsNil(o.ServicePortsTcp) { return true } @@ -1125,22 +1177,22 @@ func (o *Asset) HasServicePortsTcp() bool { // SetServicePortsTcp gets a reference to the given []string and assigns it to the ServicePortsTcp field. func (o *Asset) SetServicePortsTcp(v []string) { - o.ServicePortsTcp = &v + o.ServicePortsTcp = v } // GetServicePortsUdp returns the ServicePortsUdp field value if set, zero value otherwise. func (o *Asset) GetServicePortsUdp() []string { - if o == nil || o.ServicePortsUdp == nil { + if o == nil || IsNil(o.ServicePortsUdp) { var ret []string return ret } - return *o.ServicePortsUdp + return o.ServicePortsUdp } // GetServicePortsUdpOk returns a tuple with the ServicePortsUdp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetServicePortsUdpOk() (*[]string, bool) { - if o == nil || o.ServicePortsUdp == nil { +func (o *Asset) GetServicePortsUdpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsUdp) { return nil, false } return o.ServicePortsUdp, true @@ -1148,7 +1200,7 @@ func (o *Asset) GetServicePortsUdpOk() (*[]string, bool) { // HasServicePortsUdp returns a boolean if a field has been set. func (o *Asset) HasServicePortsUdp() bool { - if o != nil && o.ServicePortsUdp != nil { + if o != nil && !IsNil(o.ServicePortsUdp) { return true } @@ -1157,76 +1209,76 @@ func (o *Asset) HasServicePortsUdp() bool { // SetServicePortsUdp gets a reference to the given []string and assigns it to the ServicePortsUdp field. func (o *Asset) SetServicePortsUdp(v []string) { - o.ServicePortsUdp = &v + o.ServicePortsUdp = v } -// GetServicePortsProtocols returns the ServicePortsProtocols field value if set, zero value otherwise. -func (o *Asset) GetServicePortsProtocols() []string { - if o == nil || o.ServicePortsProtocols == nil { +// GetServiceProtocols returns the ServiceProtocols field value if set, zero value otherwise. +func (o *Asset) GetServiceProtocols() []string { + if o == nil || IsNil(o.ServiceProtocols) { var ret []string return ret } - return *o.ServicePortsProtocols + return o.ServiceProtocols } -// GetServicePortsProtocolsOk returns a tuple with the ServicePortsProtocols field value if set, nil otherwise +// GetServiceProtocolsOk returns a tuple with the ServiceProtocols field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetServicePortsProtocolsOk() (*[]string, bool) { - if o == nil || o.ServicePortsProtocols == nil { +func (o *Asset) GetServiceProtocolsOk() ([]string, bool) { + if o == nil || IsNil(o.ServiceProtocols) { return nil, false } - return o.ServicePortsProtocols, true + return o.ServiceProtocols, true } -// HasServicePortsProtocols returns a boolean if a field has been set. -func (o *Asset) HasServicePortsProtocols() bool { - if o != nil && o.ServicePortsProtocols != nil { +// HasServiceProtocols returns a boolean if a field has been set. +func (o *Asset) HasServiceProtocols() bool { + if o != nil && !IsNil(o.ServiceProtocols) { return true } return false } -// SetServicePortsProtocols gets a reference to the given []string and assigns it to the ServicePortsProtocols field. -func (o *Asset) SetServicePortsProtocols(v []string) { - o.ServicePortsProtocols = &v +// SetServiceProtocols gets a reference to the given []string and assigns it to the ServiceProtocols field. +func (o *Asset) SetServiceProtocols(v []string) { + o.ServiceProtocols = v } -// GetServicePortsProducts returns the ServicePortsProducts field value if set, zero value otherwise. -func (o *Asset) GetServicePortsProducts() []string { - if o == nil || o.ServicePortsProducts == nil { +// GetServiceProducts returns the ServiceProducts field value if set, zero value otherwise. +func (o *Asset) GetServiceProducts() []string { + if o == nil || IsNil(o.ServiceProducts) { var ret []string return ret } - return *o.ServicePortsProducts + return o.ServiceProducts } -// GetServicePortsProductsOk returns a tuple with the ServicePortsProducts field value if set, nil otherwise +// GetServiceProductsOk returns a tuple with the ServiceProducts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetServicePortsProductsOk() (*[]string, bool) { - if o == nil || o.ServicePortsProducts == nil { +func (o *Asset) GetServiceProductsOk() ([]string, bool) { + if o == nil || IsNil(o.ServiceProducts) { return nil, false } - return o.ServicePortsProducts, true + return o.ServiceProducts, true } -// HasServicePortsProducts returns a boolean if a field has been set. -func (o *Asset) HasServicePortsProducts() bool { - if o != nil && o.ServicePortsProducts != nil { +// HasServiceProducts returns a boolean if a field has been set. +func (o *Asset) HasServiceProducts() bool { + if o != nil && !IsNil(o.ServiceProducts) { return true } return false } -// SetServicePortsProducts gets a reference to the given []string and assigns it to the ServicePortsProducts field. -func (o *Asset) SetServicePortsProducts(v []string) { - o.ServicePortsProducts = &v +// SetServiceProducts gets a reference to the given []string and assigns it to the ServiceProducts field. +func (o *Asset) SetServiceProducts(v []string) { + o.ServiceProducts = v } // GetOrgName returns the OrgName field value if set, zero value otherwise. func (o *Asset) GetOrgName() string { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { var ret string return ret } @@ -1236,7 +1288,7 @@ func (o *Asset) GetOrgName() string { // GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetOrgNameOk() (*string, bool) { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { return nil, false } return o.OrgName, true @@ -1244,7 +1296,7 @@ func (o *Asset) GetOrgNameOk() (*string, bool) { // HasOrgName returns a boolean if a field has been set. func (o *Asset) HasOrgName() bool { - if o != nil && o.OrgName != nil { + if o != nil && !IsNil(o.OrgName) { return true } @@ -1258,7 +1310,7 @@ func (o *Asset) SetOrgName(v string) { // GetSiteName returns the SiteName field value if set, zero value otherwise. func (o *Asset) GetSiteName() string { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { var ret string return ret } @@ -1268,7 +1320,7 @@ func (o *Asset) GetSiteName() string { // GetSiteNameOk returns a tuple with the SiteName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetSiteNameOk() (*string, bool) { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { return nil, false } return o.SiteName, true @@ -1276,7 +1328,7 @@ func (o *Asset) GetSiteNameOk() (*string, bool) { // HasSiteName returns a boolean if a field has been set. func (o *Asset) HasSiteName() bool { - if o != nil && o.SiteName != nil { + if o != nil && !IsNil(o.SiteName) { return true } @@ -1290,7 +1342,7 @@ func (o *Asset) SetSiteName(v string) { // GetAgentName returns the AgentName field value if set, zero value otherwise. func (o *Asset) GetAgentName() string { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { var ret string return ret } @@ -1300,7 +1352,7 @@ func (o *Asset) GetAgentName() string { // GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetAgentNameOk() (*string, bool) { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { return nil, false } return o.AgentName, true @@ -1308,7 +1360,7 @@ func (o *Asset) GetAgentNameOk() (*string, bool) { // HasAgentName returns a boolean if a field has been set. func (o *Asset) HasAgentName() bool { - if o != nil && o.AgentName != nil { + if o != nil && !IsNil(o.AgentName) { return true } @@ -1322,7 +1374,7 @@ func (o *Asset) SetAgentName(v string) { // GetTags returns the Tags field value if set, zero value otherwise. func (o *Asset) GetTags() map[string]string { - if o == nil || o.Tags == nil { + if o == nil || IsNil(o.Tags) { var ret map[string]string return ret } @@ -1332,7 +1384,7 @@ func (o *Asset) GetTags() map[string]string { // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetTagsOk() (*map[string]string, bool) { - if o == nil || o.Tags == nil { + if o == nil || IsNil(o.Tags) { return nil, false } return o.Tags, true @@ -1340,7 +1392,7 @@ func (o *Asset) GetTagsOk() (*map[string]string, bool) { // HasTags returns a boolean if a field has been set. func (o *Asset) HasTags() bool { - if o != nil && o.Tags != nil { + if o != nil && !IsNil(o.Tags) { return true } @@ -1354,7 +1406,7 @@ func (o *Asset) SetTags(v map[string]string) { // GetServices returns the Services field value if set, zero value otherwise. func (o *Asset) GetServices() map[string]map[string]string { - if o == nil || o.Services == nil { + if o == nil || IsNil(o.Services) { var ret map[string]map[string]string return ret } @@ -1364,7 +1416,7 @@ func (o *Asset) GetServices() map[string]map[string]string { // GetServicesOk returns a tuple with the Services field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetServicesOk() (*map[string]map[string]string, bool) { - if o == nil || o.Services == nil { + if o == nil || IsNil(o.Services) { return nil, false } return o.Services, true @@ -1372,7 +1424,7 @@ func (o *Asset) GetServicesOk() (*map[string]map[string]string, bool) { // HasServices returns a boolean if a field has been set. func (o *Asset) HasServices() bool { - if o != nil && o.Services != nil { + if o != nil && !IsNil(o.Services) { return true } @@ -1385,40 +1437,104 @@ func (o *Asset) SetServices(v map[string]map[string]string) { } // GetRtts returns the Rtts field value if set, zero value otherwise. -func (o *Asset) GetRtts() map[string]map[string]interface{} { - if o == nil || o.Rtts == nil { - var ret map[string]map[string]interface{} +func (o *Asset) GetRtts() map[string]interface{} { + if o == nil || IsNil(o.Rtts) { + var ret map[string]interface{} return ret } - return *o.Rtts + return o.Rtts } // GetRttsOk returns a tuple with the Rtts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Asset) GetRttsOk() (*map[string]map[string]interface{}, bool) { - if o == nil || o.Rtts == nil { - return nil, false +func (o *Asset) GetRttsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Rtts) { + return map[string]interface{}{}, false } return o.Rtts, true } // HasRtts returns a boolean if a field has been set. func (o *Asset) HasRtts() bool { - if o != nil && o.Rtts != nil { + if o != nil && !IsNil(o.Rtts) { + return true + } + + return false +} + +// SetRtts gets a reference to the given map[string]interface{} and assigns it to the Rtts field. +func (o *Asset) SetRtts(v map[string]interface{}) { + o.Rtts = v +} + +// GetRiskRank returns the RiskRank field value if set, zero value otherwise. +func (o *Asset) GetRiskRank() float32 { + if o == nil || IsNil(o.RiskRank) { + var ret float32 + return ret + } + return *o.RiskRank +} + +// GetRiskRankOk returns a tuple with the RiskRank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetRiskRankOk() (*float32, bool) { + if o == nil || IsNil(o.RiskRank) { + return nil, false + } + return o.RiskRank, true +} + +// HasRiskRank returns a boolean if a field has been set. +func (o *Asset) HasRiskRank() bool { + if o != nil && !IsNil(o.RiskRank) { return true } return false } -// SetRtts gets a reference to the given map[string]map[string]interface{} and assigns it to the Rtts field. -func (o *Asset) SetRtts(v map[string]map[string]interface{}) { - o.Rtts = &v +// SetRiskRank gets a reference to the given float32 and assigns it to the RiskRank field. +func (o *Asset) SetRiskRank(v float32) { + o.RiskRank = &v +} + +// GetRisk returns the Risk field value if set, zero value otherwise. +func (o *Asset) GetRisk() string { + if o == nil || IsNil(o.Risk) { + var ret string + return ret + } + return *o.Risk +} + +// GetRiskOk returns a tuple with the Risk field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetRiskOk() (*string, bool) { + if o == nil || IsNil(o.Risk) { + return nil, false + } + return o.Risk, true +} + +// HasRisk returns a boolean if a field has been set. +func (o *Asset) HasRisk() bool { + if o != nil && !IsNil(o.Risk) { + return true + } + + return false +} + +// SetRisk gets a reference to the given string and assigns it to the Risk field. +func (o *Asset) SetRisk(v string) { + o.Risk = &v } // GetCredentials returns the Credentials field value if set, zero value otherwise. func (o *Asset) GetCredentials() map[string]map[string]bool { - if o == nil || o.Credentials == nil { + if o == nil || IsNil(o.Credentials) { var ret map[string]map[string]bool return ret } @@ -1428,7 +1544,7 @@ func (o *Asset) GetCredentials() map[string]map[string]bool { // GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetCredentialsOk() (*map[string]map[string]bool, bool) { - if o == nil || o.Credentials == nil { + if o == nil || IsNil(o.Credentials) { return nil, false } return o.Credentials, true @@ -1436,7 +1552,7 @@ func (o *Asset) GetCredentialsOk() (*map[string]map[string]bool, bool) { // HasCredentials returns a boolean if a field has been set. func (o *Asset) HasCredentials() bool { - if o != nil && o.Credentials != nil { + if o != nil && !IsNil(o.Credentials) { return true } @@ -1448,9 +1564,169 @@ func (o *Asset) SetCredentials(v map[string]map[string]bool) { o.Credentials = &v } +// GetVulnerabilityCount returns the VulnerabilityCount field value if set, zero value otherwise. +func (o *Asset) GetVulnerabilityCount() float32 { + if o == nil || IsNil(o.VulnerabilityCount) { + var ret float32 + return ret + } + return *o.VulnerabilityCount +} + +// GetVulnerabilityCountOk returns a tuple with the VulnerabilityCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetVulnerabilityCountOk() (*float32, bool) { + if o == nil || IsNil(o.VulnerabilityCount) { + return nil, false + } + return o.VulnerabilityCount, true +} + +// HasVulnerabilityCount returns a boolean if a field has been set. +func (o *Asset) HasVulnerabilityCount() bool { + if o != nil && !IsNil(o.VulnerabilityCount) { + return true + } + + return false +} + +// SetVulnerabilityCount gets a reference to the given float32 and assigns it to the VulnerabilityCount field. +func (o *Asset) SetVulnerabilityCount(v float32) { + o.VulnerabilityCount = &v +} + +// GetFindingCount returns the FindingCount field value if set, zero value otherwise. +func (o *Asset) GetFindingCount() float32 { + if o == nil || IsNil(o.FindingCount) { + var ret float32 + return ret + } + return *o.FindingCount +} + +// GetFindingCountOk returns a tuple with the FindingCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetFindingCountOk() (*float32, bool) { + if o == nil || IsNil(o.FindingCount) { + return nil, false + } + return o.FindingCount, true +} + +// HasFindingCount returns a boolean if a field has been set. +func (o *Asset) HasFindingCount() bool { + if o != nil && !IsNil(o.FindingCount) { + return true + } + + return false +} + +// SetFindingCount gets a reference to the given float32 and assigns it to the FindingCount field. +func (o *Asset) SetFindingCount(v float32) { + o.FindingCount = &v +} + +// GetEolOs returns the EolOs field value if set, zero value otherwise. +func (o *Asset) GetEolOs() float32 { + if o == nil || IsNil(o.EolOs) { + var ret float32 + return ret + } + return *o.EolOs +} + +// GetEolOsOk returns a tuple with the EolOs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetEolOsOk() (*float32, bool) { + if o == nil || IsNil(o.EolOs) { + return nil, false + } + return o.EolOs, true +} + +// HasEolOs returns a boolean if a field has been set. +func (o *Asset) HasEolOs() bool { + if o != nil && !IsNil(o.EolOs) { + return true + } + + return false +} + +// SetEolOs gets a reference to the given float32 and assigns it to the EolOs field. +func (o *Asset) SetEolOs(v float32) { + o.EolOs = &v +} + +// GetEolOsExt returns the EolOsExt field value if set, zero value otherwise. +func (o *Asset) GetEolOsExt() float32 { + if o == nil || IsNil(o.EolOsExt) { + var ret float32 + return ret + } + return *o.EolOsExt +} + +// GetEolOsExtOk returns a tuple with the EolOsExt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetEolOsExtOk() (*float32, bool) { + if o == nil || IsNil(o.EolOsExt) { + return nil, false + } + return o.EolOsExt, true +} + +// HasEolOsExt returns a boolean if a field has been set. +func (o *Asset) HasEolOsExt() bool { + if o != nil && !IsNil(o.EolOsExt) { + return true + } + + return false +} + +// SetEolOsExt gets a reference to the given float32 and assigns it to the EolOsExt field. +func (o *Asset) SetEolOsExt(v float32) { + o.EolOsExt = &v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *Asset) GetSources() []string { + if o == nil || IsNil(o.Sources) { + var ret []string + return ret + } + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.Sources) { + return nil, false + } + return o.Sources, true +} + +// HasSources returns a boolean if a field has been set. +func (o *Asset) HasSources() bool { + if o != nil && !IsNil(o.Sources) { + return true + } + + return false +} + +// SetSources gets a reference to the given []string and assigns it to the Sources field. +func (o *Asset) SetSources(v []string) { + o.Sources = v +} + // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *Asset) GetAttributes() map[string]string { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]string return ret } @@ -1460,7 +1736,7 @@ func (o *Asset) GetAttributes() map[string]string { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Asset) GetAttributesOk() (*map[string]string, bool) { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { return nil, false } return o.Attributes, true @@ -1468,7 +1744,7 @@ func (o *Asset) GetAttributesOk() (*map[string]string, bool) { // HasAttributes returns a boolean if a field has been set. func (o *Asset) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -1481,140 +1757,207 @@ func (o *Asset) SetAttributes(v map[string]string) { } func (o Asset) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CreatedAt != nil { + return json.Marshal(toSerialize) +} + +func (o Asset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.OrganizationId != nil { + if !IsNil(o.OrganizationId) { toSerialize["organization_id"] = o.OrganizationId } - if o.SiteId != nil { + if !IsNil(o.SiteId) { toSerialize["site_id"] = o.SiteId } - if o.Alive != nil { + if !IsNil(o.Scanned) { + toSerialize["scanned"] = o.Scanned + } + if !IsNil(o.Alive) { toSerialize["alive"] = o.Alive } - if o.FirstSeen != nil { + if !IsNil(o.FirstSeen) { toSerialize["first_seen"] = o.FirstSeen } - if o.LastSeen != nil { + if !IsNil(o.LastSeen) { toSerialize["last_seen"] = o.LastSeen } - if o.DetectedBy != nil { + if !IsNil(o.DetectedBy) { toSerialize["detected_by"] = o.DetectedBy } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Os != nil { + if !IsNil(o.Os) { toSerialize["os"] = o.Os } - if o.OsVersion != nil { + if !IsNil(o.OsVersion) { toSerialize["os_version"] = o.OsVersion } - if o.Hw != nil { + if !IsNil(o.Hw) { toSerialize["hw"] = o.Hw } - if o.Addresses != nil { + if !IsNil(o.Addresses) { toSerialize["addresses"] = o.Addresses } - if o.AddressesExtra != nil { + if !IsNil(o.AddressesExtra) { toSerialize["addresses_extra"] = o.AddressesExtra } - if o.Macs != nil { + if !IsNil(o.Macs) { toSerialize["macs"] = o.Macs } - if o.MacVendors != nil { + if !IsNil(o.MacVendors) { toSerialize["mac_vendors"] = o.MacVendors } - if o.Names != nil { + if !IsNil(o.Names) { toSerialize["names"] = o.Names } - if o.Domains != nil { + if !IsNil(o.Domains) { toSerialize["domains"] = o.Domains } - if o.ServiceCount != nil { + if !IsNil(o.ServiceCount) { toSerialize["service_count"] = o.ServiceCount } - if o.ServiceCountTcp != nil { + if !IsNil(o.ServiceCountTcp) { toSerialize["service_count_tcp"] = o.ServiceCountTcp } - if o.ServiceCountUdp != nil { + if !IsNil(o.ServiceCountUdp) { toSerialize["service_count_udp"] = o.ServiceCountUdp } - if o.ServiceCountArp != nil { + if !IsNil(o.ServiceCountArp) { toSerialize["service_count_arp"] = o.ServiceCountArp } - if o.ServiceCountIcmp != nil { + if !IsNil(o.ServiceCountIcmp) { toSerialize["service_count_icmp"] = o.ServiceCountIcmp } - if o.LowestTtl != nil { + if !IsNil(o.LowestTtl) { toSerialize["lowest_ttl"] = o.LowestTtl } - if o.LowestRtt != nil { + if !IsNil(o.LowestRtt) { toSerialize["lowest_rtt"] = o.LowestRtt } - if o.LastAgentId != nil { + if !IsNil(o.LastAgentId) { toSerialize["last_agent_id"] = o.LastAgentId } - if o.LastTaskId != nil { + if !IsNil(o.LastTaskId) { toSerialize["last_task_id"] = o.LastTaskId } - if o.NewestMac != nil { + if !IsNil(o.NewestMac) { toSerialize["newest_mac"] = o.NewestMac } - if o.NewestMacVendor != nil { + if !IsNil(o.NewestMacVendor) { toSerialize["newest_mac_vendor"] = o.NewestMacVendor } - if o.NewestMacAge != nil { + if !IsNil(o.NewestMacAge) { toSerialize["newest_mac_age"] = o.NewestMacAge } - if o.Comments != nil { + if !IsNil(o.Comments) { toSerialize["comments"] = o.Comments } - if o.ServicePortsTcp != nil { + if !IsNil(o.ServicePortsTcp) { toSerialize["service_ports_tcp"] = o.ServicePortsTcp } - if o.ServicePortsUdp != nil { + if !IsNil(o.ServicePortsUdp) { toSerialize["service_ports_udp"] = o.ServicePortsUdp } - if o.ServicePortsProtocols != nil { - toSerialize["service_ports_protocols"] = o.ServicePortsProtocols + if !IsNil(o.ServiceProtocols) { + toSerialize["service_protocols"] = o.ServiceProtocols } - if o.ServicePortsProducts != nil { - toSerialize["service_ports_products"] = o.ServicePortsProducts + if !IsNil(o.ServiceProducts) { + toSerialize["service_products"] = o.ServiceProducts } - if o.OrgName != nil { + if !IsNil(o.OrgName) { toSerialize["org_name"] = o.OrgName } - if o.SiteName != nil { + if !IsNil(o.SiteName) { toSerialize["site_name"] = o.SiteName } - if o.AgentName != nil { + if !IsNil(o.AgentName) { toSerialize["agent_name"] = o.AgentName } - if o.Tags != nil { + if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } - if o.Services != nil { + if !IsNil(o.Services) { toSerialize["services"] = o.Services } - if o.Rtts != nil { + if !IsNil(o.Rtts) { toSerialize["rtts"] = o.Rtts } - if o.Credentials != nil { + if !IsNil(o.RiskRank) { + toSerialize["risk_rank"] = o.RiskRank + } + if !IsNil(o.Risk) { + toSerialize["risk"] = o.Risk + } + if !IsNil(o.Credentials) { toSerialize["credentials"] = o.Credentials } - if o.Attributes != nil { + if !IsNil(o.VulnerabilityCount) { + toSerialize["vulnerability_count"] = o.VulnerabilityCount + } + if !IsNil(o.FindingCount) { + toSerialize["finding_count"] = o.FindingCount + } + if !IsNil(o.EolOs) { + toSerialize["eol_os"] = o.EolOs + } + if !IsNil(o.EolOsExt) { + toSerialize["eol_os_ext"] = o.EolOsExt + } + if !IsNil(o.Sources) { + toSerialize["sources"] = o.Sources + } + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *Asset) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAsset := _Asset{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAsset) + + if err != nil { + return err + } + + *o = Asset(varAsset) + + return err } type NullableAsset struct { @@ -1652,3 +1995,5 @@ func (v *NullableAsset) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_asset_comments.go b/go/model_asset_comments.go index 5f463e1..3a4caf9 100644 --- a/go/model_asset_comments.go +++ b/go/model_asset_comments.go @@ -1,24 +1,32 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the AssetComments type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetComments{} + // AssetComments struct for AssetComments type AssetComments struct { Comments string `json:"comments"` } +type _AssetComments AssetComments + // NewAssetComments instantiates a new AssetComments object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -62,13 +70,56 @@ func (o *AssetComments) SetComments(v string) { } func (o AssetComments) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["comments"] = o.Comments + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AssetComments) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["comments"] = o.Comments + return toSerialize, nil +} + +func (o *AssetComments) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "comments", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetComments := _AssetComments{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetComments) + + if err != nil { + return err + } + + *o = AssetComments(varAssetComments) + + return err +} + type NullableAssetComments struct { value *AssetComments isSet bool @@ -104,3 +155,5 @@ func (v *NullableAssetComments) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_asset_criticality.go b/go/model_asset_criticality.go new file mode 100644 index 0000000..534548f --- /dev/null +++ b/go/model_asset_criticality.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetCriticality type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetCriticality{} + +// AssetCriticality struct for AssetCriticality +type AssetCriticality struct { + Criticality string `json:"criticality"` +} + +type _AssetCriticality AssetCriticality + +// NewAssetCriticality instantiates a new AssetCriticality object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetCriticality(criticality string) *AssetCriticality { + this := AssetCriticality{} + this.Criticality = criticality + return &this +} + +// NewAssetCriticalityWithDefaults instantiates a new AssetCriticality object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetCriticalityWithDefaults() *AssetCriticality { + this := AssetCriticality{} + return &this +} + +// GetCriticality returns the Criticality field value +func (o *AssetCriticality) GetCriticality() string { + if o == nil { + var ret string + return ret + } + + return o.Criticality +} + +// GetCriticalityOk returns a tuple with the Criticality field value +// and a boolean to check if the value has been set. +func (o *AssetCriticality) GetCriticalityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Criticality, true +} + +// SetCriticality sets field value +func (o *AssetCriticality) SetCriticality(v string) { + o.Criticality = v +} + +func (o AssetCriticality) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetCriticality) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["criticality"] = o.Criticality + return toSerialize, nil +} + +func (o *AssetCriticality) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "criticality", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetCriticality := _AssetCriticality{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetCriticality) + + if err != nil { + return err + } + + *o = AssetCriticality(varAssetCriticality) + + return err +} + +type NullableAssetCriticality struct { + value *AssetCriticality + isSet bool +} + +func (v NullableAssetCriticality) Get() *AssetCriticality { + return v.value +} + +func (v *NullableAssetCriticality) Set(val *AssetCriticality) { + v.value = val + v.isSet = true +} + +func (v NullableAssetCriticality) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetCriticality) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetCriticality(val *AssetCriticality) *NullableAssetCriticality { + return &NullableAssetCriticality{value: val, isSet: true} +} + +func (v NullableAssetCriticality) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetCriticality) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_criticality_with_search.go b/go/model_asset_criticality_with_search.go new file mode 100644 index 0000000..f99d86d --- /dev/null +++ b/go/model_asset_criticality_with_search.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetCriticalityWithSearch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetCriticalityWithSearch{} + +// AssetCriticalityWithSearch struct for AssetCriticalityWithSearch +type AssetCriticalityWithSearch struct { + Criticality string `json:"criticality"` + Search string `json:"search"` +} + +type _AssetCriticalityWithSearch AssetCriticalityWithSearch + +// NewAssetCriticalityWithSearch instantiates a new AssetCriticalityWithSearch object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetCriticalityWithSearch(criticality string, search string) *AssetCriticalityWithSearch { + this := AssetCriticalityWithSearch{} + this.Criticality = criticality + this.Search = search + return &this +} + +// NewAssetCriticalityWithSearchWithDefaults instantiates a new AssetCriticalityWithSearch object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetCriticalityWithSearchWithDefaults() *AssetCriticalityWithSearch { + this := AssetCriticalityWithSearch{} + return &this +} + +// GetCriticality returns the Criticality field value +func (o *AssetCriticalityWithSearch) GetCriticality() string { + if o == nil { + var ret string + return ret + } + + return o.Criticality +} + +// GetCriticalityOk returns a tuple with the Criticality field value +// and a boolean to check if the value has been set. +func (o *AssetCriticalityWithSearch) GetCriticalityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Criticality, true +} + +// SetCriticality sets field value +func (o *AssetCriticalityWithSearch) SetCriticality(v string) { + o.Criticality = v +} + +// GetSearch returns the Search field value +func (o *AssetCriticalityWithSearch) GetSearch() string { + if o == nil { + var ret string + return ret + } + + return o.Search +} + +// GetSearchOk returns a tuple with the Search field value +// and a boolean to check if the value has been set. +func (o *AssetCriticalityWithSearch) GetSearchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Search, true +} + +// SetSearch sets field value +func (o *AssetCriticalityWithSearch) SetSearch(v string) { + o.Search = v +} + +func (o AssetCriticalityWithSearch) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetCriticalityWithSearch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["criticality"] = o.Criticality + toSerialize["search"] = o.Search + return toSerialize, nil +} + +func (o *AssetCriticalityWithSearch) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "criticality", + "search", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetCriticalityWithSearch := _AssetCriticalityWithSearch{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetCriticalityWithSearch) + + if err != nil { + return err + } + + *o = AssetCriticalityWithSearch(varAssetCriticalityWithSearch) + + return err +} + +type NullableAssetCriticalityWithSearch struct { + value *AssetCriticalityWithSearch + isSet bool +} + +func (v NullableAssetCriticalityWithSearch) Get() *AssetCriticalityWithSearch { + return v.value +} + +func (v *NullableAssetCriticalityWithSearch) Set(val *AssetCriticalityWithSearch) { + v.value = val + v.isSet = true +} + +func (v NullableAssetCriticalityWithSearch) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetCriticalityWithSearch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetCriticalityWithSearch(val *AssetCriticalityWithSearch) *NullableAssetCriticalityWithSearch { + return &NullableAssetCriticalityWithSearch{value: val, isSet: true} +} + +func (v NullableAssetCriticalityWithSearch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetCriticalityWithSearch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_export_response.go b/go/model_asset_export_response.go new file mode 100644 index 0000000..bd0bda7 --- /dev/null +++ b/go/model_asset_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// AssetExportResponse - Response body for the asset export endpoint. When `page_size` is omitted the response is a bare array of assets; when `page_size` is set the response is a paged `AssetPage` object. +type AssetExportResponse struct { + AssetPage *AssetPage + ArrayOfAsset *[]Asset +} + +// AssetPageAsAssetExportResponse is a convenience function that returns AssetPage wrapped in AssetExportResponse +func AssetPageAsAssetExportResponse(v *AssetPage) AssetExportResponse { + return AssetExportResponse{ + AssetPage: v, + } +} + +// []AssetAsAssetExportResponse is a convenience function that returns []Asset wrapped in AssetExportResponse +func ArrayOfAssetAsAssetExportResponse(v *[]Asset) AssetExportResponse { + return AssetExportResponse{ + ArrayOfAsset: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *AssetExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AssetPage + err = newStrictDecoder(data).Decode(&dst.AssetPage) + if err == nil { + jsonAssetPage, _ := json.Marshal(dst.AssetPage) + if string(jsonAssetPage) == "{}" { // empty struct + dst.AssetPage = nil + } else { + if err = validator.Validate(dst.AssetPage); err != nil { + dst.AssetPage = nil + } else { + match++ + } + } + } else { + dst.AssetPage = nil + } + + // try to unmarshal data into ArrayOfAsset + err = newStrictDecoder(data).Decode(&dst.ArrayOfAsset) + if err == nil { + jsonArrayOfAsset, _ := json.Marshal(dst.ArrayOfAsset) + if string(jsonArrayOfAsset) == "{}" { // empty struct + dst.ArrayOfAsset = nil + } else { + if err = validator.Validate(dst.ArrayOfAsset); err != nil { + dst.ArrayOfAsset = nil + } else { + match++ + } + } + } else { + dst.ArrayOfAsset = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AssetPage = nil + dst.ArrayOfAsset = nil + + return fmt.Errorf("data matches more than one schema in oneOf(AssetExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(AssetExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src AssetExportResponse) MarshalJSON() ([]byte, error) { + if src.AssetPage != nil { + return json.Marshal(&src.AssetPage) + } + + if src.ArrayOfAsset != nil { + return json.Marshal(&src.ArrayOfAsset) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *AssetExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.AssetPage != nil { + return obj.AssetPage + } + + if obj.ArrayOfAsset != nil { + return obj.ArrayOfAsset + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj AssetExportResponse) GetActualInstanceValue() (interface{}) { + if obj.AssetPage != nil { + return *obj.AssetPage + } + + if obj.ArrayOfAsset != nil { + return *obj.ArrayOfAsset + } + + // all schemas are nil + return nil +} + +type NullableAssetExportResponse struct { + value *AssetExportResponse + isSet bool +} + +func (v NullableAssetExportResponse) Get() *AssetExportResponse { + return v.value +} + +func (v *NullableAssetExportResponse) Set(val *AssetExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAssetExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetExportResponse(val *AssetExportResponse) *NullableAssetExportResponse { + return &NullableAssetExportResponse{value: val, isSet: true} +} + +func (v NullableAssetExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ids.go b/go/model_asset_ids.go new file mode 100644 index 0000000..8f89834 --- /dev/null +++ b/go/model_asset_ids.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetIDs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetIDs{} + +// AssetIDs struct for AssetIDs +type AssetIDs struct { + AssetIds []string `json:"asset_ids"` +} + +type _AssetIDs AssetIDs + +// NewAssetIDs instantiates a new AssetIDs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetIDs(assetIds []string) *AssetIDs { + this := AssetIDs{} + this.AssetIds = assetIds + return &this +} + +// NewAssetIDsWithDefaults instantiates a new AssetIDs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetIDsWithDefaults() *AssetIDs { + this := AssetIDs{} + return &this +} + +// GetAssetIds returns the AssetIds field value +func (o *AssetIDs) GetAssetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.AssetIds +} + +// GetAssetIdsOk returns a tuple with the AssetIds field value +// and a boolean to check if the value has been set. +func (o *AssetIDs) GetAssetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AssetIds, true +} + +// SetAssetIds sets field value +func (o *AssetIDs) SetAssetIds(v []string) { + o.AssetIds = v +} + +func (o AssetIDs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetIDs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["asset_ids"] = o.AssetIds + return toSerialize, nil +} + +func (o *AssetIDs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "asset_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetIDs := _AssetIDs{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetIDs) + + if err != nil { + return err + } + + *o = AssetIDs(varAssetIDs) + + return err +} + +type NullableAssetIDs struct { + value *AssetIDs + isSet bool +} + +func (v NullableAssetIDs) Get() *AssetIDs { + return v.value +} + +func (v *NullableAssetIDs) Set(val *AssetIDs) { + v.value = val + v.isSet = true +} + +func (v NullableAssetIDs) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetIDs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetIDs(val *AssetIDs) *NullableAssetIDs { + return &NullableAssetIDs{value: val, isSet: true} +} + +func (v NullableAssetIDs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetIDs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_metric.go b/go/model_asset_metric.go new file mode 100644 index 0000000..9c3e1a8 --- /dev/null +++ b/go/model_asset_metric.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AssetMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetMetric{} + +// AssetMetric Asset metric summary for a single asset, keyed by asset ID in the parent map. +type AssetMetric struct { + SiteId *string `json:"site_id,omitempty"` + // Free-form metric values keyed by metric name. + Metrics map[string]interface{} `json:"metrics,omitempty"` +} + +// NewAssetMetric instantiates a new AssetMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetMetric() *AssetMetric { + this := AssetMetric{} + return &this +} + +// NewAssetMetricWithDefaults instantiates a new AssetMetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetMetricWithDefaults() *AssetMetric { + this := AssetMetric{} + return &this +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *AssetMetric) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetMetric) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *AssetMetric) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *AssetMetric) SetSiteId(v string) { + o.SiteId = &v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *AssetMetric) GetMetrics() map[string]interface{} { + if o == nil || IsNil(o.Metrics) { + var ret map[string]interface{} + return ret + } + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetMetric) GetMetricsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metrics) { + return map[string]interface{}{}, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *AssetMetric) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given map[string]interface{} and assigns it to the Metrics field. +func (o *AssetMetric) SetMetrics(v map[string]interface{}) { + o.Metrics = v +} + +func (o AssetMetric) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + return toSerialize, nil +} + +type NullableAssetMetric struct { + value *AssetMetric + isSet bool +} + +func (v NullableAssetMetric) Get() *AssetMetric { + return v.value +} + +func (v *NullableAssetMetric) Set(val *AssetMetric) { + v.value = val + v.isSet = true +} + +func (v NullableAssetMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetMetric(val *AssetMetric) *NullableAssetMetric { + return &NullableAssetMetric{value: val, isSet: true} +} + +func (v NullableAssetMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownership.go b/go/model_asset_ownership.go new file mode 100644 index 0000000..fe6fc6b --- /dev/null +++ b/go/model_asset_ownership.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AssetOwnership type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnership{} + +// AssetOwnership A single ownership assignment on an asset. +type AssetOwnership struct { + OwnershipTypeId *string `json:"ownership_type_id,omitempty"` + Owner *string `json:"owner,omitempty"` +} + +// NewAssetOwnership instantiates a new AssetOwnership object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnership() *AssetOwnership { + this := AssetOwnership{} + return &this +} + +// NewAssetOwnershipWithDefaults instantiates a new AssetOwnership object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipWithDefaults() *AssetOwnership { + this := AssetOwnership{} + return &this +} + +// GetOwnershipTypeId returns the OwnershipTypeId field value if set, zero value otherwise. +func (o *AssetOwnership) GetOwnershipTypeId() string { + if o == nil || IsNil(o.OwnershipTypeId) { + var ret string + return ret + } + return *o.OwnershipTypeId +} + +// GetOwnershipTypeIdOk returns a tuple with the OwnershipTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnership) GetOwnershipTypeIdOk() (*string, bool) { + if o == nil || IsNil(o.OwnershipTypeId) { + return nil, false + } + return o.OwnershipTypeId, true +} + +// HasOwnershipTypeId returns a boolean if a field has been set. +func (o *AssetOwnership) HasOwnershipTypeId() bool { + if o != nil && !IsNil(o.OwnershipTypeId) { + return true + } + + return false +} + +// SetOwnershipTypeId gets a reference to the given string and assigns it to the OwnershipTypeId field. +func (o *AssetOwnership) SetOwnershipTypeId(v string) { + o.OwnershipTypeId = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *AssetOwnership) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnership) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *AssetOwnership) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *AssetOwnership) SetOwner(v string) { + o.Owner = &v +} + +func (o AssetOwnership) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnership) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OwnershipTypeId) { + toSerialize["ownership_type_id"] = o.OwnershipTypeId + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + return toSerialize, nil +} + +type NullableAssetOwnership struct { + value *AssetOwnership + isSet bool +} + +func (v NullableAssetOwnership) Get() *AssetOwnership { + return v.value +} + +func (v *NullableAssetOwnership) Set(val *AssetOwnership) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnership) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnership) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnership(val *AssetOwnership) *NullableAssetOwnership { + return &NullableAssetOwnership{value: val, isSet: true} +} + +func (v NullableAssetOwnership) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnership) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownership_type.go b/go/model_asset_ownership_type.go new file mode 100644 index 0000000..00017db --- /dev/null +++ b/go/model_asset_ownership_type.go @@ -0,0 +1,295 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetOwnershipType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnershipType{} + +// AssetOwnershipType struct for AssetOwnershipType +type AssetOwnershipType struct { + Id string `json:"id"` + Name string `json:"name"` + Reference *int64 `json:"reference,omitempty"` + Order *int64 `json:"order,omitempty"` + Hidden *bool `json:"hidden,omitempty"` +} + +type _AssetOwnershipType AssetOwnershipType + +// NewAssetOwnershipType instantiates a new AssetOwnershipType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnershipType(id string, name string) *AssetOwnershipType { + this := AssetOwnershipType{} + this.Id = id + this.Name = name + return &this +} + +// NewAssetOwnershipTypeWithDefaults instantiates a new AssetOwnershipType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipTypeWithDefaults() *AssetOwnershipType { + this := AssetOwnershipType{} + return &this +} + +// GetId returns the Id field value +func (o *AssetOwnershipType) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AssetOwnershipType) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AssetOwnershipType) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *AssetOwnershipType) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AssetOwnershipType) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AssetOwnershipType) SetName(v string) { + o.Name = v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *AssetOwnershipType) GetReference() int64 { + if o == nil || IsNil(o.Reference) { + var ret int64 + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipType) GetReferenceOk() (*int64, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *AssetOwnershipType) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given int64 and assigns it to the Reference field. +func (o *AssetOwnershipType) SetReference(v int64) { + o.Reference = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *AssetOwnershipType) GetOrder() int64 { + if o == nil || IsNil(o.Order) { + var ret int64 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipType) GetOrderOk() (*int64, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *AssetOwnershipType) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int64 and assigns it to the Order field. +func (o *AssetOwnershipType) SetOrder(v int64) { + o.Order = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *AssetOwnershipType) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipType) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *AssetOwnershipType) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *AssetOwnershipType) SetHidden(v bool) { + o.Hidden = &v +} + +func (o AssetOwnershipType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnershipType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + return toSerialize, nil +} + +func (o *AssetOwnershipType) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetOwnershipType := _AssetOwnershipType{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetOwnershipType) + + if err != nil { + return err + } + + *o = AssetOwnershipType(varAssetOwnershipType) + + return err +} + +type NullableAssetOwnershipType struct { + value *AssetOwnershipType + isSet bool +} + +func (v NullableAssetOwnershipType) Get() *AssetOwnershipType { + return v.value +} + +func (v *NullableAssetOwnershipType) Set(val *AssetOwnershipType) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnershipType) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnershipType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnershipType(val *AssetOwnershipType) *NullableAssetOwnershipType { + return &NullableAssetOwnershipType{value: val, isSet: true} +} + +func (v NullableAssetOwnershipType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnershipType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownership_type_post.go b/go/model_asset_ownership_type_post.go new file mode 100644 index 0000000..a752eb0 --- /dev/null +++ b/go/model_asset_ownership_type_post.go @@ -0,0 +1,267 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetOwnershipTypePost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnershipTypePost{} + +// AssetOwnershipTypePost struct for AssetOwnershipTypePost +type AssetOwnershipTypePost struct { + Name string `json:"name"` + Reference *int64 `json:"reference,omitempty"` + Order *int64 `json:"order,omitempty"` + Hidden *bool `json:"hidden,omitempty"` +} + +type _AssetOwnershipTypePost AssetOwnershipTypePost + +// NewAssetOwnershipTypePost instantiates a new AssetOwnershipTypePost object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnershipTypePost(name string) *AssetOwnershipTypePost { + this := AssetOwnershipTypePost{} + this.Name = name + return &this +} + +// NewAssetOwnershipTypePostWithDefaults instantiates a new AssetOwnershipTypePost object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipTypePostWithDefaults() *AssetOwnershipTypePost { + this := AssetOwnershipTypePost{} + return &this +} + +// GetName returns the Name field value +func (o *AssetOwnershipTypePost) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AssetOwnershipTypePost) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AssetOwnershipTypePost) SetName(v string) { + o.Name = v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *AssetOwnershipTypePost) GetReference() int64 { + if o == nil || IsNil(o.Reference) { + var ret int64 + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipTypePost) GetReferenceOk() (*int64, bool) { + if o == nil || IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *AssetOwnershipTypePost) HasReference() bool { + if o != nil && !IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given int64 and assigns it to the Reference field. +func (o *AssetOwnershipTypePost) SetReference(v int64) { + o.Reference = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *AssetOwnershipTypePost) GetOrder() int64 { + if o == nil || IsNil(o.Order) { + var ret int64 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipTypePost) GetOrderOk() (*int64, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *AssetOwnershipTypePost) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int64 and assigns it to the Order field. +func (o *AssetOwnershipTypePost) SetOrder(v int64) { + o.Order = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *AssetOwnershipTypePost) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipTypePost) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *AssetOwnershipTypePost) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *AssetOwnershipTypePost) SetHidden(v bool) { + o.Hidden = &v +} + +func (o AssetOwnershipTypePost) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnershipTypePost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + return toSerialize, nil +} + +func (o *AssetOwnershipTypePost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetOwnershipTypePost := _AssetOwnershipTypePost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetOwnershipTypePost) + + if err != nil { + return err + } + + *o = AssetOwnershipTypePost(varAssetOwnershipTypePost) + + return err +} + +type NullableAssetOwnershipTypePost struct { + value *AssetOwnershipTypePost + isSet bool +} + +func (v NullableAssetOwnershipTypePost) Get() *AssetOwnershipTypePost { + return v.value +} + +func (v *NullableAssetOwnershipTypePost) Set(val *AssetOwnershipTypePost) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnershipTypePost) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnershipTypePost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnershipTypePost(val *AssetOwnershipTypePost) *NullableAssetOwnershipTypePost { + return &NullableAssetOwnershipTypePost{value: val, isSet: true} +} + +func (v NullableAssetOwnershipTypePost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnershipTypePost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownerships.go b/go/model_asset_ownerships.go new file mode 100644 index 0000000..977eb73 --- /dev/null +++ b/go/model_asset_ownerships.go @@ -0,0 +1,127 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AssetOwnerships type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnerships{} + +// AssetOwnerships struct for AssetOwnerships +type AssetOwnerships struct { + Ownerships []AssetOwnership `json:"ownerships,omitempty"` +} + +// NewAssetOwnerships instantiates a new AssetOwnerships object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnerships() *AssetOwnerships { + this := AssetOwnerships{} + return &this +} + +// NewAssetOwnershipsWithDefaults instantiates a new AssetOwnerships object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipsWithDefaults() *AssetOwnerships { + this := AssetOwnerships{} + return &this +} + +// GetOwnerships returns the Ownerships field value if set, zero value otherwise. +func (o *AssetOwnerships) GetOwnerships() []AssetOwnership { + if o == nil || IsNil(o.Ownerships) { + var ret []AssetOwnership + return ret + } + return o.Ownerships +} + +// GetOwnershipsOk returns a tuple with the Ownerships field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnerships) GetOwnershipsOk() ([]AssetOwnership, bool) { + if o == nil || IsNil(o.Ownerships) { + return nil, false + } + return o.Ownerships, true +} + +// HasOwnerships returns a boolean if a field has been set. +func (o *AssetOwnerships) HasOwnerships() bool { + if o != nil && !IsNil(o.Ownerships) { + return true + } + + return false +} + +// SetOwnerships gets a reference to the given []AssetOwnership and assigns it to the Ownerships field. +func (o *AssetOwnerships) SetOwnerships(v []AssetOwnership) { + o.Ownerships = v +} + +func (o AssetOwnerships) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnerships) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ownerships) { + toSerialize["ownerships"] = o.Ownerships + } + return toSerialize, nil +} + +type NullableAssetOwnerships struct { + value *AssetOwnerships + isSet bool +} + +func (v NullableAssetOwnerships) Get() *AssetOwnerships { + return v.value +} + +func (v *NullableAssetOwnerships) Set(val *AssetOwnerships) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnerships) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnerships) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnerships(val *AssetOwnerships) *NullableAssetOwnerships { + return &NullableAssetOwnerships{value: val, isSet: true} +} + +func (v NullableAssetOwnerships) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnerships) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownerships_with_search.go b/go/model_asset_ownerships_with_search.go new file mode 100644 index 0000000..2c9e4f0 --- /dev/null +++ b/go/model_asset_ownerships_with_search.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetOwnershipsWithSearch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnershipsWithSearch{} + +// AssetOwnershipsWithSearch struct for AssetOwnershipsWithSearch +type AssetOwnershipsWithSearch struct { + Search string `json:"search"` + Ownerships []AssetOwnershipsWithSearchOwnershipsInner `json:"ownerships"` +} + +type _AssetOwnershipsWithSearch AssetOwnershipsWithSearch + +// NewAssetOwnershipsWithSearch instantiates a new AssetOwnershipsWithSearch object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnershipsWithSearch(search string, ownerships []AssetOwnershipsWithSearchOwnershipsInner) *AssetOwnershipsWithSearch { + this := AssetOwnershipsWithSearch{} + this.Search = search + this.Ownerships = ownerships + return &this +} + +// NewAssetOwnershipsWithSearchWithDefaults instantiates a new AssetOwnershipsWithSearch object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipsWithSearchWithDefaults() *AssetOwnershipsWithSearch { + this := AssetOwnershipsWithSearch{} + return &this +} + +// GetSearch returns the Search field value +func (o *AssetOwnershipsWithSearch) GetSearch() string { + if o == nil { + var ret string + return ret + } + + return o.Search +} + +// GetSearchOk returns a tuple with the Search field value +// and a boolean to check if the value has been set. +func (o *AssetOwnershipsWithSearch) GetSearchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Search, true +} + +// SetSearch sets field value +func (o *AssetOwnershipsWithSearch) SetSearch(v string) { + o.Search = v +} + +// GetOwnerships returns the Ownerships field value +func (o *AssetOwnershipsWithSearch) GetOwnerships() []AssetOwnershipsWithSearchOwnershipsInner { + if o == nil { + var ret []AssetOwnershipsWithSearchOwnershipsInner + return ret + } + + return o.Ownerships +} + +// GetOwnershipsOk returns a tuple with the Ownerships field value +// and a boolean to check if the value has been set. +func (o *AssetOwnershipsWithSearch) GetOwnershipsOk() ([]AssetOwnershipsWithSearchOwnershipsInner, bool) { + if o == nil { + return nil, false + } + return o.Ownerships, true +} + +// SetOwnerships sets field value +func (o *AssetOwnershipsWithSearch) SetOwnerships(v []AssetOwnershipsWithSearchOwnershipsInner) { + o.Ownerships = v +} + +func (o AssetOwnershipsWithSearch) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnershipsWithSearch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["search"] = o.Search + toSerialize["ownerships"] = o.Ownerships + return toSerialize, nil +} + +func (o *AssetOwnershipsWithSearch) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "search", + "ownerships", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetOwnershipsWithSearch := _AssetOwnershipsWithSearch{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetOwnershipsWithSearch) + + if err != nil { + return err + } + + *o = AssetOwnershipsWithSearch(varAssetOwnershipsWithSearch) + + return err +} + +type NullableAssetOwnershipsWithSearch struct { + value *AssetOwnershipsWithSearch + isSet bool +} + +func (v NullableAssetOwnershipsWithSearch) Get() *AssetOwnershipsWithSearch { + return v.value +} + +func (v *NullableAssetOwnershipsWithSearch) Set(val *AssetOwnershipsWithSearch) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnershipsWithSearch) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnershipsWithSearch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnershipsWithSearch(val *AssetOwnershipsWithSearch) *NullableAssetOwnershipsWithSearch { + return &NullableAssetOwnershipsWithSearch{value: val, isSet: true} +} + +func (v NullableAssetOwnershipsWithSearch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnershipsWithSearch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_ownerships_with_search_ownerships_inner.go b/go/model_asset_ownerships_with_search_ownerships_inner.go new file mode 100644 index 0000000..63583d4 --- /dev/null +++ b/go/model_asset_ownerships_with_search_ownerships_inner.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AssetOwnershipsWithSearchOwnershipsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetOwnershipsWithSearchOwnershipsInner{} + +// AssetOwnershipsWithSearchOwnershipsInner struct for AssetOwnershipsWithSearchOwnershipsInner +type AssetOwnershipsWithSearchOwnershipsInner struct { + OwnershipTypeId *string `json:"ownership_type_id,omitempty"` + Owner *string `json:"owner,omitempty"` +} + +// NewAssetOwnershipsWithSearchOwnershipsInner instantiates a new AssetOwnershipsWithSearchOwnershipsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetOwnershipsWithSearchOwnershipsInner() *AssetOwnershipsWithSearchOwnershipsInner { + this := AssetOwnershipsWithSearchOwnershipsInner{} + return &this +} + +// NewAssetOwnershipsWithSearchOwnershipsInnerWithDefaults instantiates a new AssetOwnershipsWithSearchOwnershipsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetOwnershipsWithSearchOwnershipsInnerWithDefaults() *AssetOwnershipsWithSearchOwnershipsInner { + this := AssetOwnershipsWithSearchOwnershipsInner{} + return &this +} + +// GetOwnershipTypeId returns the OwnershipTypeId field value if set, zero value otherwise. +func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnershipTypeId() string { + if o == nil || IsNil(o.OwnershipTypeId) { + var ret string + return ret + } + return *o.OwnershipTypeId +} + +// GetOwnershipTypeIdOk returns a tuple with the OwnershipTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnershipTypeIdOk() (*string, bool) { + if o == nil || IsNil(o.OwnershipTypeId) { + return nil, false + } + return o.OwnershipTypeId, true +} + +// HasOwnershipTypeId returns a boolean if a field has been set. +func (o *AssetOwnershipsWithSearchOwnershipsInner) HasOwnershipTypeId() bool { + if o != nil && !IsNil(o.OwnershipTypeId) { + return true + } + + return false +} + +// SetOwnershipTypeId gets a reference to the given string and assigns it to the OwnershipTypeId field. +func (o *AssetOwnershipsWithSearchOwnershipsInner) SetOwnershipTypeId(v string) { + o.OwnershipTypeId = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetOwnershipsWithSearchOwnershipsInner) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *AssetOwnershipsWithSearchOwnershipsInner) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *AssetOwnershipsWithSearchOwnershipsInner) SetOwner(v string) { + o.Owner = &v +} + +func (o AssetOwnershipsWithSearchOwnershipsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetOwnershipsWithSearchOwnershipsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OwnershipTypeId) { + toSerialize["ownership_type_id"] = o.OwnershipTypeId + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + return toSerialize, nil +} + +type NullableAssetOwnershipsWithSearchOwnershipsInner struct { + value *AssetOwnershipsWithSearchOwnershipsInner + isSet bool +} + +func (v NullableAssetOwnershipsWithSearchOwnershipsInner) Get() *AssetOwnershipsWithSearchOwnershipsInner { + return v.value +} + +func (v *NullableAssetOwnershipsWithSearchOwnershipsInner) Set(val *AssetOwnershipsWithSearchOwnershipsInner) { + v.value = val + v.isSet = true +} + +func (v NullableAssetOwnershipsWithSearchOwnershipsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetOwnershipsWithSearchOwnershipsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetOwnershipsWithSearchOwnershipsInner(val *AssetOwnershipsWithSearchOwnershipsInner) *NullableAssetOwnershipsWithSearchOwnershipsInner { + return &NullableAssetOwnershipsWithSearchOwnershipsInner{value: val, isSet: true} +} + +func (v NullableAssetOwnershipsWithSearchOwnershipsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetOwnershipsWithSearchOwnershipsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_page.go b/go/model_asset_page.go new file mode 100644 index 0000000..19e757d --- /dev/null +++ b/go/model_asset_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the AssetPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetPage{} + +// AssetPage A page of assets returned from a paginated export. +type AssetPage struct { + Assets []Asset `json:"assets,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewAssetPage instantiates a new AssetPage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetPage() *AssetPage { + this := AssetPage{} + return &this +} + +// NewAssetPageWithDefaults instantiates a new AssetPage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetPageWithDefaults() *AssetPage { + this := AssetPage{} + return &this +} + +// GetAssets returns the Assets field value if set, zero value otherwise. +func (o *AssetPage) GetAssets() []Asset { + if o == nil || IsNil(o.Assets) { + var ret []Asset + return ret + } + return o.Assets +} + +// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetPage) GetAssetsOk() ([]Asset, bool) { + if o == nil || IsNil(o.Assets) { + return nil, false + } + return o.Assets, true +} + +// HasAssets returns a boolean if a field has been set. +func (o *AssetPage) HasAssets() bool { + if o != nil && !IsNil(o.Assets) { + return true + } + + return false +} + +// SetAssets gets a reference to the given []Asset and assigns it to the Assets field. +func (o *AssetPage) SetAssets(v []Asset) { + o.Assets = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *AssetPage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetPage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *AssetPage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *AssetPage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o AssetPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Assets) { + toSerialize["assets"] = o.Assets + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableAssetPage struct { + value *AssetPage + isSet bool +} + +func (v NullableAssetPage) Get() *AssetPage { + return v.value +} + +func (v *NullableAssetPage) Set(val *AssetPage) { + v.value = val + v.isSet = true +} + +func (v NullableAssetPage) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetPage(val *AssetPage) *NullableAssetPage { + return &NullableAssetPage{value: val, isSet: true} +} + +func (v NullableAssetPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_service_now.go b/go/model_asset_service_now.go new file mode 100644 index 0000000..9a76669 --- /dev/null +++ b/go/model_asset_service_now.go @@ -0,0 +1,1393 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AssetServiceNow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetServiceNow{} + +// AssetServiceNow struct for AssetServiceNow +type AssetServiceNow struct { + AssetId string `json:"asset_id"` + Organization *string `json:"organization,omitempty"` + Site *string `json:"site,omitempty"` + DetectedBy *string `json:"detected_by,omitempty"` + Type *string `json:"type,omitempty"` + SysClassName *string `json:"sys_class_name,omitempty"` + OsVendor *string `json:"os_vendor,omitempty"` + OsProduct *string `json:"os_product,omitempty"` + OsVersion *string `json:"os_version,omitempty"` + HwVendor *string `json:"hw_vendor,omitempty"` + HwProduct *string `json:"hw_product,omitempty"` + HwVersion *string `json:"hw_version,omitempty"` + IpAddress NullableString `json:"ip_address,omitempty"` + AddressesScope *string `json:"addresses_scope,omitempty"` + AddressesExtra *string `json:"addresses_extra,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` + MacManufacturer *string `json:"mac_manufacturer,omitempty"` + NewestMacAge *string `json:"newest_mac_age,omitempty"` + Macs *string `json:"macs,omitempty"` + MacVendors *string `json:"mac_vendors,omitempty"` + Name *string `json:"name,omitempty"` + Tags *string `json:"tags,omitempty"` + Domains *string `json:"domains,omitempty"` + ServiceCount *int64 `json:"service_count,omitempty"` + ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` + ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` + ServiceCountArp *int64 `json:"service_count_arp,omitempty"` + ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` + LowestTtl *int64 `json:"lowest_ttl,omitempty"` + LowestRtt *int64 `json:"lowest_rtt,omitempty"` + Alive *bool `json:"alive,omitempty"` + FirstDiscovered *string `json:"first_discovered,omitempty"` + LastDiscovered *string `json:"last_discovered,omitempty"` + LastUpdated *string `json:"last_updated,omitempty"` + Comments *string `json:"comments,omitempty"` +} + +type _AssetServiceNow AssetServiceNow + +// NewAssetServiceNow instantiates a new AssetServiceNow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetServiceNow(assetId string) *AssetServiceNow { + this := AssetServiceNow{} + this.AssetId = assetId + return &this +} + +// NewAssetServiceNowWithDefaults instantiates a new AssetServiceNow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetServiceNowWithDefaults() *AssetServiceNow { + this := AssetServiceNow{} + return &this +} + +// GetAssetId returns the AssetId field value +func (o *AssetServiceNow) GetAssetId() string { + if o == nil { + var ret string + return ret + } + + return o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetAssetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AssetId, true +} + +// SetAssetId sets field value +func (o *AssetServiceNow) SetAssetId(v string) { + o.AssetId = v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AssetServiceNow) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AssetServiceNow) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AssetServiceNow) SetOrganization(v string) { + o.Organization = &v +} + +// GetSite returns the Site field value if set, zero value otherwise. +func (o *AssetServiceNow) GetSite() string { + if o == nil || IsNil(o.Site) { + var ret string + return ret + } + return *o.Site +} + +// GetSiteOk returns a tuple with the Site field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetSiteOk() (*string, bool) { + if o == nil || IsNil(o.Site) { + return nil, false + } + return o.Site, true +} + +// HasSite returns a boolean if a field has been set. +func (o *AssetServiceNow) HasSite() bool { + if o != nil && !IsNil(o.Site) { + return true + } + + return false +} + +// SetSite gets a reference to the given string and assigns it to the Site field. +func (o *AssetServiceNow) SetSite(v string) { + o.Site = &v +} + +// GetDetectedBy returns the DetectedBy field value if set, zero value otherwise. +func (o *AssetServiceNow) GetDetectedBy() string { + if o == nil || IsNil(o.DetectedBy) { + var ret string + return ret + } + return *o.DetectedBy +} + +// GetDetectedByOk returns a tuple with the DetectedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetDetectedByOk() (*string, bool) { + if o == nil || IsNil(o.DetectedBy) { + return nil, false + } + return o.DetectedBy, true +} + +// HasDetectedBy returns a boolean if a field has been set. +func (o *AssetServiceNow) HasDetectedBy() bool { + if o != nil && !IsNil(o.DetectedBy) { + return true + } + + return false +} + +// SetDetectedBy gets a reference to the given string and assigns it to the DetectedBy field. +func (o *AssetServiceNow) SetDetectedBy(v string) { + o.DetectedBy = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AssetServiceNow) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AssetServiceNow) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AssetServiceNow) SetType(v string) { + o.Type = &v +} + +// GetSysClassName returns the SysClassName field value if set, zero value otherwise. +func (o *AssetServiceNow) GetSysClassName() string { + if o == nil || IsNil(o.SysClassName) { + var ret string + return ret + } + return *o.SysClassName +} + +// GetSysClassNameOk returns a tuple with the SysClassName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetSysClassNameOk() (*string, bool) { + if o == nil || IsNil(o.SysClassName) { + return nil, false + } + return o.SysClassName, true +} + +// HasSysClassName returns a boolean if a field has been set. +func (o *AssetServiceNow) HasSysClassName() bool { + if o != nil && !IsNil(o.SysClassName) { + return true + } + + return false +} + +// SetSysClassName gets a reference to the given string and assigns it to the SysClassName field. +func (o *AssetServiceNow) SetSysClassName(v string) { + o.SysClassName = &v +} + +// GetOsVendor returns the OsVendor field value if set, zero value otherwise. +func (o *AssetServiceNow) GetOsVendor() string { + if o == nil || IsNil(o.OsVendor) { + var ret string + return ret + } + return *o.OsVendor +} + +// GetOsVendorOk returns a tuple with the OsVendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetOsVendorOk() (*string, bool) { + if o == nil || IsNil(o.OsVendor) { + return nil, false + } + return o.OsVendor, true +} + +// HasOsVendor returns a boolean if a field has been set. +func (o *AssetServiceNow) HasOsVendor() bool { + if o != nil && !IsNil(o.OsVendor) { + return true + } + + return false +} + +// SetOsVendor gets a reference to the given string and assigns it to the OsVendor field. +func (o *AssetServiceNow) SetOsVendor(v string) { + o.OsVendor = &v +} + +// GetOsProduct returns the OsProduct field value if set, zero value otherwise. +func (o *AssetServiceNow) GetOsProduct() string { + if o == nil || IsNil(o.OsProduct) { + var ret string + return ret + } + return *o.OsProduct +} + +// GetOsProductOk returns a tuple with the OsProduct field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetOsProductOk() (*string, bool) { + if o == nil || IsNil(o.OsProduct) { + return nil, false + } + return o.OsProduct, true +} + +// HasOsProduct returns a boolean if a field has been set. +func (o *AssetServiceNow) HasOsProduct() bool { + if o != nil && !IsNil(o.OsProduct) { + return true + } + + return false +} + +// SetOsProduct gets a reference to the given string and assigns it to the OsProduct field. +func (o *AssetServiceNow) SetOsProduct(v string) { + o.OsProduct = &v +} + +// GetOsVersion returns the OsVersion field value if set, zero value otherwise. +func (o *AssetServiceNow) GetOsVersion() string { + if o == nil || IsNil(o.OsVersion) { + var ret string + return ret + } + return *o.OsVersion +} + +// GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetOsVersionOk() (*string, bool) { + if o == nil || IsNil(o.OsVersion) { + return nil, false + } + return o.OsVersion, true +} + +// HasOsVersion returns a boolean if a field has been set. +func (o *AssetServiceNow) HasOsVersion() bool { + if o != nil && !IsNil(o.OsVersion) { + return true + } + + return false +} + +// SetOsVersion gets a reference to the given string and assigns it to the OsVersion field. +func (o *AssetServiceNow) SetOsVersion(v string) { + o.OsVersion = &v +} + +// GetHwVendor returns the HwVendor field value if set, zero value otherwise. +func (o *AssetServiceNow) GetHwVendor() string { + if o == nil || IsNil(o.HwVendor) { + var ret string + return ret + } + return *o.HwVendor +} + +// GetHwVendorOk returns a tuple with the HwVendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetHwVendorOk() (*string, bool) { + if o == nil || IsNil(o.HwVendor) { + return nil, false + } + return o.HwVendor, true +} + +// HasHwVendor returns a boolean if a field has been set. +func (o *AssetServiceNow) HasHwVendor() bool { + if o != nil && !IsNil(o.HwVendor) { + return true + } + + return false +} + +// SetHwVendor gets a reference to the given string and assigns it to the HwVendor field. +func (o *AssetServiceNow) SetHwVendor(v string) { + o.HwVendor = &v +} + +// GetHwProduct returns the HwProduct field value if set, zero value otherwise. +func (o *AssetServiceNow) GetHwProduct() string { + if o == nil || IsNil(o.HwProduct) { + var ret string + return ret + } + return *o.HwProduct +} + +// GetHwProductOk returns a tuple with the HwProduct field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetHwProductOk() (*string, bool) { + if o == nil || IsNil(o.HwProduct) { + return nil, false + } + return o.HwProduct, true +} + +// HasHwProduct returns a boolean if a field has been set. +func (o *AssetServiceNow) HasHwProduct() bool { + if o != nil && !IsNil(o.HwProduct) { + return true + } + + return false +} + +// SetHwProduct gets a reference to the given string and assigns it to the HwProduct field. +func (o *AssetServiceNow) SetHwProduct(v string) { + o.HwProduct = &v +} + +// GetHwVersion returns the HwVersion field value if set, zero value otherwise. +func (o *AssetServiceNow) GetHwVersion() string { + if o == nil || IsNil(o.HwVersion) { + var ret string + return ret + } + return *o.HwVersion +} + +// GetHwVersionOk returns a tuple with the HwVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetHwVersionOk() (*string, bool) { + if o == nil || IsNil(o.HwVersion) { + return nil, false + } + return o.HwVersion, true +} + +// HasHwVersion returns a boolean if a field has been set. +func (o *AssetServiceNow) HasHwVersion() bool { + if o != nil && !IsNil(o.HwVersion) { + return true + } + + return false +} + +// SetHwVersion gets a reference to the given string and assigns it to the HwVersion field. +func (o *AssetServiceNow) SetHwVersion(v string) { + o.HwVersion = &v +} + +// GetIpAddress returns the IpAddress field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AssetServiceNow) GetIpAddress() string { + if o == nil || IsNil(o.IpAddress.Get()) { + var ret string + return ret + } + return *o.IpAddress.Get() +} + +// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AssetServiceNow) GetIpAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IpAddress.Get(), o.IpAddress.IsSet() +} + +// HasIpAddress returns a boolean if a field has been set. +func (o *AssetServiceNow) HasIpAddress() bool { + if o != nil && o.IpAddress.IsSet() { + return true + } + + return false +} + +// SetIpAddress gets a reference to the given NullableString and assigns it to the IpAddress field. +func (o *AssetServiceNow) SetIpAddress(v string) { + o.IpAddress.Set(&v) +} +// SetIpAddressNil sets the value for IpAddress to be an explicit nil +func (o *AssetServiceNow) SetIpAddressNil() { + o.IpAddress.Set(nil) +} + +// UnsetIpAddress ensures that no value is present for IpAddress, not even an explicit nil +func (o *AssetServiceNow) UnsetIpAddress() { + o.IpAddress.Unset() +} + +// GetAddressesScope returns the AddressesScope field value if set, zero value otherwise. +func (o *AssetServiceNow) GetAddressesScope() string { + if o == nil || IsNil(o.AddressesScope) { + var ret string + return ret + } + return *o.AddressesScope +} + +// GetAddressesScopeOk returns a tuple with the AddressesScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetAddressesScopeOk() (*string, bool) { + if o == nil || IsNil(o.AddressesScope) { + return nil, false + } + return o.AddressesScope, true +} + +// HasAddressesScope returns a boolean if a field has been set. +func (o *AssetServiceNow) HasAddressesScope() bool { + if o != nil && !IsNil(o.AddressesScope) { + return true + } + + return false +} + +// SetAddressesScope gets a reference to the given string and assigns it to the AddressesScope field. +func (o *AssetServiceNow) SetAddressesScope(v string) { + o.AddressesScope = &v +} + +// GetAddressesExtra returns the AddressesExtra field value if set, zero value otherwise. +func (o *AssetServiceNow) GetAddressesExtra() string { + if o == nil || IsNil(o.AddressesExtra) { + var ret string + return ret + } + return *o.AddressesExtra +} + +// GetAddressesExtraOk returns a tuple with the AddressesExtra field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetAddressesExtraOk() (*string, bool) { + if o == nil || IsNil(o.AddressesExtra) { + return nil, false + } + return o.AddressesExtra, true +} + +// HasAddressesExtra returns a boolean if a field has been set. +func (o *AssetServiceNow) HasAddressesExtra() bool { + if o != nil && !IsNil(o.AddressesExtra) { + return true + } + + return false +} + +// SetAddressesExtra gets a reference to the given string and assigns it to the AddressesExtra field. +func (o *AssetServiceNow) SetAddressesExtra(v string) { + o.AddressesExtra = &v +} + +// GetMacAddress returns the MacAddress field value if set, zero value otherwise. +func (o *AssetServiceNow) GetMacAddress() string { + if o == nil || IsNil(o.MacAddress) { + var ret string + return ret + } + return *o.MacAddress +} + +// GetMacAddressOk returns a tuple with the MacAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetMacAddressOk() (*string, bool) { + if o == nil || IsNil(o.MacAddress) { + return nil, false + } + return o.MacAddress, true +} + +// HasMacAddress returns a boolean if a field has been set. +func (o *AssetServiceNow) HasMacAddress() bool { + if o != nil && !IsNil(o.MacAddress) { + return true + } + + return false +} + +// SetMacAddress gets a reference to the given string and assigns it to the MacAddress field. +func (o *AssetServiceNow) SetMacAddress(v string) { + o.MacAddress = &v +} + +// GetMacManufacturer returns the MacManufacturer field value if set, zero value otherwise. +func (o *AssetServiceNow) GetMacManufacturer() string { + if o == nil || IsNil(o.MacManufacturer) { + var ret string + return ret + } + return *o.MacManufacturer +} + +// GetMacManufacturerOk returns a tuple with the MacManufacturer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetMacManufacturerOk() (*string, bool) { + if o == nil || IsNil(o.MacManufacturer) { + return nil, false + } + return o.MacManufacturer, true +} + +// HasMacManufacturer returns a boolean if a field has been set. +func (o *AssetServiceNow) HasMacManufacturer() bool { + if o != nil && !IsNil(o.MacManufacturer) { + return true + } + + return false +} + +// SetMacManufacturer gets a reference to the given string and assigns it to the MacManufacturer field. +func (o *AssetServiceNow) SetMacManufacturer(v string) { + o.MacManufacturer = &v +} + +// GetNewestMacAge returns the NewestMacAge field value if set, zero value otherwise. +func (o *AssetServiceNow) GetNewestMacAge() string { + if o == nil || IsNil(o.NewestMacAge) { + var ret string + return ret + } + return *o.NewestMacAge +} + +// GetNewestMacAgeOk returns a tuple with the NewestMacAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetNewestMacAgeOk() (*string, bool) { + if o == nil || IsNil(o.NewestMacAge) { + return nil, false + } + return o.NewestMacAge, true +} + +// HasNewestMacAge returns a boolean if a field has been set. +func (o *AssetServiceNow) HasNewestMacAge() bool { + if o != nil && !IsNil(o.NewestMacAge) { + return true + } + + return false +} + +// SetNewestMacAge gets a reference to the given string and assigns it to the NewestMacAge field. +func (o *AssetServiceNow) SetNewestMacAge(v string) { + o.NewestMacAge = &v +} + +// GetMacs returns the Macs field value if set, zero value otherwise. +func (o *AssetServiceNow) GetMacs() string { + if o == nil || IsNil(o.Macs) { + var ret string + return ret + } + return *o.Macs +} + +// GetMacsOk returns a tuple with the Macs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetMacsOk() (*string, bool) { + if o == nil || IsNil(o.Macs) { + return nil, false + } + return o.Macs, true +} + +// HasMacs returns a boolean if a field has been set. +func (o *AssetServiceNow) HasMacs() bool { + if o != nil && !IsNil(o.Macs) { + return true + } + + return false +} + +// SetMacs gets a reference to the given string and assigns it to the Macs field. +func (o *AssetServiceNow) SetMacs(v string) { + o.Macs = &v +} + +// GetMacVendors returns the MacVendors field value if set, zero value otherwise. +func (o *AssetServiceNow) GetMacVendors() string { + if o == nil || IsNil(o.MacVendors) { + var ret string + return ret + } + return *o.MacVendors +} + +// GetMacVendorsOk returns a tuple with the MacVendors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetMacVendorsOk() (*string, bool) { + if o == nil || IsNil(o.MacVendors) { + return nil, false + } + return o.MacVendors, true +} + +// HasMacVendors returns a boolean if a field has been set. +func (o *AssetServiceNow) HasMacVendors() bool { + if o != nil && !IsNil(o.MacVendors) { + return true + } + + return false +} + +// SetMacVendors gets a reference to the given string and assigns it to the MacVendors field. +func (o *AssetServiceNow) SetMacVendors(v string) { + o.MacVendors = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AssetServiceNow) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AssetServiceNow) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AssetServiceNow) SetName(v string) { + o.Name = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *AssetServiceNow) GetTags() string { + if o == nil || IsNil(o.Tags) { + var ret string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetTagsOk() (*string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *AssetServiceNow) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given string and assigns it to the Tags field. +func (o *AssetServiceNow) SetTags(v string) { + o.Tags = &v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *AssetServiceNow) GetDomains() string { + if o == nil || IsNil(o.Domains) { + var ret string + return ret + } + return *o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetDomainsOk() (*string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *AssetServiceNow) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given string and assigns it to the Domains field. +func (o *AssetServiceNow) SetDomains(v string) { + o.Domains = &v +} + +// GetServiceCount returns the ServiceCount field value if set, zero value otherwise. +func (o *AssetServiceNow) GetServiceCount() int64 { + if o == nil || IsNil(o.ServiceCount) { + var ret int64 + return ret + } + return *o.ServiceCount +} + +// GetServiceCountOk returns a tuple with the ServiceCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetServiceCountOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCount) { + return nil, false + } + return o.ServiceCount, true +} + +// HasServiceCount returns a boolean if a field has been set. +func (o *AssetServiceNow) HasServiceCount() bool { + if o != nil && !IsNil(o.ServiceCount) { + return true + } + + return false +} + +// SetServiceCount gets a reference to the given int64 and assigns it to the ServiceCount field. +func (o *AssetServiceNow) SetServiceCount(v int64) { + o.ServiceCount = &v +} + +// GetServiceCountTcp returns the ServiceCountTcp field value if set, zero value otherwise. +func (o *AssetServiceNow) GetServiceCountTcp() int64 { + if o == nil || IsNil(o.ServiceCountTcp) { + var ret int64 + return ret + } + return *o.ServiceCountTcp +} + +// GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetServiceCountTcpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountTcp) { + return nil, false + } + return o.ServiceCountTcp, true +} + +// HasServiceCountTcp returns a boolean if a field has been set. +func (o *AssetServiceNow) HasServiceCountTcp() bool { + if o != nil && !IsNil(o.ServiceCountTcp) { + return true + } + + return false +} + +// SetServiceCountTcp gets a reference to the given int64 and assigns it to the ServiceCountTcp field. +func (o *AssetServiceNow) SetServiceCountTcp(v int64) { + o.ServiceCountTcp = &v +} + +// GetServiceCountUdp returns the ServiceCountUdp field value if set, zero value otherwise. +func (o *AssetServiceNow) GetServiceCountUdp() int64 { + if o == nil || IsNil(o.ServiceCountUdp) { + var ret int64 + return ret + } + return *o.ServiceCountUdp +} + +// GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetServiceCountUdpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountUdp) { + return nil, false + } + return o.ServiceCountUdp, true +} + +// HasServiceCountUdp returns a boolean if a field has been set. +func (o *AssetServiceNow) HasServiceCountUdp() bool { + if o != nil && !IsNil(o.ServiceCountUdp) { + return true + } + + return false +} + +// SetServiceCountUdp gets a reference to the given int64 and assigns it to the ServiceCountUdp field. +func (o *AssetServiceNow) SetServiceCountUdp(v int64) { + o.ServiceCountUdp = &v +} + +// GetServiceCountArp returns the ServiceCountArp field value if set, zero value otherwise. +func (o *AssetServiceNow) GetServiceCountArp() int64 { + if o == nil || IsNil(o.ServiceCountArp) { + var ret int64 + return ret + } + return *o.ServiceCountArp +} + +// GetServiceCountArpOk returns a tuple with the ServiceCountArp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetServiceCountArpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountArp) { + return nil, false + } + return o.ServiceCountArp, true +} + +// HasServiceCountArp returns a boolean if a field has been set. +func (o *AssetServiceNow) HasServiceCountArp() bool { + if o != nil && !IsNil(o.ServiceCountArp) { + return true + } + + return false +} + +// SetServiceCountArp gets a reference to the given int64 and assigns it to the ServiceCountArp field. +func (o *AssetServiceNow) SetServiceCountArp(v int64) { + o.ServiceCountArp = &v +} + +// GetServiceCountIcmp returns the ServiceCountIcmp field value if set, zero value otherwise. +func (o *AssetServiceNow) GetServiceCountIcmp() int64 { + if o == nil || IsNil(o.ServiceCountIcmp) { + var ret int64 + return ret + } + return *o.ServiceCountIcmp +} + +// GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetServiceCountIcmpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountIcmp) { + return nil, false + } + return o.ServiceCountIcmp, true +} + +// HasServiceCountIcmp returns a boolean if a field has been set. +func (o *AssetServiceNow) HasServiceCountIcmp() bool { + if o != nil && !IsNil(o.ServiceCountIcmp) { + return true + } + + return false +} + +// SetServiceCountIcmp gets a reference to the given int64 and assigns it to the ServiceCountIcmp field. +func (o *AssetServiceNow) SetServiceCountIcmp(v int64) { + o.ServiceCountIcmp = &v +} + +// GetLowestTtl returns the LowestTtl field value if set, zero value otherwise. +func (o *AssetServiceNow) GetLowestTtl() int64 { + if o == nil || IsNil(o.LowestTtl) { + var ret int64 + return ret + } + return *o.LowestTtl +} + +// GetLowestTtlOk returns a tuple with the LowestTtl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetLowestTtlOk() (*int64, bool) { + if o == nil || IsNil(o.LowestTtl) { + return nil, false + } + return o.LowestTtl, true +} + +// HasLowestTtl returns a boolean if a field has been set. +func (o *AssetServiceNow) HasLowestTtl() bool { + if o != nil && !IsNil(o.LowestTtl) { + return true + } + + return false +} + +// SetLowestTtl gets a reference to the given int64 and assigns it to the LowestTtl field. +func (o *AssetServiceNow) SetLowestTtl(v int64) { + o.LowestTtl = &v +} + +// GetLowestRtt returns the LowestRtt field value if set, zero value otherwise. +func (o *AssetServiceNow) GetLowestRtt() int64 { + if o == nil || IsNil(o.LowestRtt) { + var ret int64 + return ret + } + return *o.LowestRtt +} + +// GetLowestRttOk returns a tuple with the LowestRtt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetLowestRttOk() (*int64, bool) { + if o == nil || IsNil(o.LowestRtt) { + return nil, false + } + return o.LowestRtt, true +} + +// HasLowestRtt returns a boolean if a field has been set. +func (o *AssetServiceNow) HasLowestRtt() bool { + if o != nil && !IsNil(o.LowestRtt) { + return true + } + + return false +} + +// SetLowestRtt gets a reference to the given int64 and assigns it to the LowestRtt field. +func (o *AssetServiceNow) SetLowestRtt(v int64) { + o.LowestRtt = &v +} + +// GetAlive returns the Alive field value if set, zero value otherwise. +func (o *AssetServiceNow) GetAlive() bool { + if o == nil || IsNil(o.Alive) { + var ret bool + return ret + } + return *o.Alive +} + +// GetAliveOk returns a tuple with the Alive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetAliveOk() (*bool, bool) { + if o == nil || IsNil(o.Alive) { + return nil, false + } + return o.Alive, true +} + +// HasAlive returns a boolean if a field has been set. +func (o *AssetServiceNow) HasAlive() bool { + if o != nil && !IsNil(o.Alive) { + return true + } + + return false +} + +// SetAlive gets a reference to the given bool and assigns it to the Alive field. +func (o *AssetServiceNow) SetAlive(v bool) { + o.Alive = &v +} + +// GetFirstDiscovered returns the FirstDiscovered field value if set, zero value otherwise. +func (o *AssetServiceNow) GetFirstDiscovered() string { + if o == nil || IsNil(o.FirstDiscovered) { + var ret string + return ret + } + return *o.FirstDiscovered +} + +// GetFirstDiscoveredOk returns a tuple with the FirstDiscovered field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetFirstDiscoveredOk() (*string, bool) { + if o == nil || IsNil(o.FirstDiscovered) { + return nil, false + } + return o.FirstDiscovered, true +} + +// HasFirstDiscovered returns a boolean if a field has been set. +func (o *AssetServiceNow) HasFirstDiscovered() bool { + if o != nil && !IsNil(o.FirstDiscovered) { + return true + } + + return false +} + +// SetFirstDiscovered gets a reference to the given string and assigns it to the FirstDiscovered field. +func (o *AssetServiceNow) SetFirstDiscovered(v string) { + o.FirstDiscovered = &v +} + +// GetLastDiscovered returns the LastDiscovered field value if set, zero value otherwise. +func (o *AssetServiceNow) GetLastDiscovered() string { + if o == nil || IsNil(o.LastDiscovered) { + var ret string + return ret + } + return *o.LastDiscovered +} + +// GetLastDiscoveredOk returns a tuple with the LastDiscovered field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetLastDiscoveredOk() (*string, bool) { + if o == nil || IsNil(o.LastDiscovered) { + return nil, false + } + return o.LastDiscovered, true +} + +// HasLastDiscovered returns a boolean if a field has been set. +func (o *AssetServiceNow) HasLastDiscovered() bool { + if o != nil && !IsNil(o.LastDiscovered) { + return true + } + + return false +} + +// SetLastDiscovered gets a reference to the given string and assigns it to the LastDiscovered field. +func (o *AssetServiceNow) SetLastDiscovered(v string) { + o.LastDiscovered = &v +} + +// GetLastUpdated returns the LastUpdated field value if set, zero value otherwise. +func (o *AssetServiceNow) GetLastUpdated() string { + if o == nil || IsNil(o.LastUpdated) { + var ret string + return ret + } + return *o.LastUpdated +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetLastUpdatedOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdated) { + return nil, false + } + return o.LastUpdated, true +} + +// HasLastUpdated returns a boolean if a field has been set. +func (o *AssetServiceNow) HasLastUpdated() bool { + if o != nil && !IsNil(o.LastUpdated) { + return true + } + + return false +} + +// SetLastUpdated gets a reference to the given string and assigns it to the LastUpdated field. +func (o *AssetServiceNow) SetLastUpdated(v string) { + o.LastUpdated = &v +} + +// GetComments returns the Comments field value if set, zero value otherwise. +func (o *AssetServiceNow) GetComments() string { + if o == nil || IsNil(o.Comments) { + var ret string + return ret + } + return *o.Comments +} + +// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetServiceNow) GetCommentsOk() (*string, bool) { + if o == nil || IsNil(o.Comments) { + return nil, false + } + return o.Comments, true +} + +// HasComments returns a boolean if a field has been set. +func (o *AssetServiceNow) HasComments() bool { + if o != nil && !IsNil(o.Comments) { + return true + } + + return false +} + +// SetComments gets a reference to the given string and assigns it to the Comments field. +func (o *AssetServiceNow) SetComments(v string) { + o.Comments = &v +} + +func (o AssetServiceNow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetServiceNow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["asset_id"] = o.AssetId + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.Site) { + toSerialize["site"] = o.Site + } + if !IsNil(o.DetectedBy) { + toSerialize["detected_by"] = o.DetectedBy + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.SysClassName) { + toSerialize["sys_class_name"] = o.SysClassName + } + if !IsNil(o.OsVendor) { + toSerialize["os_vendor"] = o.OsVendor + } + if !IsNil(o.OsProduct) { + toSerialize["os_product"] = o.OsProduct + } + if !IsNil(o.OsVersion) { + toSerialize["os_version"] = o.OsVersion + } + if !IsNil(o.HwVendor) { + toSerialize["hw_vendor"] = o.HwVendor + } + if !IsNil(o.HwProduct) { + toSerialize["hw_product"] = o.HwProduct + } + if !IsNil(o.HwVersion) { + toSerialize["hw_version"] = o.HwVersion + } + if o.IpAddress.IsSet() { + toSerialize["ip_address"] = o.IpAddress.Get() + } + if !IsNil(o.AddressesScope) { + toSerialize["addresses_scope"] = o.AddressesScope + } + if !IsNil(o.AddressesExtra) { + toSerialize["addresses_extra"] = o.AddressesExtra + } + if !IsNil(o.MacAddress) { + toSerialize["mac_address"] = o.MacAddress + } + if !IsNil(o.MacManufacturer) { + toSerialize["mac_manufacturer"] = o.MacManufacturer + } + if !IsNil(o.NewestMacAge) { + toSerialize["newest_mac_age"] = o.NewestMacAge + } + if !IsNil(o.Macs) { + toSerialize["macs"] = o.Macs + } + if !IsNil(o.MacVendors) { + toSerialize["mac_vendors"] = o.MacVendors + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.ServiceCount) { + toSerialize["service_count"] = o.ServiceCount + } + if !IsNil(o.ServiceCountTcp) { + toSerialize["service_count_tcp"] = o.ServiceCountTcp + } + if !IsNil(o.ServiceCountUdp) { + toSerialize["service_count_udp"] = o.ServiceCountUdp + } + if !IsNil(o.ServiceCountArp) { + toSerialize["service_count_arp"] = o.ServiceCountArp + } + if !IsNil(o.ServiceCountIcmp) { + toSerialize["service_count_icmp"] = o.ServiceCountIcmp + } + if !IsNil(o.LowestTtl) { + toSerialize["lowest_ttl"] = o.LowestTtl + } + if !IsNil(o.LowestRtt) { + toSerialize["lowest_rtt"] = o.LowestRtt + } + if !IsNil(o.Alive) { + toSerialize["alive"] = o.Alive + } + if !IsNil(o.FirstDiscovered) { + toSerialize["first_discovered"] = o.FirstDiscovered + } + if !IsNil(o.LastDiscovered) { + toSerialize["last_discovered"] = o.LastDiscovered + } + if !IsNil(o.LastUpdated) { + toSerialize["last_updated"] = o.LastUpdated + } + if !IsNil(o.Comments) { + toSerialize["comments"] = o.Comments + } + return toSerialize, nil +} + +func (o *AssetServiceNow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "asset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetServiceNow := _AssetServiceNow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetServiceNow) + + if err != nil { + return err + } + + *o = AssetServiceNow(varAssetServiceNow) + + return err +} + +type NullableAssetServiceNow struct { + value *AssetServiceNow + isSet bool +} + +func (v NullableAssetServiceNow) Get() *AssetServiceNow { + return v.value +} + +func (v *NullableAssetServiceNow) Set(val *AssetServiceNow) { + v.value = val + v.isSet = true +} + +func (v NullableAssetServiceNow) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetServiceNow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetServiceNow(val *AssetServiceNow) *NullableAssetServiceNow { + return &NullableAssetServiceNow{value: val, isSet: true} +} + +func (v NullableAssetServiceNow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetServiceNow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_asset_tags.go b/go/model_asset_tags.go index fd9bae6..85ed2c5 100644 --- a/go/model_asset_tags.go +++ b/go/model_asset_tags.go @@ -1,9 +1,9 @@ /* runZero API -runZero API +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. -API version: 1.0.4 +API version: 4.0.250826.0 Contact: support@runzero.com */ @@ -13,13 +13,20 @@ package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the AssetTags type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetTags{} + // AssetTags struct for AssetTags type AssetTags struct { Tags string `json:"tags"` } +type _AssetTags AssetTags + // NewAssetTags instantiates a new AssetTags object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -51,7 +58,7 @@ func (o *AssetTags) GetTags() string { // GetTagsOk returns a tuple with the Tags field value // and a boolean to check if the value has been set. func (o *AssetTags) GetTagsOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Tags, true @@ -63,13 +70,56 @@ func (o *AssetTags) SetTags(v string) { } func (o AssetTags) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["tags"] = o.Tags + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AssetTags) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tags"] = o.Tags + return toSerialize, nil +} + +func (o *AssetTags) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetTags := _AssetTags{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetTags) + + if err != nil { + return err + } + + *o = AssetTags(varAssetTags) + + return err +} + type NullableAssetTags struct { value *AssetTags isSet bool diff --git a/go/model_asset_tags_with_search.go b/go/model_asset_tags_with_search.go index f201c9e..4c4a0a3 100644 --- a/go/model_asset_tags_with_search.go +++ b/go/model_asset_tags_with_search.go @@ -1,9 +1,9 @@ /* runZero API -runZero API +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. -API version: 3.0.0 +API version: 4.0.250826.0 Contact: support@runzero.com */ @@ -13,14 +13,21 @@ package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the AssetTagsWithSearch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetTagsWithSearch{} + // AssetTagsWithSearch struct for AssetTagsWithSearch type AssetTagsWithSearch struct { Tags string `json:"tags"` Search string `json:"search"` } +type _AssetTagsWithSearch AssetTagsWithSearch + // NewAssetTagsWithSearch instantiates a new AssetTagsWithSearch object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -53,7 +60,7 @@ func (o *AssetTagsWithSearch) GetTags() string { // GetTagsOk returns a tuple with the Tags field value // and a boolean to check if the value has been set. func (o *AssetTagsWithSearch) GetTagsOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Tags, true @@ -77,7 +84,7 @@ func (o *AssetTagsWithSearch) GetSearch() string { // GetSearchOk returns a tuple with the Search field value // and a boolean to check if the value has been set. func (o *AssetTagsWithSearch) GetSearchOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Search, true @@ -89,14 +96,56 @@ func (o *AssetTagsWithSearch) SetSearch(v string) { } func (o AssetTagsWithSearch) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetTagsWithSearch) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["tags"] = o.Tags + toSerialize["tags"] = o.Tags + toSerialize["search"] = o.Search + return toSerialize, nil +} + +func (o *AssetTagsWithSearch) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tags", + "search", } - if true { - toSerialize["search"] = o.Search + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; } - return json.Marshal(toSerialize) + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetTagsWithSearch := _AssetTagsWithSearch{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetTagsWithSearch) + + if err != nil { + return err + } + + *o = AssetTagsWithSearch(varAssetTagsWithSearch) + + return err } type NullableAssetTagsWithSearch struct { diff --git a/go/model_assets_with_checkpoint.go b/go/model_assets_with_checkpoint.go index e3703f5..d56b168 100644 --- a/go/model_assets_with_checkpoint.go +++ b/go/model_assets_with_checkpoint.go @@ -1,25 +1,33 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the AssetsWithCheckpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetsWithCheckpoint{} + // AssetsWithCheckpoint struct for AssetsWithCheckpoint type AssetsWithCheckpoint struct { - Since int64 `json:"since"` + Since int64 `json:"since"` Assets []Asset `json:"assets"` } +type _AssetsWithCheckpoint AssetsWithCheckpoint + // NewAssetsWithCheckpoint instantiates a new AssetsWithCheckpoint object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -75,11 +83,11 @@ func (o *AssetsWithCheckpoint) GetAssets() []Asset { // GetAssetsOk returns a tuple with the Assets field value // and a boolean to check if the value has been set. -func (o *AssetsWithCheckpoint) GetAssetsOk() (*[]Asset, bool) { +func (o *AssetsWithCheckpoint) GetAssetsOk() ([]Asset, bool) { if o == nil { return nil, false } - return &o.Assets, true + return o.Assets, true } // SetAssets sets field value @@ -88,14 +96,56 @@ func (o *AssetsWithCheckpoint) SetAssets(v []Asset) { } func (o AssetsWithCheckpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetsWithCheckpoint) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["since"] = o.Since + toSerialize["since"] = o.Since + toSerialize["assets"] = o.Assets + return toSerialize, nil +} + +func (o *AssetsWithCheckpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "since", + "assets", } - if true { - toSerialize["assets"] = o.Assets + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; } - return json.Marshal(toSerialize) + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssetsWithCheckpoint := _AssetsWithCheckpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssetsWithCheckpoint) + + if err != nil { + return err + } + + *o = AssetsWithCheckpoint(varAssetsWithCheckpoint) + + return err } type NullableAssetsWithCheckpoint struct { @@ -133,3 +183,5 @@ func (v *NullableAssetsWithCheckpoint) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_aws_credential_fields.go b/go/model_aws_credential_fields.go new file mode 100644 index 0000000..5c5858a --- /dev/null +++ b/go/model_aws_credential_fields.go @@ -0,0 +1,295 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWSCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWSCredentialFields{} + +// AWSCredentialFields struct for AWSCredentialFields +type AWSCredentialFields struct { + AccessKey string `json:"access_key"` + SecretAccessKey string `json:"secret_access_key"` + Regions *string `json:"regions,omitempty"` + UseCrossAccountOrg *string `json:"use_cross_account_org,omitempty"` + Role *string `json:"role,omitempty"` +} + +type _AWSCredentialFields AWSCredentialFields + +// NewAWSCredentialFields instantiates a new AWSCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWSCredentialFields(accessKey string, secretAccessKey string) *AWSCredentialFields { + this := AWSCredentialFields{} + this.AccessKey = accessKey + this.SecretAccessKey = secretAccessKey + return &this +} + +// NewAWSCredentialFieldsWithDefaults instantiates a new AWSCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWSCredentialFieldsWithDefaults() *AWSCredentialFields { + this := AWSCredentialFields{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *AWSCredentialFields) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *AWSCredentialFields) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *AWSCredentialFields) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretAccessKey returns the SecretAccessKey field value +func (o *AWSCredentialFields) GetSecretAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretAccessKey +} + +// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value +// and a boolean to check if the value has been set. +func (o *AWSCredentialFields) GetSecretAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretAccessKey, true +} + +// SetSecretAccessKey sets field value +func (o *AWSCredentialFields) SetSecretAccessKey(v string) { + o.SecretAccessKey = v +} + +// GetRegions returns the Regions field value if set, zero value otherwise. +func (o *AWSCredentialFields) GetRegions() string { + if o == nil || IsNil(o.Regions) { + var ret string + return ret + } + return *o.Regions +} + +// GetRegionsOk returns a tuple with the Regions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWSCredentialFields) GetRegionsOk() (*string, bool) { + if o == nil || IsNil(o.Regions) { + return nil, false + } + return o.Regions, true +} + +// HasRegions returns a boolean if a field has been set. +func (o *AWSCredentialFields) HasRegions() bool { + if o != nil && !IsNil(o.Regions) { + return true + } + + return false +} + +// SetRegions gets a reference to the given string and assigns it to the Regions field. +func (o *AWSCredentialFields) SetRegions(v string) { + o.Regions = &v +} + +// GetUseCrossAccountOrg returns the UseCrossAccountOrg field value if set, zero value otherwise. +func (o *AWSCredentialFields) GetUseCrossAccountOrg() string { + if o == nil || IsNil(o.UseCrossAccountOrg) { + var ret string + return ret + } + return *o.UseCrossAccountOrg +} + +// GetUseCrossAccountOrgOk returns a tuple with the UseCrossAccountOrg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWSCredentialFields) GetUseCrossAccountOrgOk() (*string, bool) { + if o == nil || IsNil(o.UseCrossAccountOrg) { + return nil, false + } + return o.UseCrossAccountOrg, true +} + +// HasUseCrossAccountOrg returns a boolean if a field has been set. +func (o *AWSCredentialFields) HasUseCrossAccountOrg() bool { + if o != nil && !IsNil(o.UseCrossAccountOrg) { + return true + } + + return false +} + +// SetUseCrossAccountOrg gets a reference to the given string and assigns it to the UseCrossAccountOrg field. +func (o *AWSCredentialFields) SetUseCrossAccountOrg(v string) { + o.UseCrossAccountOrg = &v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *AWSCredentialFields) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWSCredentialFields) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *AWSCredentialFields) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *AWSCredentialFields) SetRole(v string) { + o.Role = &v +} + +func (o AWSCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWSCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_access_key"] = o.SecretAccessKey + if !IsNil(o.Regions) { + toSerialize["regions"] = o.Regions + } + if !IsNil(o.UseCrossAccountOrg) { + toSerialize["use_cross_account_org"] = o.UseCrossAccountOrg + } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + return toSerialize, nil +} + +func (o *AWSCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "secret_access_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWSCredentialFields := _AWSCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWSCredentialFields) + + if err != nil { + return err + } + + *o = AWSCredentialFields(varAWSCredentialFields) + + return err +} + +type NullableAWSCredentialFields struct { + value *AWSCredentialFields + isSet bool +} + +func (v NullableAWSCredentialFields) Get() *AWSCredentialFields { + return v.value +} + +func (v *NullableAWSCredentialFields) Set(val *AWSCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableAWSCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableAWSCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWSCredentialFields(val *AWSCredentialFields) *NullableAWSCredentialFields { + return &NullableAWSCredentialFields{value: val, isSet: true} +} + +func (v NullableAWSCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWSCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_azure_client_secret_credential_fields.go b/go/model_azure_client_secret_credential_fields.go new file mode 100644 index 0000000..3469075 --- /dev/null +++ b/go/model_azure_client_secret_credential_fields.go @@ -0,0 +1,315 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureClientSecretCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureClientSecretCredentialFields{} + +// AzureClientSecretCredentialFields struct for AzureClientSecretCredentialFields +type AzureClientSecretCredentialFields struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + TenantId string `json:"tenant_id"` + Environment string `json:"environment"` + MultiSubscription *string `json:"multi_subscription,omitempty"` + SubscriptionId *string `json:"subscription_id,omitempty"` +} + +type _AzureClientSecretCredentialFields AzureClientSecretCredentialFields + +// NewAzureClientSecretCredentialFields instantiates a new AzureClientSecretCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureClientSecretCredentialFields(clientId string, clientSecret string, tenantId string, environment string) *AzureClientSecretCredentialFields { + this := AzureClientSecretCredentialFields{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TenantId = tenantId + this.Environment = environment + return &this +} + +// NewAzureClientSecretCredentialFieldsWithDefaults instantiates a new AzureClientSecretCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureClientSecretCredentialFieldsWithDefaults() *AzureClientSecretCredentialFields { + this := AzureClientSecretCredentialFields{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *AzureClientSecretCredentialFields) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *AzureClientSecretCredentialFields) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *AzureClientSecretCredentialFields) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *AzureClientSecretCredentialFields) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetTenantId returns the TenantId field value +func (o *AzureClientSecretCredentialFields) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *AzureClientSecretCredentialFields) SetTenantId(v string) { + o.TenantId = v +} + +// GetEnvironment returns the Environment field value +func (o *AzureClientSecretCredentialFields) GetEnvironment() string { + if o == nil { + var ret string + return ret + } + + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *AzureClientSecretCredentialFields) SetEnvironment(v string) { + o.Environment = v +} + +// GetMultiSubscription returns the MultiSubscription field value if set, zero value otherwise. +func (o *AzureClientSecretCredentialFields) GetMultiSubscription() string { + if o == nil || IsNil(o.MultiSubscription) { + var ret string + return ret + } + return *o.MultiSubscription +} + +// GetMultiSubscriptionOk returns a tuple with the MultiSubscription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetMultiSubscriptionOk() (*string, bool) { + if o == nil || IsNil(o.MultiSubscription) { + return nil, false + } + return o.MultiSubscription, true +} + +// HasMultiSubscription returns a boolean if a field has been set. +func (o *AzureClientSecretCredentialFields) HasMultiSubscription() bool { + if o != nil && !IsNil(o.MultiSubscription) { + return true + } + + return false +} + +// SetMultiSubscription gets a reference to the given string and assigns it to the MultiSubscription field. +func (o *AzureClientSecretCredentialFields) SetMultiSubscription(v string) { + o.MultiSubscription = &v +} + +// GetSubscriptionId returns the SubscriptionId field value if set, zero value otherwise. +func (o *AzureClientSecretCredentialFields) GetSubscriptionId() string { + if o == nil || IsNil(o.SubscriptionId) { + var ret string + return ret + } + return *o.SubscriptionId +} + +// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AzureClientSecretCredentialFields) GetSubscriptionIdOk() (*string, bool) { + if o == nil || IsNil(o.SubscriptionId) { + return nil, false + } + return o.SubscriptionId, true +} + +// HasSubscriptionId returns a boolean if a field has been set. +func (o *AzureClientSecretCredentialFields) HasSubscriptionId() bool { + if o != nil && !IsNil(o.SubscriptionId) { + return true + } + + return false +} + +// SetSubscriptionId gets a reference to the given string and assigns it to the SubscriptionId field. +func (o *AzureClientSecretCredentialFields) SetSubscriptionId(v string) { + o.SubscriptionId = &v +} + +func (o AzureClientSecretCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureClientSecretCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["tenant_id"] = o.TenantId + toSerialize["environment"] = o.Environment + if !IsNil(o.MultiSubscription) { + toSerialize["multi_subscription"] = o.MultiSubscription + } + if !IsNil(o.SubscriptionId) { + toSerialize["subscription_id"] = o.SubscriptionId + } + return toSerialize, nil +} + +func (o *AzureClientSecretCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "tenant_id", + "environment", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureClientSecretCredentialFields := _AzureClientSecretCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureClientSecretCredentialFields) + + if err != nil { + return err + } + + *o = AzureClientSecretCredentialFields(varAzureClientSecretCredentialFields) + + return err +} + +type NullableAzureClientSecretCredentialFields struct { + value *AzureClientSecretCredentialFields + isSet bool +} + +func (v NullableAzureClientSecretCredentialFields) Get() *AzureClientSecretCredentialFields { + return v.value +} + +func (v *NullableAzureClientSecretCredentialFields) Set(val *AzureClientSecretCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableAzureClientSecretCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureClientSecretCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureClientSecretCredentialFields(val *AzureClientSecretCredentialFields) *NullableAzureClientSecretCredentialFields { + return &NullableAzureClientSecretCredentialFields{value: val, isSet: true} +} + +func (v NullableAzureClientSecretCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureClientSecretCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_azure_username_password_credential_fields.go b/go/model_azure_username_password_credential_fields.go new file mode 100644 index 0000000..c811ba3 --- /dev/null +++ b/go/model_azure_username_password_credential_fields.go @@ -0,0 +1,243 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureUsernamePasswordCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureUsernamePasswordCredentialFields{} + +// AzureUsernamePasswordCredentialFields struct for AzureUsernamePasswordCredentialFields +type AzureUsernamePasswordCredentialFields struct { + ClientId string `json:"client_id"` + TenantId string `json:"tenant_id"` + Username string `json:"username"` + Password string `json:"password"` +} + +type _AzureUsernamePasswordCredentialFields AzureUsernamePasswordCredentialFields + +// NewAzureUsernamePasswordCredentialFields instantiates a new AzureUsernamePasswordCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureUsernamePasswordCredentialFields(clientId string, tenantId string, username string, password string) *AzureUsernamePasswordCredentialFields { + this := AzureUsernamePasswordCredentialFields{} + this.ClientId = clientId + this.TenantId = tenantId + this.Username = username + this.Password = password + return &this +} + +// NewAzureUsernamePasswordCredentialFieldsWithDefaults instantiates a new AzureUsernamePasswordCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureUsernamePasswordCredentialFieldsWithDefaults() *AzureUsernamePasswordCredentialFields { + this := AzureUsernamePasswordCredentialFields{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *AzureUsernamePasswordCredentialFields) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *AzureUsernamePasswordCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *AzureUsernamePasswordCredentialFields) SetClientId(v string) { + o.ClientId = v +} + +// GetTenantId returns the TenantId field value +func (o *AzureUsernamePasswordCredentialFields) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *AzureUsernamePasswordCredentialFields) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *AzureUsernamePasswordCredentialFields) SetTenantId(v string) { + o.TenantId = v +} + +// GetUsername returns the Username field value +func (o *AzureUsernamePasswordCredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *AzureUsernamePasswordCredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *AzureUsernamePasswordCredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *AzureUsernamePasswordCredentialFields) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *AzureUsernamePasswordCredentialFields) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *AzureUsernamePasswordCredentialFields) SetPassword(v string) { + o.Password = v +} + +func (o AzureUsernamePasswordCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureUsernamePasswordCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["tenant_id"] = o.TenantId + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + return toSerialize, nil +} + +func (o *AzureUsernamePasswordCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "tenant_id", + "username", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureUsernamePasswordCredentialFields := _AzureUsernamePasswordCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureUsernamePasswordCredentialFields) + + if err != nil { + return err + } + + *o = AzureUsernamePasswordCredentialFields(varAzureUsernamePasswordCredentialFields) + + return err +} + +type NullableAzureUsernamePasswordCredentialFields struct { + value *AzureUsernamePasswordCredentialFields + isSet bool +} + +func (v NullableAzureUsernamePasswordCredentialFields) Get() *AzureUsernamePasswordCredentialFields { + return v.value +} + +func (v *NullableAzureUsernamePasswordCredentialFields) Set(val *AzureUsernamePasswordCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableAzureUsernamePasswordCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureUsernamePasswordCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureUsernamePasswordCredentialFields(val *AzureUsernamePasswordCredentialFields) *NullableAzureUsernamePasswordCredentialFields { + return &NullableAzureUsernamePasswordCredentialFields{value: val, isSet: true} +} + +func (v NullableAzureUsernamePasswordCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureUsernamePasswordCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_base_custom_integration.go b/go/model_base_custom_integration.go new file mode 100644 index 0000000..097b5d1 --- /dev/null +++ b/go/model_base_custom_integration.go @@ -0,0 +1,202 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the BaseCustomIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseCustomIntegration{} + +// BaseCustomIntegration struct for BaseCustomIntegration +type BaseCustomIntegration struct { + // The unique name of the custom integration, without spaces. + Name *string `json:"name,omitempty"` + // Base64 encoded png with maximum size 256x256 pixels + Icon *string `json:"icon,omitempty"` + // A text description of the custom integration + Description *string `json:"description,omitempty"` +} + +// NewBaseCustomIntegration instantiates a new BaseCustomIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseCustomIntegration() *BaseCustomIntegration { + this := BaseCustomIntegration{} + return &this +} + +// NewBaseCustomIntegrationWithDefaults instantiates a new BaseCustomIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseCustomIntegrationWithDefaults() *BaseCustomIntegration { + this := BaseCustomIntegration{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BaseCustomIntegration) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseCustomIntegration) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *BaseCustomIntegration) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *BaseCustomIntegration) SetName(v string) { + o.Name = &v +} + +// GetIcon returns the Icon field value if set, zero value otherwise. +func (o *BaseCustomIntegration) GetIcon() string { + if o == nil || IsNil(o.Icon) { + var ret string + return ret + } + return *o.Icon +} + +// GetIconOk returns a tuple with the Icon field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseCustomIntegration) GetIconOk() (*string, bool) { + if o == nil || IsNil(o.Icon) { + return nil, false + } + return o.Icon, true +} + +// HasIcon returns a boolean if a field has been set. +func (o *BaseCustomIntegration) HasIcon() bool { + if o != nil && !IsNil(o.Icon) { + return true + } + + return false +} + +// SetIcon gets a reference to the given string and assigns it to the Icon field. +func (o *BaseCustomIntegration) SetIcon(v string) { + o.Icon = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *BaseCustomIntegration) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseCustomIntegration) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *BaseCustomIntegration) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *BaseCustomIntegration) SetDescription(v string) { + o.Description = &v +} + +func (o BaseCustomIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseCustomIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Icon) { + toSerialize["icon"] = o.Icon + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableBaseCustomIntegration struct { + value *BaseCustomIntegration + isSet bool +} + +func (v NullableBaseCustomIntegration) Get() *BaseCustomIntegration { + return v.value +} + +func (v *NullableBaseCustomIntegration) Set(val *BaseCustomIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableBaseCustomIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseCustomIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseCustomIntegration(val *BaseCustomIntegration) *NullableBaseCustomIntegration { + return &NullableBaseCustomIntegration{value: val, isSet: true} +} + +func (v NullableBaseCustomIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseCustomIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_base_response.go b/go/model_base_response.go new file mode 100644 index 0000000..738f203 --- /dev/null +++ b/go/model_base_response.go @@ -0,0 +1,314 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the BaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseResponse{} + +// BaseResponse Minimal identifying information with lifecycle metadata +type BaseResponse struct { + // The unique ID of the object + Id string `json:"id"` + // The unique ID of the runZero client/customer account that owns the object + ClientId string `json:"client_id"` + // The unique ID of the entity that created the object + CreatedById string `json:"created_by_id"` + // A timestamp indicating creation time of the object + CreatedAt time.Time `json:"created_at"` + // A timestamp indicating last modified time of the object + UpdatedAt time.Time `json:"updated_at"` + // A timestamp indicating deletion time of the object + DestroyedAt *time.Time `json:"destroyed_at,omitempty"` +} + +type _BaseResponse BaseResponse + +// NewBaseResponse instantiates a new BaseResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseResponse(id string, clientId string, createdById string, createdAt time.Time, updatedAt time.Time) *BaseResponse { + this := BaseResponse{} + this.Id = id + this.ClientId = clientId + this.CreatedById = createdById + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewBaseResponseWithDefaults instantiates a new BaseResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseResponseWithDefaults() *BaseResponse { + this := BaseResponse{} + return &this +} + +// GetId returns the Id field value +func (o *BaseResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *BaseResponse) SetId(v string) { + o.Id = v +} + +// GetClientId returns the ClientId field value +func (o *BaseResponse) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *BaseResponse) SetClientId(v string) { + o.ClientId = v +} + +// GetCreatedById returns the CreatedById field value +func (o *BaseResponse) GetCreatedById() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedById +} + +// GetCreatedByIdOk returns a tuple with the CreatedById field value +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetCreatedByIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedById, true +} + +// SetCreatedById sets field value +func (o *BaseResponse) SetCreatedById(v string) { + o.CreatedById = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *BaseResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *BaseResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *BaseResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *BaseResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetDestroyedAt returns the DestroyedAt field value if set, zero value otherwise. +func (o *BaseResponse) GetDestroyedAt() time.Time { + if o == nil || IsNil(o.DestroyedAt) { + var ret time.Time + return ret + } + return *o.DestroyedAt +} + +// GetDestroyedAtOk returns a tuple with the DestroyedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseResponse) GetDestroyedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.DestroyedAt) { + return nil, false + } + return o.DestroyedAt, true +} + +// HasDestroyedAt returns a boolean if a field has been set. +func (o *BaseResponse) HasDestroyedAt() bool { + if o != nil && !IsNil(o.DestroyedAt) { + return true + } + + return false +} + +// SetDestroyedAt gets a reference to the given time.Time and assigns it to the DestroyedAt field. +func (o *BaseResponse) SetDestroyedAt(v time.Time) { + o.DestroyedAt = &v +} + +func (o BaseResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["client_id"] = o.ClientId + toSerialize["created_by_id"] = o.CreatedById + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + if !IsNil(o.DestroyedAt) { + toSerialize["destroyed_at"] = o.DestroyedAt + } + return toSerialize, nil +} + +func (o *BaseResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "client_id", + "created_by_id", + "created_at", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBaseResponse := _BaseResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBaseResponse) + + if err != nil { + return err + } + + *o = BaseResponse(varBaseResponse) + + return err +} + +type NullableBaseResponse struct { + value *BaseResponse + isSet bool +} + +func (v NullableBaseResponse) Get() *BaseResponse { + return v.value +} + +func (v *NullableBaseResponse) Set(val *BaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseResponse(val *BaseResponse) *NullableBaseResponse { + return &NullableBaseResponse{value: val, isSet: true} +} + +func (v NullableBaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_bulk_asset_update_result.go b/go/model_bulk_asset_update_result.go new file mode 100644 index 0000000..b19a820 --- /dev/null +++ b/go/model_bulk_asset_update_result.go @@ -0,0 +1,127 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the BulkAssetUpdateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAssetUpdateResult{} + +// BulkAssetUpdateResult Result of a bulk asset update operation. +type BulkAssetUpdateResult struct { + UpdatedAssetCount *int32 `json:"updated_asset_count,omitempty"` +} + +// NewBulkAssetUpdateResult instantiates a new BulkAssetUpdateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAssetUpdateResult() *BulkAssetUpdateResult { + this := BulkAssetUpdateResult{} + return &this +} + +// NewBulkAssetUpdateResultWithDefaults instantiates a new BulkAssetUpdateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAssetUpdateResultWithDefaults() *BulkAssetUpdateResult { + this := BulkAssetUpdateResult{} + return &this +} + +// GetUpdatedAssetCount returns the UpdatedAssetCount field value if set, zero value otherwise. +func (o *BulkAssetUpdateResult) GetUpdatedAssetCount() int32 { + if o == nil || IsNil(o.UpdatedAssetCount) { + var ret int32 + return ret + } + return *o.UpdatedAssetCount +} + +// GetUpdatedAssetCountOk returns a tuple with the UpdatedAssetCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAssetUpdateResult) GetUpdatedAssetCountOk() (*int32, bool) { + if o == nil || IsNil(o.UpdatedAssetCount) { + return nil, false + } + return o.UpdatedAssetCount, true +} + +// HasUpdatedAssetCount returns a boolean if a field has been set. +func (o *BulkAssetUpdateResult) HasUpdatedAssetCount() bool { + if o != nil && !IsNil(o.UpdatedAssetCount) { + return true + } + + return false +} + +// SetUpdatedAssetCount gets a reference to the given int32 and assigns it to the UpdatedAssetCount field. +func (o *BulkAssetUpdateResult) SetUpdatedAssetCount(v int32) { + o.UpdatedAssetCount = &v +} + +func (o BulkAssetUpdateResult) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAssetUpdateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.UpdatedAssetCount) { + toSerialize["updated_asset_count"] = o.UpdatedAssetCount + } + return toSerialize, nil +} + +type NullableBulkAssetUpdateResult struct { + value *BulkAssetUpdateResult + isSet bool +} + +func (v NullableBulkAssetUpdateResult) Get() *BulkAssetUpdateResult { + return v.value +} + +func (v *NullableBulkAssetUpdateResult) Set(val *BulkAssetUpdateResult) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAssetUpdateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAssetUpdateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAssetUpdateResult(val *BulkAssetUpdateResult) *NullableBulkAssetUpdateResult { + return &NullableBulkAssetUpdateResult{value: val, isSet: true} +} + +func (v NullableBulkAssetUpdateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAssetUpdateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_censys_credential_fields.go b/go/model_censys_credential_fields.go new file mode 100644 index 0000000..e2fed37 --- /dev/null +++ b/go/model_censys_credential_fields.go @@ -0,0 +1,223 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CensysCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CensysCredentialFields{} + +// CensysCredentialFields struct for CensysCredentialFields +type CensysCredentialFields struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + ApiUrl *string `json:"api_url,omitempty"` +} + +type _CensysCredentialFields CensysCredentialFields + +// NewCensysCredentialFields instantiates a new CensysCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCensysCredentialFields(clientId string, clientSecret string) *CensysCredentialFields { + this := CensysCredentialFields{} + this.ClientId = clientId + this.ClientSecret = clientSecret + return &this +} + +// NewCensysCredentialFieldsWithDefaults instantiates a new CensysCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCensysCredentialFieldsWithDefaults() *CensysCredentialFields { + this := CensysCredentialFields{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *CensysCredentialFields) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CensysCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CensysCredentialFields) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *CensysCredentialFields) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CensysCredentialFields) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CensysCredentialFields) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetApiUrl returns the ApiUrl field value if set, zero value otherwise. +func (o *CensysCredentialFields) GetApiUrl() string { + if o == nil || IsNil(o.ApiUrl) { + var ret string + return ret + } + return *o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CensysCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil || IsNil(o.ApiUrl) { + return nil, false + } + return o.ApiUrl, true +} + +// HasApiUrl returns a boolean if a field has been set. +func (o *CensysCredentialFields) HasApiUrl() bool { + if o != nil && !IsNil(o.ApiUrl) { + return true + } + + return false +} + +// SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field. +func (o *CensysCredentialFields) SetApiUrl(v string) { + o.ApiUrl = &v +} + +func (o CensysCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CensysCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + if !IsNil(o.ApiUrl) { + toSerialize["api_url"] = o.ApiUrl + } + return toSerialize, nil +} + +func (o *CensysCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCensysCredentialFields := _CensysCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCensysCredentialFields) + + if err != nil { + return err + } + + *o = CensysCredentialFields(varCensysCredentialFields) + + return err +} + +type NullableCensysCredentialFields struct { + value *CensysCredentialFields + isSet bool +} + +func (v NullableCensysCredentialFields) Get() *CensysCredentialFields { + return v.value +} + +func (v *NullableCensysCredentialFields) Set(val *CensysCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableCensysCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableCensysCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCensysCredentialFields(val *CensysCredentialFields) *NullableCensysCredentialFields { + return &NullableCensysCredentialFields{value: val, isSet: true} +} + +func (v NullableCensysCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCensysCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_certificate.go b/go/model_certificate.go new file mode 100644 index 0000000..9ee73c8 --- /dev/null +++ b/go/model_certificate.go @@ -0,0 +1,1475 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Certificate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Certificate{} + +// Certificate struct for Certificate +type Certificate struct { + Id string `json:"id"` + Type *string `json:"type,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + // When the certificate was last seen in a response from a service, and updated. + UpdatedAt *int64 `json:"updated_at,omitempty"` + OrganizationId string `json:"organization_id"` + // An assembled list of all names in the certificate. + Names []string `json:"names,omitempty"` + // Whether the certificate appears to be self-signed based on subject and authority. + SelfSigned *bool `json:"self_signed,omitempty"` + // Whether the certificate has been hidden from the default certificates view. + Hidden *bool `json:"hidden,omitempty"` + // The serial number of the certificate. + Serial *string `json:"serial,omitempty"` + // When the certificate becomes valid. + ValidityStart *int64 `json:"validity_start,omitempty"` + // When the certificate ceases to be valid. + ValidityEnd *int64 `json:"validity_end,omitempty"` + PublicKey *string `json:"public_key,omitempty"` + PublicKeyBits *int32 `json:"public_key_bits,omitempty"` + PublicKeyAlgorithm *string `json:"public_key_algorithm,omitempty"` + Signature *string `json:"signature,omitempty"` + SignatureAlgorithm *string `json:"signature_algorithm,omitempty"` + // The badkeys hash. + FpBkhash *string `json:"fp_bkhash,omitempty"` + // The SHA1 hash of the certificate. + FpSha1 *string `json:"fp_sha1,omitempty"` + // The SHA256 hash of the certificate. + FpSha256 *string `json:"fp_sha256,omitempty"` + // The MD5 hash of the certificate (for SSH). + FpMd5 *string `json:"fp_md5,omitempty"` + // The subject of the certificate. + Subject *string `json:"subject,omitempty"` + // The Common Name field from the certificate (no longer used by web browsers). + Cn *string `json:"cn,omitempty"` + // The version of the certificate. + Version *int32 `json:"version,omitempty"` + // The authority which issued the certificate. + Issuer *string `json:"issuer,omitempty"` + // The key ID of the subject of the certificate. + SubjectKeyId *string `json:"subject_key_id,omitempty"` + // The key ID of the authority which signed the certificate. + AuthorityKeyId *string `json:"authority_key_id,omitempty"` + // Zero or more OCSP server URLs. + OcspServer []string `json:"ocsp_server,omitempty"` + // Zero or more URLs of CRLs. + CrlDistributionPoints []string `json:"crl_distribution_points,omitempty"` + // Zero or more URLs where the issuing certificate can be found. + IssuingCertificateUrl []string `json:"issuing_certificate_url,omitempty"` + // Whether the certificate claims to be a Certificate Authority. + IsCa *bool `json:"is_ca,omitempty"` + // Valid purposes the certificate's key can be used for. + KeyUsage []string `json:"key_usage,omitempty"` + // Additional purposes the certificate's key can be used for. + ExtKeyUsage []string `json:"ext_key_usage,omitempty"` + // Subject Alternative Name hostnames. + SanDnsNames []string `json:"san_dns_names,omitempty"` + // Subject Alternative Name IP addresses. + SanIpAddresses []*string `json:"san_ip_addresses,omitempty"` + // Subject Alternative Name email addresses. + SanEmailAddresses []string `json:"san_email_addresses,omitempty"` + // Subject Alternative Name URIs. + SanUris []string `json:"san_uris,omitempty"` + // Parameters specific to the public key type. + PublicKeyParameters map[string]interface{} `json:"public_key_parameters,omitempty"` +} + +type _Certificate Certificate + +// NewCertificate instantiates a new Certificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificate(id string, organizationId string) *Certificate { + this := Certificate{} + this.Id = id + this.OrganizationId = organizationId + return &this +} + +// NewCertificateWithDefaults instantiates a new Certificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateWithDefaults() *Certificate { + this := Certificate{} + return &this +} + +// GetId returns the Id field value +func (o *Certificate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Certificate) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Certificate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Certificate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Certificate) SetType(v string) { + o.Type = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Certificate) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Certificate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Certificate) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Certificate) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Certificate) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *Certificate) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *Certificate) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *Certificate) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetNames returns the Names field value if set, zero value otherwise. +func (o *Certificate) GetNames() []string { + if o == nil || IsNil(o.Names) { + var ret []string + return ret + } + return o.Names +} + +// GetNamesOk returns a tuple with the Names field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { + return nil, false + } + return o.Names, true +} + +// HasNames returns a boolean if a field has been set. +func (o *Certificate) HasNames() bool { + if o != nil && !IsNil(o.Names) { + return true + } + + return false +} + +// SetNames gets a reference to the given []string and assigns it to the Names field. +func (o *Certificate) SetNames(v []string) { + o.Names = v +} + +// GetSelfSigned returns the SelfSigned field value if set, zero value otherwise. +func (o *Certificate) GetSelfSigned() bool { + if o == nil || IsNil(o.SelfSigned) { + var ret bool + return ret + } + return *o.SelfSigned +} + +// GetSelfSignedOk returns a tuple with the SelfSigned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSelfSignedOk() (*bool, bool) { + if o == nil || IsNil(o.SelfSigned) { + return nil, false + } + return o.SelfSigned, true +} + +// HasSelfSigned returns a boolean if a field has been set. +func (o *Certificate) HasSelfSigned() bool { + if o != nil && !IsNil(o.SelfSigned) { + return true + } + + return false +} + +// SetSelfSigned gets a reference to the given bool and assigns it to the SelfSigned field. +func (o *Certificate) SetSelfSigned(v bool) { + o.SelfSigned = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *Certificate) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *Certificate) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *Certificate) SetHidden(v bool) { + o.Hidden = &v +} + +// GetSerial returns the Serial field value if set, zero value otherwise. +func (o *Certificate) GetSerial() string { + if o == nil || IsNil(o.Serial) { + var ret string + return ret + } + return *o.Serial +} + +// GetSerialOk returns a tuple with the Serial field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSerialOk() (*string, bool) { + if o == nil || IsNil(o.Serial) { + return nil, false + } + return o.Serial, true +} + +// HasSerial returns a boolean if a field has been set. +func (o *Certificate) HasSerial() bool { + if o != nil && !IsNil(o.Serial) { + return true + } + + return false +} + +// SetSerial gets a reference to the given string and assigns it to the Serial field. +func (o *Certificate) SetSerial(v string) { + o.Serial = &v +} + +// GetValidityStart returns the ValidityStart field value if set, zero value otherwise. +func (o *Certificate) GetValidityStart() int64 { + if o == nil || IsNil(o.ValidityStart) { + var ret int64 + return ret + } + return *o.ValidityStart +} + +// GetValidityStartOk returns a tuple with the ValidityStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetValidityStartOk() (*int64, bool) { + if o == nil || IsNil(o.ValidityStart) { + return nil, false + } + return o.ValidityStart, true +} + +// HasValidityStart returns a boolean if a field has been set. +func (o *Certificate) HasValidityStart() bool { + if o != nil && !IsNil(o.ValidityStart) { + return true + } + + return false +} + +// SetValidityStart gets a reference to the given int64 and assigns it to the ValidityStart field. +func (o *Certificate) SetValidityStart(v int64) { + o.ValidityStart = &v +} + +// GetValidityEnd returns the ValidityEnd field value if set, zero value otherwise. +func (o *Certificate) GetValidityEnd() int64 { + if o == nil || IsNil(o.ValidityEnd) { + var ret int64 + return ret + } + return *o.ValidityEnd +} + +// GetValidityEndOk returns a tuple with the ValidityEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetValidityEndOk() (*int64, bool) { + if o == nil || IsNil(o.ValidityEnd) { + return nil, false + } + return o.ValidityEnd, true +} + +// HasValidityEnd returns a boolean if a field has been set. +func (o *Certificate) HasValidityEnd() bool { + if o != nil && !IsNil(o.ValidityEnd) { + return true + } + + return false +} + +// SetValidityEnd gets a reference to the given int64 and assigns it to the ValidityEnd field. +func (o *Certificate) SetValidityEnd(v int64) { + o.ValidityEnd = &v +} + +// GetPublicKey returns the PublicKey field value if set, zero value otherwise. +func (o *Certificate) GetPublicKey() string { + if o == nil || IsNil(o.PublicKey) { + var ret string + return ret + } + return *o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetPublicKeyOk() (*string, bool) { + if o == nil || IsNil(o.PublicKey) { + return nil, false + } + return o.PublicKey, true +} + +// HasPublicKey returns a boolean if a field has been set. +func (o *Certificate) HasPublicKey() bool { + if o != nil && !IsNil(o.PublicKey) { + return true + } + + return false +} + +// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. +func (o *Certificate) SetPublicKey(v string) { + o.PublicKey = &v +} + +// GetPublicKeyBits returns the PublicKeyBits field value if set, zero value otherwise. +func (o *Certificate) GetPublicKeyBits() int32 { + if o == nil || IsNil(o.PublicKeyBits) { + var ret int32 + return ret + } + return *o.PublicKeyBits +} + +// GetPublicKeyBitsOk returns a tuple with the PublicKeyBits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetPublicKeyBitsOk() (*int32, bool) { + if o == nil || IsNil(o.PublicKeyBits) { + return nil, false + } + return o.PublicKeyBits, true +} + +// HasPublicKeyBits returns a boolean if a field has been set. +func (o *Certificate) HasPublicKeyBits() bool { + if o != nil && !IsNil(o.PublicKeyBits) { + return true + } + + return false +} + +// SetPublicKeyBits gets a reference to the given int32 and assigns it to the PublicKeyBits field. +func (o *Certificate) SetPublicKeyBits(v int32) { + o.PublicKeyBits = &v +} + +// GetPublicKeyAlgorithm returns the PublicKeyAlgorithm field value if set, zero value otherwise. +func (o *Certificate) GetPublicKeyAlgorithm() string { + if o == nil || IsNil(o.PublicKeyAlgorithm) { + var ret string + return ret + } + return *o.PublicKeyAlgorithm +} + +// GetPublicKeyAlgorithmOk returns a tuple with the PublicKeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetPublicKeyAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.PublicKeyAlgorithm) { + return nil, false + } + return o.PublicKeyAlgorithm, true +} + +// HasPublicKeyAlgorithm returns a boolean if a field has been set. +func (o *Certificate) HasPublicKeyAlgorithm() bool { + if o != nil && !IsNil(o.PublicKeyAlgorithm) { + return true + } + + return false +} + +// SetPublicKeyAlgorithm gets a reference to the given string and assigns it to the PublicKeyAlgorithm field. +func (o *Certificate) SetPublicKeyAlgorithm(v string) { + o.PublicKeyAlgorithm = &v +} + +// GetSignature returns the Signature field value if set, zero value otherwise. +func (o *Certificate) GetSignature() string { + if o == nil || IsNil(o.Signature) { + var ret string + return ret + } + return *o.Signature +} + +// GetSignatureOk returns a tuple with the Signature field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSignatureOk() (*string, bool) { + if o == nil || IsNil(o.Signature) { + return nil, false + } + return o.Signature, true +} + +// HasSignature returns a boolean if a field has been set. +func (o *Certificate) HasSignature() bool { + if o != nil && !IsNil(o.Signature) { + return true + } + + return false +} + +// SetSignature gets a reference to the given string and assigns it to the Signature field. +func (o *Certificate) SetSignature(v string) { + o.Signature = &v +} + +// GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. +func (o *Certificate) GetSignatureAlgorithm() string { + if o == nil || IsNil(o.SignatureAlgorithm) { + var ret string + return ret + } + return *o.SignatureAlgorithm +} + +// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSignatureAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.SignatureAlgorithm) { + return nil, false + } + return o.SignatureAlgorithm, true +} + +// HasSignatureAlgorithm returns a boolean if a field has been set. +func (o *Certificate) HasSignatureAlgorithm() bool { + if o != nil && !IsNil(o.SignatureAlgorithm) { + return true + } + + return false +} + +// SetSignatureAlgorithm gets a reference to the given string and assigns it to the SignatureAlgorithm field. +func (o *Certificate) SetSignatureAlgorithm(v string) { + o.SignatureAlgorithm = &v +} + +// GetFpBkhash returns the FpBkhash field value if set, zero value otherwise. +func (o *Certificate) GetFpBkhash() string { + if o == nil || IsNil(o.FpBkhash) { + var ret string + return ret + } + return *o.FpBkhash +} + +// GetFpBkhashOk returns a tuple with the FpBkhash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetFpBkhashOk() (*string, bool) { + if o == nil || IsNil(o.FpBkhash) { + return nil, false + } + return o.FpBkhash, true +} + +// HasFpBkhash returns a boolean if a field has been set. +func (o *Certificate) HasFpBkhash() bool { + if o != nil && !IsNil(o.FpBkhash) { + return true + } + + return false +} + +// SetFpBkhash gets a reference to the given string and assigns it to the FpBkhash field. +func (o *Certificate) SetFpBkhash(v string) { + o.FpBkhash = &v +} + +// GetFpSha1 returns the FpSha1 field value if set, zero value otherwise. +func (o *Certificate) GetFpSha1() string { + if o == nil || IsNil(o.FpSha1) { + var ret string + return ret + } + return *o.FpSha1 +} + +// GetFpSha1Ok returns a tuple with the FpSha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetFpSha1Ok() (*string, bool) { + if o == nil || IsNil(o.FpSha1) { + return nil, false + } + return o.FpSha1, true +} + +// HasFpSha1 returns a boolean if a field has been set. +func (o *Certificate) HasFpSha1() bool { + if o != nil && !IsNil(o.FpSha1) { + return true + } + + return false +} + +// SetFpSha1 gets a reference to the given string and assigns it to the FpSha1 field. +func (o *Certificate) SetFpSha1(v string) { + o.FpSha1 = &v +} + +// GetFpSha256 returns the FpSha256 field value if set, zero value otherwise. +func (o *Certificate) GetFpSha256() string { + if o == nil || IsNil(o.FpSha256) { + var ret string + return ret + } + return *o.FpSha256 +} + +// GetFpSha256Ok returns a tuple with the FpSha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetFpSha256Ok() (*string, bool) { + if o == nil || IsNil(o.FpSha256) { + return nil, false + } + return o.FpSha256, true +} + +// HasFpSha256 returns a boolean if a field has been set. +func (o *Certificate) HasFpSha256() bool { + if o != nil && !IsNil(o.FpSha256) { + return true + } + + return false +} + +// SetFpSha256 gets a reference to the given string and assigns it to the FpSha256 field. +func (o *Certificate) SetFpSha256(v string) { + o.FpSha256 = &v +} + +// GetFpMd5 returns the FpMd5 field value if set, zero value otherwise. +func (o *Certificate) GetFpMd5() string { + if o == nil || IsNil(o.FpMd5) { + var ret string + return ret + } + return *o.FpMd5 +} + +// GetFpMd5Ok returns a tuple with the FpMd5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetFpMd5Ok() (*string, bool) { + if o == nil || IsNil(o.FpMd5) { + return nil, false + } + return o.FpMd5, true +} + +// HasFpMd5 returns a boolean if a field has been set. +func (o *Certificate) HasFpMd5() bool { + if o != nil && !IsNil(o.FpMd5) { + return true + } + + return false +} + +// SetFpMd5 gets a reference to the given string and assigns it to the FpMd5 field. +func (o *Certificate) SetFpMd5(v string) { + o.FpMd5 = &v +} + +// GetSubject returns the Subject field value if set, zero value otherwise. +func (o *Certificate) GetSubject() string { + if o == nil || IsNil(o.Subject) { + var ret string + return ret + } + return *o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSubjectOk() (*string, bool) { + if o == nil || IsNil(o.Subject) { + return nil, false + } + return o.Subject, true +} + +// HasSubject returns a boolean if a field has been set. +func (o *Certificate) HasSubject() bool { + if o != nil && !IsNil(o.Subject) { + return true + } + + return false +} + +// SetSubject gets a reference to the given string and assigns it to the Subject field. +func (o *Certificate) SetSubject(v string) { + o.Subject = &v +} + +// GetCn returns the Cn field value if set, zero value otherwise. +func (o *Certificate) GetCn() string { + if o == nil || IsNil(o.Cn) { + var ret string + return ret + } + return *o.Cn +} + +// GetCnOk returns a tuple with the Cn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetCnOk() (*string, bool) { + if o == nil || IsNil(o.Cn) { + return nil, false + } + return o.Cn, true +} + +// HasCn returns a boolean if a field has been set. +func (o *Certificate) HasCn() bool { + if o != nil && !IsNil(o.Cn) { + return true + } + + return false +} + +// SetCn gets a reference to the given string and assigns it to the Cn field. +func (o *Certificate) SetCn(v string) { + o.Cn = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Certificate) GetVersion() int32 { + if o == nil || IsNil(o.Version) { + var ret int32 + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetVersionOk() (*int32, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Certificate) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given int32 and assigns it to the Version field. +func (o *Certificate) SetVersion(v int32) { + o.Version = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise. +func (o *Certificate) GetIssuer() string { + if o == nil || IsNil(o.Issuer) { + var ret string + return ret + } + return *o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetIssuerOk() (*string, bool) { + if o == nil || IsNil(o.Issuer) { + return nil, false + } + return o.Issuer, true +} + +// HasIssuer returns a boolean if a field has been set. +func (o *Certificate) HasIssuer() bool { + if o != nil && !IsNil(o.Issuer) { + return true + } + + return false +} + +// SetIssuer gets a reference to the given string and assigns it to the Issuer field. +func (o *Certificate) SetIssuer(v string) { + o.Issuer = &v +} + +// GetSubjectKeyId returns the SubjectKeyId field value if set, zero value otherwise. +func (o *Certificate) GetSubjectKeyId() string { + if o == nil || IsNil(o.SubjectKeyId) { + var ret string + return ret + } + return *o.SubjectKeyId +} + +// GetSubjectKeyIdOk returns a tuple with the SubjectKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSubjectKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.SubjectKeyId) { + return nil, false + } + return o.SubjectKeyId, true +} + +// HasSubjectKeyId returns a boolean if a field has been set. +func (o *Certificate) HasSubjectKeyId() bool { + if o != nil && !IsNil(o.SubjectKeyId) { + return true + } + + return false +} + +// SetSubjectKeyId gets a reference to the given string and assigns it to the SubjectKeyId field. +func (o *Certificate) SetSubjectKeyId(v string) { + o.SubjectKeyId = &v +} + +// GetAuthorityKeyId returns the AuthorityKeyId field value if set, zero value otherwise. +func (o *Certificate) GetAuthorityKeyId() string { + if o == nil || IsNil(o.AuthorityKeyId) { + var ret string + return ret + } + return *o.AuthorityKeyId +} + +// GetAuthorityKeyIdOk returns a tuple with the AuthorityKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetAuthorityKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.AuthorityKeyId) { + return nil, false + } + return o.AuthorityKeyId, true +} + +// HasAuthorityKeyId returns a boolean if a field has been set. +func (o *Certificate) HasAuthorityKeyId() bool { + if o != nil && !IsNil(o.AuthorityKeyId) { + return true + } + + return false +} + +// SetAuthorityKeyId gets a reference to the given string and assigns it to the AuthorityKeyId field. +func (o *Certificate) SetAuthorityKeyId(v string) { + o.AuthorityKeyId = &v +} + +// GetOcspServer returns the OcspServer field value if set, zero value otherwise. +func (o *Certificate) GetOcspServer() []string { + if o == nil || IsNil(o.OcspServer) { + var ret []string + return ret + } + return o.OcspServer +} + +// GetOcspServerOk returns a tuple with the OcspServer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetOcspServerOk() ([]string, bool) { + if o == nil || IsNil(o.OcspServer) { + return nil, false + } + return o.OcspServer, true +} + +// HasOcspServer returns a boolean if a field has been set. +func (o *Certificate) HasOcspServer() bool { + if o != nil && !IsNil(o.OcspServer) { + return true + } + + return false +} + +// SetOcspServer gets a reference to the given []string and assigns it to the OcspServer field. +func (o *Certificate) SetOcspServer(v []string) { + o.OcspServer = v +} + +// GetCrlDistributionPoints returns the CrlDistributionPoints field value if set, zero value otherwise. +func (o *Certificate) GetCrlDistributionPoints() []string { + if o == nil || IsNil(o.CrlDistributionPoints) { + var ret []string + return ret + } + return o.CrlDistributionPoints +} + +// GetCrlDistributionPointsOk returns a tuple with the CrlDistributionPoints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetCrlDistributionPointsOk() ([]string, bool) { + if o == nil || IsNil(o.CrlDistributionPoints) { + return nil, false + } + return o.CrlDistributionPoints, true +} + +// HasCrlDistributionPoints returns a boolean if a field has been set. +func (o *Certificate) HasCrlDistributionPoints() bool { + if o != nil && !IsNil(o.CrlDistributionPoints) { + return true + } + + return false +} + +// SetCrlDistributionPoints gets a reference to the given []string and assigns it to the CrlDistributionPoints field. +func (o *Certificate) SetCrlDistributionPoints(v []string) { + o.CrlDistributionPoints = v +} + +// GetIssuingCertificateUrl returns the IssuingCertificateUrl field value if set, zero value otherwise. +func (o *Certificate) GetIssuingCertificateUrl() []string { + if o == nil || IsNil(o.IssuingCertificateUrl) { + var ret []string + return ret + } + return o.IssuingCertificateUrl +} + +// GetIssuingCertificateUrlOk returns a tuple with the IssuingCertificateUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetIssuingCertificateUrlOk() ([]string, bool) { + if o == nil || IsNil(o.IssuingCertificateUrl) { + return nil, false + } + return o.IssuingCertificateUrl, true +} + +// HasIssuingCertificateUrl returns a boolean if a field has been set. +func (o *Certificate) HasIssuingCertificateUrl() bool { + if o != nil && !IsNil(o.IssuingCertificateUrl) { + return true + } + + return false +} + +// SetIssuingCertificateUrl gets a reference to the given []string and assigns it to the IssuingCertificateUrl field. +func (o *Certificate) SetIssuingCertificateUrl(v []string) { + o.IssuingCertificateUrl = v +} + +// GetIsCa returns the IsCa field value if set, zero value otherwise. +func (o *Certificate) GetIsCa() bool { + if o == nil || IsNil(o.IsCa) { + var ret bool + return ret + } + return *o.IsCa +} + +// GetIsCaOk returns a tuple with the IsCa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetIsCaOk() (*bool, bool) { + if o == nil || IsNil(o.IsCa) { + return nil, false + } + return o.IsCa, true +} + +// HasIsCa returns a boolean if a field has been set. +func (o *Certificate) HasIsCa() bool { + if o != nil && !IsNil(o.IsCa) { + return true + } + + return false +} + +// SetIsCa gets a reference to the given bool and assigns it to the IsCa field. +func (o *Certificate) SetIsCa(v bool) { + o.IsCa = &v +} + +// GetKeyUsage returns the KeyUsage field value if set, zero value otherwise. +func (o *Certificate) GetKeyUsage() []string { + if o == nil || IsNil(o.KeyUsage) { + var ret []string + return ret + } + return o.KeyUsage +} + +// GetKeyUsageOk returns a tuple with the KeyUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetKeyUsageOk() ([]string, bool) { + if o == nil || IsNil(o.KeyUsage) { + return nil, false + } + return o.KeyUsage, true +} + +// HasKeyUsage returns a boolean if a field has been set. +func (o *Certificate) HasKeyUsage() bool { + if o != nil && !IsNil(o.KeyUsage) { + return true + } + + return false +} + +// SetKeyUsage gets a reference to the given []string and assigns it to the KeyUsage field. +func (o *Certificate) SetKeyUsage(v []string) { + o.KeyUsage = v +} + +// GetExtKeyUsage returns the ExtKeyUsage field value if set, zero value otherwise. +func (o *Certificate) GetExtKeyUsage() []string { + if o == nil || IsNil(o.ExtKeyUsage) { + var ret []string + return ret + } + return o.ExtKeyUsage +} + +// GetExtKeyUsageOk returns a tuple with the ExtKeyUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetExtKeyUsageOk() ([]string, bool) { + if o == nil || IsNil(o.ExtKeyUsage) { + return nil, false + } + return o.ExtKeyUsage, true +} + +// HasExtKeyUsage returns a boolean if a field has been set. +func (o *Certificate) HasExtKeyUsage() bool { + if o != nil && !IsNil(o.ExtKeyUsage) { + return true + } + + return false +} + +// SetExtKeyUsage gets a reference to the given []string and assigns it to the ExtKeyUsage field. +func (o *Certificate) SetExtKeyUsage(v []string) { + o.ExtKeyUsage = v +} + +// GetSanDnsNames returns the SanDnsNames field value if set, zero value otherwise. +func (o *Certificate) GetSanDnsNames() []string { + if o == nil || IsNil(o.SanDnsNames) { + var ret []string + return ret + } + return o.SanDnsNames +} + +// GetSanDnsNamesOk returns a tuple with the SanDnsNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSanDnsNamesOk() ([]string, bool) { + if o == nil || IsNil(o.SanDnsNames) { + return nil, false + } + return o.SanDnsNames, true +} + +// HasSanDnsNames returns a boolean if a field has been set. +func (o *Certificate) HasSanDnsNames() bool { + if o != nil && !IsNil(o.SanDnsNames) { + return true + } + + return false +} + +// SetSanDnsNames gets a reference to the given []string and assigns it to the SanDnsNames field. +func (o *Certificate) SetSanDnsNames(v []string) { + o.SanDnsNames = v +} + +// GetSanIpAddresses returns the SanIpAddresses field value if set, zero value otherwise. +func (o *Certificate) GetSanIpAddresses() []*string { + if o == nil || IsNil(o.SanIpAddresses) { + var ret []*string + return ret + } + return o.SanIpAddresses +} + +// GetSanIpAddressesOk returns a tuple with the SanIpAddresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSanIpAddressesOk() ([]*string, bool) { + if o == nil || IsNil(o.SanIpAddresses) { + return nil, false + } + return o.SanIpAddresses, true +} + +// HasSanIpAddresses returns a boolean if a field has been set. +func (o *Certificate) HasSanIpAddresses() bool { + if o != nil && !IsNil(o.SanIpAddresses) { + return true + } + + return false +} + +// SetSanIpAddresses gets a reference to the given []*string and assigns it to the SanIpAddresses field. +func (o *Certificate) SetSanIpAddresses(v []*string) { + o.SanIpAddresses = v +} + +// GetSanEmailAddresses returns the SanEmailAddresses field value if set, zero value otherwise. +func (o *Certificate) GetSanEmailAddresses() []string { + if o == nil || IsNil(o.SanEmailAddresses) { + var ret []string + return ret + } + return o.SanEmailAddresses +} + +// GetSanEmailAddressesOk returns a tuple with the SanEmailAddresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSanEmailAddressesOk() ([]string, bool) { + if o == nil || IsNil(o.SanEmailAddresses) { + return nil, false + } + return o.SanEmailAddresses, true +} + +// HasSanEmailAddresses returns a boolean if a field has been set. +func (o *Certificate) HasSanEmailAddresses() bool { + if o != nil && !IsNil(o.SanEmailAddresses) { + return true + } + + return false +} + +// SetSanEmailAddresses gets a reference to the given []string and assigns it to the SanEmailAddresses field. +func (o *Certificate) SetSanEmailAddresses(v []string) { + o.SanEmailAddresses = v +} + +// GetSanUris returns the SanUris field value if set, zero value otherwise. +func (o *Certificate) GetSanUris() []string { + if o == nil || IsNil(o.SanUris) { + var ret []string + return ret + } + return o.SanUris +} + +// GetSanUrisOk returns a tuple with the SanUris field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetSanUrisOk() ([]string, bool) { + if o == nil || IsNil(o.SanUris) { + return nil, false + } + return o.SanUris, true +} + +// HasSanUris returns a boolean if a field has been set. +func (o *Certificate) HasSanUris() bool { + if o != nil && !IsNil(o.SanUris) { + return true + } + + return false +} + +// SetSanUris gets a reference to the given []string and assigns it to the SanUris field. +func (o *Certificate) SetSanUris(v []string) { + o.SanUris = v +} + +// GetPublicKeyParameters returns the PublicKeyParameters field value if set, zero value otherwise. +func (o *Certificate) GetPublicKeyParameters() map[string]interface{} { + if o == nil || IsNil(o.PublicKeyParameters) { + var ret map[string]interface{} + return ret + } + return o.PublicKeyParameters +} + +// GetPublicKeyParametersOk returns a tuple with the PublicKeyParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetPublicKeyParametersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.PublicKeyParameters) { + return map[string]interface{}{}, false + } + return o.PublicKeyParameters, true +} + +// HasPublicKeyParameters returns a boolean if a field has been set. +func (o *Certificate) HasPublicKeyParameters() bool { + if o != nil && !IsNil(o.PublicKeyParameters) { + return true + } + + return false +} + +// SetPublicKeyParameters gets a reference to the given map[string]interface{} and assigns it to the PublicKeyParameters field. +func (o *Certificate) SetPublicKeyParameters(v map[string]interface{}) { + o.PublicKeyParameters = v +} + +func (o Certificate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Certificate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + toSerialize["organization_id"] = o.OrganizationId + if !IsNil(o.Names) { + toSerialize["names"] = o.Names + } + if !IsNil(o.SelfSigned) { + toSerialize["self_signed"] = o.SelfSigned + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.Serial) { + toSerialize["serial"] = o.Serial + } + if !IsNil(o.ValidityStart) { + toSerialize["validity_start"] = o.ValidityStart + } + if !IsNil(o.ValidityEnd) { + toSerialize["validity_end"] = o.ValidityEnd + } + if !IsNil(o.PublicKey) { + toSerialize["public_key"] = o.PublicKey + } + if !IsNil(o.PublicKeyBits) { + toSerialize["public_key_bits"] = o.PublicKeyBits + } + if !IsNil(o.PublicKeyAlgorithm) { + toSerialize["public_key_algorithm"] = o.PublicKeyAlgorithm + } + if !IsNil(o.Signature) { + toSerialize["signature"] = o.Signature + } + if !IsNil(o.SignatureAlgorithm) { + toSerialize["signature_algorithm"] = o.SignatureAlgorithm + } + if !IsNil(o.FpBkhash) { + toSerialize["fp_bkhash"] = o.FpBkhash + } + if !IsNil(o.FpSha1) { + toSerialize["fp_sha1"] = o.FpSha1 + } + if !IsNil(o.FpSha256) { + toSerialize["fp_sha256"] = o.FpSha256 + } + if !IsNil(o.FpMd5) { + toSerialize["fp_md5"] = o.FpMd5 + } + if !IsNil(o.Subject) { + toSerialize["subject"] = o.Subject + } + if !IsNil(o.Cn) { + toSerialize["cn"] = o.Cn + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Issuer) { + toSerialize["issuer"] = o.Issuer + } + if !IsNil(o.SubjectKeyId) { + toSerialize["subject_key_id"] = o.SubjectKeyId + } + if !IsNil(o.AuthorityKeyId) { + toSerialize["authority_key_id"] = o.AuthorityKeyId + } + if !IsNil(o.OcspServer) { + toSerialize["ocsp_server"] = o.OcspServer + } + if !IsNil(o.CrlDistributionPoints) { + toSerialize["crl_distribution_points"] = o.CrlDistributionPoints + } + if !IsNil(o.IssuingCertificateUrl) { + toSerialize["issuing_certificate_url"] = o.IssuingCertificateUrl + } + if !IsNil(o.IsCa) { + toSerialize["is_ca"] = o.IsCa + } + if !IsNil(o.KeyUsage) { + toSerialize["key_usage"] = o.KeyUsage + } + if !IsNil(o.ExtKeyUsage) { + toSerialize["ext_key_usage"] = o.ExtKeyUsage + } + if !IsNil(o.SanDnsNames) { + toSerialize["san_dns_names"] = o.SanDnsNames + } + if !IsNil(o.SanIpAddresses) { + toSerialize["san_ip_addresses"] = o.SanIpAddresses + } + if !IsNil(o.SanEmailAddresses) { + toSerialize["san_email_addresses"] = o.SanEmailAddresses + } + if !IsNil(o.SanUris) { + toSerialize["san_uris"] = o.SanUris + } + if !IsNil(o.PublicKeyParameters) { + toSerialize["public_key_parameters"] = o.PublicKeyParameters + } + return toSerialize, nil +} + +func (o *Certificate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "organization_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificate := _Certificate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificate) + + if err != nil { + return err + } + + *o = Certificate(varCertificate) + + return err +} + +type NullableCertificate struct { + value *Certificate + isSet bool +} + +func (v NullableCertificate) Get() *Certificate { + return v.value +} + +func (v *NullableCertificate) Set(val *Certificate) { + v.value = val + v.isSet = true +} + +func (v NullableCertificate) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificate(val *Certificate) *NullableCertificate { + return &NullableCertificate{value: val, isSet: true} +} + +func (v NullableCertificate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_component_version.go b/go/model_component_version.go index 128ec63..24255eb 100644 --- a/go/model_component_version.go +++ b/go/model_component_version.go @@ -1,25 +1,33 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the ComponentVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComponentVersion{} + // ComponentVersion A component ID and version type ComponentVersion struct { - Id string `json:"id"` + Id string `json:"id"` Version string `json:"version"` } +type _ComponentVersion ComponentVersion + // NewComponentVersion instantiates a new ComponentVersion object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -88,14 +96,56 @@ func (o *ComponentVersion) SetVersion(v string) { } func (o ComponentVersion) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComponentVersion) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize["id"] = o.Id + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *ComponentVersion) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "version", } - if true { - toSerialize["version"] = o.Version + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; } - return json.Marshal(toSerialize) + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varComponentVersion := _ComponentVersion{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varComponentVersion) + + if err != nil { + return err + } + + *o = ComponentVersion(varComponentVersion) + + return err } type NullableComponentVersion struct { @@ -133,3 +183,5 @@ func (v *NullableComponentVersion) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_credential.go b/go/model_credential.go new file mode 100644 index 0000000..53b03ba --- /dev/null +++ b/go/model_credential.go @@ -0,0 +1,556 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Credential type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credential{} + +// Credential struct for Credential +type Credential struct { + Id string `json:"id"` + ClientId *string `json:"client_id,omitempty"` + Name *string `json:"name,omitempty"` + // The service the credentials are for. + Type *string `json:"type,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CreatedById *string `json:"created_by_id,omitempty"` + CreatedByEmail *string `json:"created_by_email,omitempty"` + Acl map[string]interface{} `json:"acl,omitempty"` + Global *bool `json:"global,omitempty"` + Cidrs []string `json:"cidrs,omitempty"` + LastUsedAt *int64 `json:"last_used_at,omitempty"` + LastUsedById *string `json:"last_used_by_id,omitempty"` +} + +type _Credential Credential + +// NewCredential instantiates a new Credential object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredential(id string) *Credential { + this := Credential{} + this.Id = id + return &this +} + +// NewCredentialWithDefaults instantiates a new Credential object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialWithDefaults() *Credential { + this := Credential{} + return &this +} + +// GetId returns the Id field value +func (o *Credential) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Credential) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Credential) SetId(v string) { + o.Id = v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *Credential) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *Credential) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *Credential) SetClientId(v string) { + o.ClientId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Credential) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Credential) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Credential) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Credential) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Credential) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Credential) SetType(v string) { + o.Type = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Credential) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Credential) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Credential) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetCreatedById returns the CreatedById field value if set, zero value otherwise. +func (o *Credential) GetCreatedById() string { + if o == nil || IsNil(o.CreatedById) { + var ret string + return ret + } + return *o.CreatedById +} + +// GetCreatedByIdOk returns a tuple with the CreatedById field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetCreatedByIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedById) { + return nil, false + } + return o.CreatedById, true +} + +// HasCreatedById returns a boolean if a field has been set. +func (o *Credential) HasCreatedById() bool { + if o != nil && !IsNil(o.CreatedById) { + return true + } + + return false +} + +// SetCreatedById gets a reference to the given string and assigns it to the CreatedById field. +func (o *Credential) SetCreatedById(v string) { + o.CreatedById = &v +} + +// GetCreatedByEmail returns the CreatedByEmail field value if set, zero value otherwise. +func (o *Credential) GetCreatedByEmail() string { + if o == nil || IsNil(o.CreatedByEmail) { + var ret string + return ret + } + return *o.CreatedByEmail +} + +// GetCreatedByEmailOk returns a tuple with the CreatedByEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetCreatedByEmailOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByEmail) { + return nil, false + } + return o.CreatedByEmail, true +} + +// HasCreatedByEmail returns a boolean if a field has been set. +func (o *Credential) HasCreatedByEmail() bool { + if o != nil && !IsNil(o.CreatedByEmail) { + return true + } + + return false +} + +// SetCreatedByEmail gets a reference to the given string and assigns it to the CreatedByEmail field. +func (o *Credential) SetCreatedByEmail(v string) { + o.CreatedByEmail = &v +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Credential) GetAcl() map[string]interface{} { + if o == nil || IsNil(o.Acl) { + var ret map[string]interface{} + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetAclOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Acl) { + return map[string]interface{}{}, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Credential) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given map[string]interface{} and assigns it to the Acl field. +func (o *Credential) SetAcl(v map[string]interface{}) { + o.Acl = v +} + +// GetGlobal returns the Global field value if set, zero value otherwise. +func (o *Credential) GetGlobal() bool { + if o == nil || IsNil(o.Global) { + var ret bool + return ret + } + return *o.Global +} + +// GetGlobalOk returns a tuple with the Global field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetGlobalOk() (*bool, bool) { + if o == nil || IsNil(o.Global) { + return nil, false + } + return o.Global, true +} + +// HasGlobal returns a boolean if a field has been set. +func (o *Credential) HasGlobal() bool { + if o != nil && !IsNil(o.Global) { + return true + } + + return false +} + +// SetGlobal gets a reference to the given bool and assigns it to the Global field. +func (o *Credential) SetGlobal(v bool) { + o.Global = &v +} + +// GetCidrs returns the Cidrs field value if set, zero value otherwise. +func (o *Credential) GetCidrs() []string { + if o == nil || IsNil(o.Cidrs) { + var ret []string + return ret + } + return o.Cidrs +} + +// GetCidrsOk returns a tuple with the Cidrs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetCidrsOk() ([]string, bool) { + if o == nil || IsNil(o.Cidrs) { + return nil, false + } + return o.Cidrs, true +} + +// HasCidrs returns a boolean if a field has been set. +func (o *Credential) HasCidrs() bool { + if o != nil && !IsNil(o.Cidrs) { + return true + } + + return false +} + +// SetCidrs gets a reference to the given []string and assigns it to the Cidrs field. +func (o *Credential) SetCidrs(v []string) { + o.Cidrs = v +} + +// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise. +func (o *Credential) GetLastUsedAt() int64 { + if o == nil || IsNil(o.LastUsedAt) { + var ret int64 + return ret + } + return *o.LastUsedAt +} + +// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetLastUsedAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastUsedAt) { + return nil, false + } + return o.LastUsedAt, true +} + +// HasLastUsedAt returns a boolean if a field has been set. +func (o *Credential) HasLastUsedAt() bool { + if o != nil && !IsNil(o.LastUsedAt) { + return true + } + + return false +} + +// SetLastUsedAt gets a reference to the given int64 and assigns it to the LastUsedAt field. +func (o *Credential) SetLastUsedAt(v int64) { + o.LastUsedAt = &v +} + +// GetLastUsedById returns the LastUsedById field value if set, zero value otherwise. +func (o *Credential) GetLastUsedById() string { + if o == nil || IsNil(o.LastUsedById) { + var ret string + return ret + } + return *o.LastUsedById +} + +// GetLastUsedByIdOk returns a tuple with the LastUsedById field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetLastUsedByIdOk() (*string, bool) { + if o == nil || IsNil(o.LastUsedById) { + return nil, false + } + return o.LastUsedById, true +} + +// HasLastUsedById returns a boolean if a field has been set. +func (o *Credential) HasLastUsedById() bool { + if o != nil && !IsNil(o.LastUsedById) { + return true + } + + return false +} + +// SetLastUsedById gets a reference to the given string and assigns it to the LastUsedById field. +func (o *Credential) SetLastUsedById(v string) { + o.LastUsedById = &v +} + +func (o Credential) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Credential) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatedById) { + toSerialize["created_by_id"] = o.CreatedById + } + if !IsNil(o.CreatedByEmail) { + toSerialize["created_by_email"] = o.CreatedByEmail + } + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.Global) { + toSerialize["global"] = o.Global + } + if !IsNil(o.Cidrs) { + toSerialize["cidrs"] = o.Cidrs + } + if !IsNil(o.LastUsedAt) { + toSerialize["last_used_at"] = o.LastUsedAt + } + if !IsNil(o.LastUsedById) { + toSerialize["last_used_by_id"] = o.LastUsedById + } + return toSerialize, nil +} + +func (o *Credential) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCredential := _Credential{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCredential) + + if err != nil { + return err + } + + *o = Credential(varCredential) + + return err +} + +type NullableCredential struct { + value *Credential + isSet bool +} + +func (v NullableCredential) Get() *Credential { + return v.value +} + +func (v *NullableCredential) Set(val *Credential) { + v.value = val + v.isSet = true +} + +func (v NullableCredential) IsSet() bool { + return v.isSet +} + +func (v *NullableCredential) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredential(val *Credential) *NullableCredential { + return &NullableCredential{value: val, isSet: true} +} + +func (v NullableCredential) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredential) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_credential_fields.go b/go/model_credential_fields.go new file mode 100644 index 0000000..72e0709 --- /dev/null +++ b/go/model_credential_fields.go @@ -0,0 +1,1122 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// CredentialFields - struct for CredentialFields +type CredentialFields struct { + AWSCredentialFields *AWSCredentialFields + AzureClientSecretCredentialFields *AzureClientSecretCredentialFields + AzureUsernamePasswordCredentialFields *AzureUsernamePasswordCredentialFields + CensysCredentialFields *CensysCredentialFields + CrowdstrikeCredentialFields *CrowdstrikeCredentialFields + CustomIntegrationScriptCredentialFields *CustomIntegrationScriptCredentialFields + GCPCredentialFields *GCPCredentialFields + GoogleWorkspaceCredentialFields *GoogleWorkspaceCredentialFields + InsightVMCredentialFields *InsightVMCredentialFields + LDAPCredentialFields *LDAPCredentialFields + MECMCredentialFields *MECMCredentialFields + MiradoreCredentialFields *MiradoreCredentialFields + MirakiCredentialFields *MirakiCredentialFields + NessusCredentialFields *NessusCredentialFields + NetboxCredentialFields *NetboxCredentialFields + PaloAltoFirewallCredentialFields *PaloAltoFirewallCredentialFields + QualysCredentialFields *QualysCredentialFields + SNMPv2CommunitiesCredentialFields *SNMPv2CommunitiesCredentialFields + SNMPv3CredentialFields *SNMPv3CredentialFields + SentinelOneCredentialFields *SentinelOneCredentialFields + ShodanCredentialFields *ShodanCredentialFields + TaniumCredentialFields *TaniumCredentialFields + TenableIoCredentialFields *TenableIoCredentialFields + TenableScCredentialFields *TenableScCredentialFields + VMwareCredentialFields *VMwareCredentialFields + WizCredentialFields *WizCredentialFields + X509CredentialFields *X509CredentialFields +} + +// AWSCredentialFieldsAsCredentialFields is a convenience function that returns AWSCredentialFields wrapped in CredentialFields +func AWSCredentialFieldsAsCredentialFields(v *AWSCredentialFields) CredentialFields { + return CredentialFields{ + AWSCredentialFields: v, + } +} + +// AzureClientSecretCredentialFieldsAsCredentialFields is a convenience function that returns AzureClientSecretCredentialFields wrapped in CredentialFields +func AzureClientSecretCredentialFieldsAsCredentialFields(v *AzureClientSecretCredentialFields) CredentialFields { + return CredentialFields{ + AzureClientSecretCredentialFields: v, + } +} + +// AzureUsernamePasswordCredentialFieldsAsCredentialFields is a convenience function that returns AzureUsernamePasswordCredentialFields wrapped in CredentialFields +func AzureUsernamePasswordCredentialFieldsAsCredentialFields(v *AzureUsernamePasswordCredentialFields) CredentialFields { + return CredentialFields{ + AzureUsernamePasswordCredentialFields: v, + } +} + +// CensysCredentialFieldsAsCredentialFields is a convenience function that returns CensysCredentialFields wrapped in CredentialFields +func CensysCredentialFieldsAsCredentialFields(v *CensysCredentialFields) CredentialFields { + return CredentialFields{ + CensysCredentialFields: v, + } +} + +// CrowdstrikeCredentialFieldsAsCredentialFields is a convenience function that returns CrowdstrikeCredentialFields wrapped in CredentialFields +func CrowdstrikeCredentialFieldsAsCredentialFields(v *CrowdstrikeCredentialFields) CredentialFields { + return CredentialFields{ + CrowdstrikeCredentialFields: v, + } +} + +// CustomIntegrationScriptCredentialFieldsAsCredentialFields is a convenience function that returns CustomIntegrationScriptCredentialFields wrapped in CredentialFields +func CustomIntegrationScriptCredentialFieldsAsCredentialFields(v *CustomIntegrationScriptCredentialFields) CredentialFields { + return CredentialFields{ + CustomIntegrationScriptCredentialFields: v, + } +} + +// GCPCredentialFieldsAsCredentialFields is a convenience function that returns GCPCredentialFields wrapped in CredentialFields +func GCPCredentialFieldsAsCredentialFields(v *GCPCredentialFields) CredentialFields { + return CredentialFields{ + GCPCredentialFields: v, + } +} + +// GoogleWorkspaceCredentialFieldsAsCredentialFields is a convenience function that returns GoogleWorkspaceCredentialFields wrapped in CredentialFields +func GoogleWorkspaceCredentialFieldsAsCredentialFields(v *GoogleWorkspaceCredentialFields) CredentialFields { + return CredentialFields{ + GoogleWorkspaceCredentialFields: v, + } +} + +// InsightVMCredentialFieldsAsCredentialFields is a convenience function that returns InsightVMCredentialFields wrapped in CredentialFields +func InsightVMCredentialFieldsAsCredentialFields(v *InsightVMCredentialFields) CredentialFields { + return CredentialFields{ + InsightVMCredentialFields: v, + } +} + +// LDAPCredentialFieldsAsCredentialFields is a convenience function that returns LDAPCredentialFields wrapped in CredentialFields +func LDAPCredentialFieldsAsCredentialFields(v *LDAPCredentialFields) CredentialFields { + return CredentialFields{ + LDAPCredentialFields: v, + } +} + +// MECMCredentialFieldsAsCredentialFields is a convenience function that returns MECMCredentialFields wrapped in CredentialFields +func MECMCredentialFieldsAsCredentialFields(v *MECMCredentialFields) CredentialFields { + return CredentialFields{ + MECMCredentialFields: v, + } +} + +// MiradoreCredentialFieldsAsCredentialFields is a convenience function that returns MiradoreCredentialFields wrapped in CredentialFields +func MiradoreCredentialFieldsAsCredentialFields(v *MiradoreCredentialFields) CredentialFields { + return CredentialFields{ + MiradoreCredentialFields: v, + } +} + +// MirakiCredentialFieldsAsCredentialFields is a convenience function that returns MirakiCredentialFields wrapped in CredentialFields +func MirakiCredentialFieldsAsCredentialFields(v *MirakiCredentialFields) CredentialFields { + return CredentialFields{ + MirakiCredentialFields: v, + } +} + +// NessusCredentialFieldsAsCredentialFields is a convenience function that returns NessusCredentialFields wrapped in CredentialFields +func NessusCredentialFieldsAsCredentialFields(v *NessusCredentialFields) CredentialFields { + return CredentialFields{ + NessusCredentialFields: v, + } +} + +// NetboxCredentialFieldsAsCredentialFields is a convenience function that returns NetboxCredentialFields wrapped in CredentialFields +func NetboxCredentialFieldsAsCredentialFields(v *NetboxCredentialFields) CredentialFields { + return CredentialFields{ + NetboxCredentialFields: v, + } +} + +// PaloAltoFirewallCredentialFieldsAsCredentialFields is a convenience function that returns PaloAltoFirewallCredentialFields wrapped in CredentialFields +func PaloAltoFirewallCredentialFieldsAsCredentialFields(v *PaloAltoFirewallCredentialFields) CredentialFields { + return CredentialFields{ + PaloAltoFirewallCredentialFields: v, + } +} + +// QualysCredentialFieldsAsCredentialFields is a convenience function that returns QualysCredentialFields wrapped in CredentialFields +func QualysCredentialFieldsAsCredentialFields(v *QualysCredentialFields) CredentialFields { + return CredentialFields{ + QualysCredentialFields: v, + } +} + +// SNMPv2CommunitiesCredentialFieldsAsCredentialFields is a convenience function that returns SNMPv2CommunitiesCredentialFields wrapped in CredentialFields +func SNMPv2CommunitiesCredentialFieldsAsCredentialFields(v *SNMPv2CommunitiesCredentialFields) CredentialFields { + return CredentialFields{ + SNMPv2CommunitiesCredentialFields: v, + } +} + +// SNMPv3CredentialFieldsAsCredentialFields is a convenience function that returns SNMPv3CredentialFields wrapped in CredentialFields +func SNMPv3CredentialFieldsAsCredentialFields(v *SNMPv3CredentialFields) CredentialFields { + return CredentialFields{ + SNMPv3CredentialFields: v, + } +} + +// SentinelOneCredentialFieldsAsCredentialFields is a convenience function that returns SentinelOneCredentialFields wrapped in CredentialFields +func SentinelOneCredentialFieldsAsCredentialFields(v *SentinelOneCredentialFields) CredentialFields { + return CredentialFields{ + SentinelOneCredentialFields: v, + } +} + +// ShodanCredentialFieldsAsCredentialFields is a convenience function that returns ShodanCredentialFields wrapped in CredentialFields +func ShodanCredentialFieldsAsCredentialFields(v *ShodanCredentialFields) CredentialFields { + return CredentialFields{ + ShodanCredentialFields: v, + } +} + +// TaniumCredentialFieldsAsCredentialFields is a convenience function that returns TaniumCredentialFields wrapped in CredentialFields +func TaniumCredentialFieldsAsCredentialFields(v *TaniumCredentialFields) CredentialFields { + return CredentialFields{ + TaniumCredentialFields: v, + } +} + +// TenableIoCredentialFieldsAsCredentialFields is a convenience function that returns TenableIoCredentialFields wrapped in CredentialFields +func TenableIoCredentialFieldsAsCredentialFields(v *TenableIoCredentialFields) CredentialFields { + return CredentialFields{ + TenableIoCredentialFields: v, + } +} + +// TenableScCredentialFieldsAsCredentialFields is a convenience function that returns TenableScCredentialFields wrapped in CredentialFields +func TenableScCredentialFieldsAsCredentialFields(v *TenableScCredentialFields) CredentialFields { + return CredentialFields{ + TenableScCredentialFields: v, + } +} + +// VMwareCredentialFieldsAsCredentialFields is a convenience function that returns VMwareCredentialFields wrapped in CredentialFields +func VMwareCredentialFieldsAsCredentialFields(v *VMwareCredentialFields) CredentialFields { + return CredentialFields{ + VMwareCredentialFields: v, + } +} + +// WizCredentialFieldsAsCredentialFields is a convenience function that returns WizCredentialFields wrapped in CredentialFields +func WizCredentialFieldsAsCredentialFields(v *WizCredentialFields) CredentialFields { + return CredentialFields{ + WizCredentialFields: v, + } +} + +// X509CredentialFieldsAsCredentialFields is a convenience function that returns X509CredentialFields wrapped in CredentialFields +func X509CredentialFieldsAsCredentialFields(v *X509CredentialFields) CredentialFields { + return CredentialFields{ + X509CredentialFields: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CredentialFields) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AWSCredentialFields + err = newStrictDecoder(data).Decode(&dst.AWSCredentialFields) + if err == nil { + jsonAWSCredentialFields, _ := json.Marshal(dst.AWSCredentialFields) + if string(jsonAWSCredentialFields) == "{}" { // empty struct + dst.AWSCredentialFields = nil + } else { + if err = validator.Validate(dst.AWSCredentialFields); err != nil { + dst.AWSCredentialFields = nil + } else { + match++ + } + } + } else { + dst.AWSCredentialFields = nil + } + + // try to unmarshal data into AzureClientSecretCredentialFields + err = newStrictDecoder(data).Decode(&dst.AzureClientSecretCredentialFields) + if err == nil { + jsonAzureClientSecretCredentialFields, _ := json.Marshal(dst.AzureClientSecretCredentialFields) + if string(jsonAzureClientSecretCredentialFields) == "{}" { // empty struct + dst.AzureClientSecretCredentialFields = nil + } else { + if err = validator.Validate(dst.AzureClientSecretCredentialFields); err != nil { + dst.AzureClientSecretCredentialFields = nil + } else { + match++ + } + } + } else { + dst.AzureClientSecretCredentialFields = nil + } + + // try to unmarshal data into AzureUsernamePasswordCredentialFields + err = newStrictDecoder(data).Decode(&dst.AzureUsernamePasswordCredentialFields) + if err == nil { + jsonAzureUsernamePasswordCredentialFields, _ := json.Marshal(dst.AzureUsernamePasswordCredentialFields) + if string(jsonAzureUsernamePasswordCredentialFields) == "{}" { // empty struct + dst.AzureUsernamePasswordCredentialFields = nil + } else { + if err = validator.Validate(dst.AzureUsernamePasswordCredentialFields); err != nil { + dst.AzureUsernamePasswordCredentialFields = nil + } else { + match++ + } + } + } else { + dst.AzureUsernamePasswordCredentialFields = nil + } + + // try to unmarshal data into CensysCredentialFields + err = newStrictDecoder(data).Decode(&dst.CensysCredentialFields) + if err == nil { + jsonCensysCredentialFields, _ := json.Marshal(dst.CensysCredentialFields) + if string(jsonCensysCredentialFields) == "{}" { // empty struct + dst.CensysCredentialFields = nil + } else { + if err = validator.Validate(dst.CensysCredentialFields); err != nil { + dst.CensysCredentialFields = nil + } else { + match++ + } + } + } else { + dst.CensysCredentialFields = nil + } + + // try to unmarshal data into CrowdstrikeCredentialFields + err = newStrictDecoder(data).Decode(&dst.CrowdstrikeCredentialFields) + if err == nil { + jsonCrowdstrikeCredentialFields, _ := json.Marshal(dst.CrowdstrikeCredentialFields) + if string(jsonCrowdstrikeCredentialFields) == "{}" { // empty struct + dst.CrowdstrikeCredentialFields = nil + } else { + if err = validator.Validate(dst.CrowdstrikeCredentialFields); err != nil { + dst.CrowdstrikeCredentialFields = nil + } else { + match++ + } + } + } else { + dst.CrowdstrikeCredentialFields = nil + } + + // try to unmarshal data into CustomIntegrationScriptCredentialFields + err = newStrictDecoder(data).Decode(&dst.CustomIntegrationScriptCredentialFields) + if err == nil { + jsonCustomIntegrationScriptCredentialFields, _ := json.Marshal(dst.CustomIntegrationScriptCredentialFields) + if string(jsonCustomIntegrationScriptCredentialFields) == "{}" { // empty struct + dst.CustomIntegrationScriptCredentialFields = nil + } else { + if err = validator.Validate(dst.CustomIntegrationScriptCredentialFields); err != nil { + dst.CustomIntegrationScriptCredentialFields = nil + } else { + match++ + } + } + } else { + dst.CustomIntegrationScriptCredentialFields = nil + } + + // try to unmarshal data into GCPCredentialFields + err = newStrictDecoder(data).Decode(&dst.GCPCredentialFields) + if err == nil { + jsonGCPCredentialFields, _ := json.Marshal(dst.GCPCredentialFields) + if string(jsonGCPCredentialFields) == "{}" { // empty struct + dst.GCPCredentialFields = nil + } else { + if err = validator.Validate(dst.GCPCredentialFields); err != nil { + dst.GCPCredentialFields = nil + } else { + match++ + } + } + } else { + dst.GCPCredentialFields = nil + } + + // try to unmarshal data into GoogleWorkspaceCredentialFields + err = newStrictDecoder(data).Decode(&dst.GoogleWorkspaceCredentialFields) + if err == nil { + jsonGoogleWorkspaceCredentialFields, _ := json.Marshal(dst.GoogleWorkspaceCredentialFields) + if string(jsonGoogleWorkspaceCredentialFields) == "{}" { // empty struct + dst.GoogleWorkspaceCredentialFields = nil + } else { + if err = validator.Validate(dst.GoogleWorkspaceCredentialFields); err != nil { + dst.GoogleWorkspaceCredentialFields = nil + } else { + match++ + } + } + } else { + dst.GoogleWorkspaceCredentialFields = nil + } + + // try to unmarshal data into InsightVMCredentialFields + err = newStrictDecoder(data).Decode(&dst.InsightVMCredentialFields) + if err == nil { + jsonInsightVMCredentialFields, _ := json.Marshal(dst.InsightVMCredentialFields) + if string(jsonInsightVMCredentialFields) == "{}" { // empty struct + dst.InsightVMCredentialFields = nil + } else { + if err = validator.Validate(dst.InsightVMCredentialFields); err != nil { + dst.InsightVMCredentialFields = nil + } else { + match++ + } + } + } else { + dst.InsightVMCredentialFields = nil + } + + // try to unmarshal data into LDAPCredentialFields + err = newStrictDecoder(data).Decode(&dst.LDAPCredentialFields) + if err == nil { + jsonLDAPCredentialFields, _ := json.Marshal(dst.LDAPCredentialFields) + if string(jsonLDAPCredentialFields) == "{}" { // empty struct + dst.LDAPCredentialFields = nil + } else { + if err = validator.Validate(dst.LDAPCredentialFields); err != nil { + dst.LDAPCredentialFields = nil + } else { + match++ + } + } + } else { + dst.LDAPCredentialFields = nil + } + + // try to unmarshal data into MECMCredentialFields + err = newStrictDecoder(data).Decode(&dst.MECMCredentialFields) + if err == nil { + jsonMECMCredentialFields, _ := json.Marshal(dst.MECMCredentialFields) + if string(jsonMECMCredentialFields) == "{}" { // empty struct + dst.MECMCredentialFields = nil + } else { + if err = validator.Validate(dst.MECMCredentialFields); err != nil { + dst.MECMCredentialFields = nil + } else { + match++ + } + } + } else { + dst.MECMCredentialFields = nil + } + + // try to unmarshal data into MiradoreCredentialFields + err = newStrictDecoder(data).Decode(&dst.MiradoreCredentialFields) + if err == nil { + jsonMiradoreCredentialFields, _ := json.Marshal(dst.MiradoreCredentialFields) + if string(jsonMiradoreCredentialFields) == "{}" { // empty struct + dst.MiradoreCredentialFields = nil + } else { + if err = validator.Validate(dst.MiradoreCredentialFields); err != nil { + dst.MiradoreCredentialFields = nil + } else { + match++ + } + } + } else { + dst.MiradoreCredentialFields = nil + } + + // try to unmarshal data into MirakiCredentialFields + err = newStrictDecoder(data).Decode(&dst.MirakiCredentialFields) + if err == nil { + jsonMirakiCredentialFields, _ := json.Marshal(dst.MirakiCredentialFields) + if string(jsonMirakiCredentialFields) == "{}" { // empty struct + dst.MirakiCredentialFields = nil + } else { + if err = validator.Validate(dst.MirakiCredentialFields); err != nil { + dst.MirakiCredentialFields = nil + } else { + match++ + } + } + } else { + dst.MirakiCredentialFields = nil + } + + // try to unmarshal data into NessusCredentialFields + err = newStrictDecoder(data).Decode(&dst.NessusCredentialFields) + if err == nil { + jsonNessusCredentialFields, _ := json.Marshal(dst.NessusCredentialFields) + if string(jsonNessusCredentialFields) == "{}" { // empty struct + dst.NessusCredentialFields = nil + } else { + if err = validator.Validate(dst.NessusCredentialFields); err != nil { + dst.NessusCredentialFields = nil + } else { + match++ + } + } + } else { + dst.NessusCredentialFields = nil + } + + // try to unmarshal data into NetboxCredentialFields + err = newStrictDecoder(data).Decode(&dst.NetboxCredentialFields) + if err == nil { + jsonNetboxCredentialFields, _ := json.Marshal(dst.NetboxCredentialFields) + if string(jsonNetboxCredentialFields) == "{}" { // empty struct + dst.NetboxCredentialFields = nil + } else { + if err = validator.Validate(dst.NetboxCredentialFields); err != nil { + dst.NetboxCredentialFields = nil + } else { + match++ + } + } + } else { + dst.NetboxCredentialFields = nil + } + + // try to unmarshal data into PaloAltoFirewallCredentialFields + err = newStrictDecoder(data).Decode(&dst.PaloAltoFirewallCredentialFields) + if err == nil { + jsonPaloAltoFirewallCredentialFields, _ := json.Marshal(dst.PaloAltoFirewallCredentialFields) + if string(jsonPaloAltoFirewallCredentialFields) == "{}" { // empty struct + dst.PaloAltoFirewallCredentialFields = nil + } else { + if err = validator.Validate(dst.PaloAltoFirewallCredentialFields); err != nil { + dst.PaloAltoFirewallCredentialFields = nil + } else { + match++ + } + } + } else { + dst.PaloAltoFirewallCredentialFields = nil + } + + // try to unmarshal data into QualysCredentialFields + err = newStrictDecoder(data).Decode(&dst.QualysCredentialFields) + if err == nil { + jsonQualysCredentialFields, _ := json.Marshal(dst.QualysCredentialFields) + if string(jsonQualysCredentialFields) == "{}" { // empty struct + dst.QualysCredentialFields = nil + } else { + if err = validator.Validate(dst.QualysCredentialFields); err != nil { + dst.QualysCredentialFields = nil + } else { + match++ + } + } + } else { + dst.QualysCredentialFields = nil + } + + // try to unmarshal data into SNMPv2CommunitiesCredentialFields + err = newStrictDecoder(data).Decode(&dst.SNMPv2CommunitiesCredentialFields) + if err == nil { + jsonSNMPv2CommunitiesCredentialFields, _ := json.Marshal(dst.SNMPv2CommunitiesCredentialFields) + if string(jsonSNMPv2CommunitiesCredentialFields) == "{}" { // empty struct + dst.SNMPv2CommunitiesCredentialFields = nil + } else { + if err = validator.Validate(dst.SNMPv2CommunitiesCredentialFields); err != nil { + dst.SNMPv2CommunitiesCredentialFields = nil + } else { + match++ + } + } + } else { + dst.SNMPv2CommunitiesCredentialFields = nil + } + + // try to unmarshal data into SNMPv3CredentialFields + err = newStrictDecoder(data).Decode(&dst.SNMPv3CredentialFields) + if err == nil { + jsonSNMPv3CredentialFields, _ := json.Marshal(dst.SNMPv3CredentialFields) + if string(jsonSNMPv3CredentialFields) == "{}" { // empty struct + dst.SNMPv3CredentialFields = nil + } else { + if err = validator.Validate(dst.SNMPv3CredentialFields); err != nil { + dst.SNMPv3CredentialFields = nil + } else { + match++ + } + } + } else { + dst.SNMPv3CredentialFields = nil + } + + // try to unmarshal data into SentinelOneCredentialFields + err = newStrictDecoder(data).Decode(&dst.SentinelOneCredentialFields) + if err == nil { + jsonSentinelOneCredentialFields, _ := json.Marshal(dst.SentinelOneCredentialFields) + if string(jsonSentinelOneCredentialFields) == "{}" { // empty struct + dst.SentinelOneCredentialFields = nil + } else { + if err = validator.Validate(dst.SentinelOneCredentialFields); err != nil { + dst.SentinelOneCredentialFields = nil + } else { + match++ + } + } + } else { + dst.SentinelOneCredentialFields = nil + } + + // try to unmarshal data into ShodanCredentialFields + err = newStrictDecoder(data).Decode(&dst.ShodanCredentialFields) + if err == nil { + jsonShodanCredentialFields, _ := json.Marshal(dst.ShodanCredentialFields) + if string(jsonShodanCredentialFields) == "{}" { // empty struct + dst.ShodanCredentialFields = nil + } else { + if err = validator.Validate(dst.ShodanCredentialFields); err != nil { + dst.ShodanCredentialFields = nil + } else { + match++ + } + } + } else { + dst.ShodanCredentialFields = nil + } + + // try to unmarshal data into TaniumCredentialFields + err = newStrictDecoder(data).Decode(&dst.TaniumCredentialFields) + if err == nil { + jsonTaniumCredentialFields, _ := json.Marshal(dst.TaniumCredentialFields) + if string(jsonTaniumCredentialFields) == "{}" { // empty struct + dst.TaniumCredentialFields = nil + } else { + if err = validator.Validate(dst.TaniumCredentialFields); err != nil { + dst.TaniumCredentialFields = nil + } else { + match++ + } + } + } else { + dst.TaniumCredentialFields = nil + } + + // try to unmarshal data into TenableIoCredentialFields + err = newStrictDecoder(data).Decode(&dst.TenableIoCredentialFields) + if err == nil { + jsonTenableIoCredentialFields, _ := json.Marshal(dst.TenableIoCredentialFields) + if string(jsonTenableIoCredentialFields) == "{}" { // empty struct + dst.TenableIoCredentialFields = nil + } else { + if err = validator.Validate(dst.TenableIoCredentialFields); err != nil { + dst.TenableIoCredentialFields = nil + } else { + match++ + } + } + } else { + dst.TenableIoCredentialFields = nil + } + + // try to unmarshal data into TenableScCredentialFields + err = newStrictDecoder(data).Decode(&dst.TenableScCredentialFields) + if err == nil { + jsonTenableScCredentialFields, _ := json.Marshal(dst.TenableScCredentialFields) + if string(jsonTenableScCredentialFields) == "{}" { // empty struct + dst.TenableScCredentialFields = nil + } else { + if err = validator.Validate(dst.TenableScCredentialFields); err != nil { + dst.TenableScCredentialFields = nil + } else { + match++ + } + } + } else { + dst.TenableScCredentialFields = nil + } + + // try to unmarshal data into VMwareCredentialFields + err = newStrictDecoder(data).Decode(&dst.VMwareCredentialFields) + if err == nil { + jsonVMwareCredentialFields, _ := json.Marshal(dst.VMwareCredentialFields) + if string(jsonVMwareCredentialFields) == "{}" { // empty struct + dst.VMwareCredentialFields = nil + } else { + if err = validator.Validate(dst.VMwareCredentialFields); err != nil { + dst.VMwareCredentialFields = nil + } else { + match++ + } + } + } else { + dst.VMwareCredentialFields = nil + } + + // try to unmarshal data into WizCredentialFields + err = newStrictDecoder(data).Decode(&dst.WizCredentialFields) + if err == nil { + jsonWizCredentialFields, _ := json.Marshal(dst.WizCredentialFields) + if string(jsonWizCredentialFields) == "{}" { // empty struct + dst.WizCredentialFields = nil + } else { + if err = validator.Validate(dst.WizCredentialFields); err != nil { + dst.WizCredentialFields = nil + } else { + match++ + } + } + } else { + dst.WizCredentialFields = nil + } + + // try to unmarshal data into X509CredentialFields + err = newStrictDecoder(data).Decode(&dst.X509CredentialFields) + if err == nil { + jsonX509CredentialFields, _ := json.Marshal(dst.X509CredentialFields) + if string(jsonX509CredentialFields) == "{}" { // empty struct + dst.X509CredentialFields = nil + } else { + if err = validator.Validate(dst.X509CredentialFields); err != nil { + dst.X509CredentialFields = nil + } else { + match++ + } + } + } else { + dst.X509CredentialFields = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AWSCredentialFields = nil + dst.AzureClientSecretCredentialFields = nil + dst.AzureUsernamePasswordCredentialFields = nil + dst.CensysCredentialFields = nil + dst.CrowdstrikeCredentialFields = nil + dst.CustomIntegrationScriptCredentialFields = nil + dst.GCPCredentialFields = nil + dst.GoogleWorkspaceCredentialFields = nil + dst.InsightVMCredentialFields = nil + dst.LDAPCredentialFields = nil + dst.MECMCredentialFields = nil + dst.MiradoreCredentialFields = nil + dst.MirakiCredentialFields = nil + dst.NessusCredentialFields = nil + dst.NetboxCredentialFields = nil + dst.PaloAltoFirewallCredentialFields = nil + dst.QualysCredentialFields = nil + dst.SNMPv2CommunitiesCredentialFields = nil + dst.SNMPv3CredentialFields = nil + dst.SentinelOneCredentialFields = nil + dst.ShodanCredentialFields = nil + dst.TaniumCredentialFields = nil + dst.TenableIoCredentialFields = nil + dst.TenableScCredentialFields = nil + dst.VMwareCredentialFields = nil + dst.WizCredentialFields = nil + dst.X509CredentialFields = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CredentialFields)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CredentialFields)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CredentialFields) MarshalJSON() ([]byte, error) { + if src.AWSCredentialFields != nil { + return json.Marshal(&src.AWSCredentialFields) + } + + if src.AzureClientSecretCredentialFields != nil { + return json.Marshal(&src.AzureClientSecretCredentialFields) + } + + if src.AzureUsernamePasswordCredentialFields != nil { + return json.Marshal(&src.AzureUsernamePasswordCredentialFields) + } + + if src.CensysCredentialFields != nil { + return json.Marshal(&src.CensysCredentialFields) + } + + if src.CrowdstrikeCredentialFields != nil { + return json.Marshal(&src.CrowdstrikeCredentialFields) + } + + if src.CustomIntegrationScriptCredentialFields != nil { + return json.Marshal(&src.CustomIntegrationScriptCredentialFields) + } + + if src.GCPCredentialFields != nil { + return json.Marshal(&src.GCPCredentialFields) + } + + if src.GoogleWorkspaceCredentialFields != nil { + return json.Marshal(&src.GoogleWorkspaceCredentialFields) + } + + if src.InsightVMCredentialFields != nil { + return json.Marshal(&src.InsightVMCredentialFields) + } + + if src.LDAPCredentialFields != nil { + return json.Marshal(&src.LDAPCredentialFields) + } + + if src.MECMCredentialFields != nil { + return json.Marshal(&src.MECMCredentialFields) + } + + if src.MiradoreCredentialFields != nil { + return json.Marshal(&src.MiradoreCredentialFields) + } + + if src.MirakiCredentialFields != nil { + return json.Marshal(&src.MirakiCredentialFields) + } + + if src.NessusCredentialFields != nil { + return json.Marshal(&src.NessusCredentialFields) + } + + if src.NetboxCredentialFields != nil { + return json.Marshal(&src.NetboxCredentialFields) + } + + if src.PaloAltoFirewallCredentialFields != nil { + return json.Marshal(&src.PaloAltoFirewallCredentialFields) + } + + if src.QualysCredentialFields != nil { + return json.Marshal(&src.QualysCredentialFields) + } + + if src.SNMPv2CommunitiesCredentialFields != nil { + return json.Marshal(&src.SNMPv2CommunitiesCredentialFields) + } + + if src.SNMPv3CredentialFields != nil { + return json.Marshal(&src.SNMPv3CredentialFields) + } + + if src.SentinelOneCredentialFields != nil { + return json.Marshal(&src.SentinelOneCredentialFields) + } + + if src.ShodanCredentialFields != nil { + return json.Marshal(&src.ShodanCredentialFields) + } + + if src.TaniumCredentialFields != nil { + return json.Marshal(&src.TaniumCredentialFields) + } + + if src.TenableIoCredentialFields != nil { + return json.Marshal(&src.TenableIoCredentialFields) + } + + if src.TenableScCredentialFields != nil { + return json.Marshal(&src.TenableScCredentialFields) + } + + if src.VMwareCredentialFields != nil { + return json.Marshal(&src.VMwareCredentialFields) + } + + if src.WizCredentialFields != nil { + return json.Marshal(&src.WizCredentialFields) + } + + if src.X509CredentialFields != nil { + return json.Marshal(&src.X509CredentialFields) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CredentialFields) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.AWSCredentialFields != nil { + return obj.AWSCredentialFields + } + + if obj.AzureClientSecretCredentialFields != nil { + return obj.AzureClientSecretCredentialFields + } + + if obj.AzureUsernamePasswordCredentialFields != nil { + return obj.AzureUsernamePasswordCredentialFields + } + + if obj.CensysCredentialFields != nil { + return obj.CensysCredentialFields + } + + if obj.CrowdstrikeCredentialFields != nil { + return obj.CrowdstrikeCredentialFields + } + + if obj.CustomIntegrationScriptCredentialFields != nil { + return obj.CustomIntegrationScriptCredentialFields + } + + if obj.GCPCredentialFields != nil { + return obj.GCPCredentialFields + } + + if obj.GoogleWorkspaceCredentialFields != nil { + return obj.GoogleWorkspaceCredentialFields + } + + if obj.InsightVMCredentialFields != nil { + return obj.InsightVMCredentialFields + } + + if obj.LDAPCredentialFields != nil { + return obj.LDAPCredentialFields + } + + if obj.MECMCredentialFields != nil { + return obj.MECMCredentialFields + } + + if obj.MiradoreCredentialFields != nil { + return obj.MiradoreCredentialFields + } + + if obj.MirakiCredentialFields != nil { + return obj.MirakiCredentialFields + } + + if obj.NessusCredentialFields != nil { + return obj.NessusCredentialFields + } + + if obj.NetboxCredentialFields != nil { + return obj.NetboxCredentialFields + } + + if obj.PaloAltoFirewallCredentialFields != nil { + return obj.PaloAltoFirewallCredentialFields + } + + if obj.QualysCredentialFields != nil { + return obj.QualysCredentialFields + } + + if obj.SNMPv2CommunitiesCredentialFields != nil { + return obj.SNMPv2CommunitiesCredentialFields + } + + if obj.SNMPv3CredentialFields != nil { + return obj.SNMPv3CredentialFields + } + + if obj.SentinelOneCredentialFields != nil { + return obj.SentinelOneCredentialFields + } + + if obj.ShodanCredentialFields != nil { + return obj.ShodanCredentialFields + } + + if obj.TaniumCredentialFields != nil { + return obj.TaniumCredentialFields + } + + if obj.TenableIoCredentialFields != nil { + return obj.TenableIoCredentialFields + } + + if obj.TenableScCredentialFields != nil { + return obj.TenableScCredentialFields + } + + if obj.VMwareCredentialFields != nil { + return obj.VMwareCredentialFields + } + + if obj.WizCredentialFields != nil { + return obj.WizCredentialFields + } + + if obj.X509CredentialFields != nil { + return obj.X509CredentialFields + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj CredentialFields) GetActualInstanceValue() (interface{}) { + if obj.AWSCredentialFields != nil { + return *obj.AWSCredentialFields + } + + if obj.AzureClientSecretCredentialFields != nil { + return *obj.AzureClientSecretCredentialFields + } + + if obj.AzureUsernamePasswordCredentialFields != nil { + return *obj.AzureUsernamePasswordCredentialFields + } + + if obj.CensysCredentialFields != nil { + return *obj.CensysCredentialFields + } + + if obj.CrowdstrikeCredentialFields != nil { + return *obj.CrowdstrikeCredentialFields + } + + if obj.CustomIntegrationScriptCredentialFields != nil { + return *obj.CustomIntegrationScriptCredentialFields + } + + if obj.GCPCredentialFields != nil { + return *obj.GCPCredentialFields + } + + if obj.GoogleWorkspaceCredentialFields != nil { + return *obj.GoogleWorkspaceCredentialFields + } + + if obj.InsightVMCredentialFields != nil { + return *obj.InsightVMCredentialFields + } + + if obj.LDAPCredentialFields != nil { + return *obj.LDAPCredentialFields + } + + if obj.MECMCredentialFields != nil { + return *obj.MECMCredentialFields + } + + if obj.MiradoreCredentialFields != nil { + return *obj.MiradoreCredentialFields + } + + if obj.MirakiCredentialFields != nil { + return *obj.MirakiCredentialFields + } + + if obj.NessusCredentialFields != nil { + return *obj.NessusCredentialFields + } + + if obj.NetboxCredentialFields != nil { + return *obj.NetboxCredentialFields + } + + if obj.PaloAltoFirewallCredentialFields != nil { + return *obj.PaloAltoFirewallCredentialFields + } + + if obj.QualysCredentialFields != nil { + return *obj.QualysCredentialFields + } + + if obj.SNMPv2CommunitiesCredentialFields != nil { + return *obj.SNMPv2CommunitiesCredentialFields + } + + if obj.SNMPv3CredentialFields != nil { + return *obj.SNMPv3CredentialFields + } + + if obj.SentinelOneCredentialFields != nil { + return *obj.SentinelOneCredentialFields + } + + if obj.ShodanCredentialFields != nil { + return *obj.ShodanCredentialFields + } + + if obj.TaniumCredentialFields != nil { + return *obj.TaniumCredentialFields + } + + if obj.TenableIoCredentialFields != nil { + return *obj.TenableIoCredentialFields + } + + if obj.TenableScCredentialFields != nil { + return *obj.TenableScCredentialFields + } + + if obj.VMwareCredentialFields != nil { + return *obj.VMwareCredentialFields + } + + if obj.WizCredentialFields != nil { + return *obj.WizCredentialFields + } + + if obj.X509CredentialFields != nil { + return *obj.X509CredentialFields + } + + // all schemas are nil + return nil +} + +type NullableCredentialFields struct { + value *CredentialFields + isSet bool +} + +func (v NullableCredentialFields) Get() *CredentialFields { + return v.value +} + +func (v *NullableCredentialFields) Set(val *CredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialFields(val *CredentialFields) *NullableCredentialFields { + return &NullableCredentialFields{value: val, isSet: true} +} + +func (v NullableCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_credential_options.go b/go/model_credential_options.go new file mode 100644 index 0000000..828b569 --- /dev/null +++ b/go/model_credential_options.go @@ -0,0 +1,307 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the CredentialOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialOptions{} + +// CredentialOptions struct for CredentialOptions +type CredentialOptions struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Acl map[string]interface{} `json:"acl,omitempty"` + Global *bool `json:"global,omitempty"` + Cidrs *string `json:"cidrs,omitempty"` + Secret *CredentialFields `json:"secret,omitempty"` +} + +// NewCredentialOptions instantiates a new CredentialOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredentialOptions() *CredentialOptions { + this := CredentialOptions{} + return &this +} + +// NewCredentialOptionsWithDefaults instantiates a new CredentialOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialOptionsWithDefaults() *CredentialOptions { + this := CredentialOptions{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CredentialOptions) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CredentialOptions) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CredentialOptions) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CredentialOptions) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CredentialOptions) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CredentialOptions) SetType(v string) { + o.Type = &v +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *CredentialOptions) GetAcl() map[string]interface{} { + if o == nil || IsNil(o.Acl) { + var ret map[string]interface{} + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetAclOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Acl) { + return map[string]interface{}{}, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *CredentialOptions) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given map[string]interface{} and assigns it to the Acl field. +func (o *CredentialOptions) SetAcl(v map[string]interface{}) { + o.Acl = v +} + +// GetGlobal returns the Global field value if set, zero value otherwise. +func (o *CredentialOptions) GetGlobal() bool { + if o == nil || IsNil(o.Global) { + var ret bool + return ret + } + return *o.Global +} + +// GetGlobalOk returns a tuple with the Global field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetGlobalOk() (*bool, bool) { + if o == nil || IsNil(o.Global) { + return nil, false + } + return o.Global, true +} + +// HasGlobal returns a boolean if a field has been set. +func (o *CredentialOptions) HasGlobal() bool { + if o != nil && !IsNil(o.Global) { + return true + } + + return false +} + +// SetGlobal gets a reference to the given bool and assigns it to the Global field. +func (o *CredentialOptions) SetGlobal(v bool) { + o.Global = &v +} + +// GetCidrs returns the Cidrs field value if set, zero value otherwise. +func (o *CredentialOptions) GetCidrs() string { + if o == nil || IsNil(o.Cidrs) { + var ret string + return ret + } + return *o.Cidrs +} + +// GetCidrsOk returns a tuple with the Cidrs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetCidrsOk() (*string, bool) { + if o == nil || IsNil(o.Cidrs) { + return nil, false + } + return o.Cidrs, true +} + +// HasCidrs returns a boolean if a field has been set. +func (o *CredentialOptions) HasCidrs() bool { + if o != nil && !IsNil(o.Cidrs) { + return true + } + + return false +} + +// SetCidrs gets a reference to the given string and assigns it to the Cidrs field. +func (o *CredentialOptions) SetCidrs(v string) { + o.Cidrs = &v +} + +// GetSecret returns the Secret field value if set, zero value otherwise. +func (o *CredentialOptions) GetSecret() CredentialFields { + if o == nil || IsNil(o.Secret) { + var ret CredentialFields + return ret + } + return *o.Secret +} + +// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialOptions) GetSecretOk() (*CredentialFields, bool) { + if o == nil || IsNil(o.Secret) { + return nil, false + } + return o.Secret, true +} + +// HasSecret returns a boolean if a field has been set. +func (o *CredentialOptions) HasSecret() bool { + if o != nil && !IsNil(o.Secret) { + return true + } + + return false +} + +// SetSecret gets a reference to the given CredentialFields and assigns it to the Secret field. +func (o *CredentialOptions) SetSecret(v CredentialFields) { + o.Secret = &v +} + +func (o CredentialOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.Global) { + toSerialize["global"] = o.Global + } + if !IsNil(o.Cidrs) { + toSerialize["cidrs"] = o.Cidrs + } + if !IsNil(o.Secret) { + toSerialize["secret"] = o.Secret + } + return toSerialize, nil +} + +type NullableCredentialOptions struct { + value *CredentialOptions + isSet bool +} + +func (v NullableCredentialOptions) Get() *CredentialOptions { + return v.value +} + +func (v *NullableCredentialOptions) Set(val *CredentialOptions) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialOptions(val *CredentialOptions) *NullableCredentialOptions { + return &NullableCredentialOptions{value: val, isSet: true} +} + +func (v NullableCredentialOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_crowdstrike_credential_fields.go b/go/model_crowdstrike_credential_fields.go new file mode 100644 index 0000000..0a69daa --- /dev/null +++ b/go/model_crowdstrike_credential_fields.go @@ -0,0 +1,215 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CrowdstrikeCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CrowdstrikeCredentialFields{} + +// CrowdstrikeCredentialFields struct for CrowdstrikeCredentialFields +type CrowdstrikeCredentialFields struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + ApiUrl string `json:"api_url"` +} + +type _CrowdstrikeCredentialFields CrowdstrikeCredentialFields + +// NewCrowdstrikeCredentialFields instantiates a new CrowdstrikeCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCrowdstrikeCredentialFields(clientId string, clientSecret string, apiUrl string) *CrowdstrikeCredentialFields { + this := CrowdstrikeCredentialFields{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.ApiUrl = apiUrl + return &this +} + +// NewCrowdstrikeCredentialFieldsWithDefaults instantiates a new CrowdstrikeCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCrowdstrikeCredentialFieldsWithDefaults() *CrowdstrikeCredentialFields { + this := CrowdstrikeCredentialFields{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *CrowdstrikeCredentialFields) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CrowdstrikeCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CrowdstrikeCredentialFields) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *CrowdstrikeCredentialFields) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CrowdstrikeCredentialFields) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CrowdstrikeCredentialFields) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetApiUrl returns the ApiUrl field value +func (o *CrowdstrikeCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *CrowdstrikeCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *CrowdstrikeCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +func (o CrowdstrikeCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CrowdstrikeCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["api_url"] = o.ApiUrl + return toSerialize, nil +} + +func (o *CrowdstrikeCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "api_url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCrowdstrikeCredentialFields := _CrowdstrikeCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCrowdstrikeCredentialFields) + + if err != nil { + return err + } + + *o = CrowdstrikeCredentialFields(varCrowdstrikeCredentialFields) + + return err +} + +type NullableCrowdstrikeCredentialFields struct { + value *CrowdstrikeCredentialFields + isSet bool +} + +func (v NullableCrowdstrikeCredentialFields) Get() *CrowdstrikeCredentialFields { + return v.value +} + +func (v *NullableCrowdstrikeCredentialFields) Set(val *CrowdstrikeCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableCrowdstrikeCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableCrowdstrikeCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCrowdstrikeCredentialFields(val *CrowdstrikeCredentialFields) *NullableCrowdstrikeCredentialFields { + return &NullableCrowdstrikeCredentialFields{value: val, isSet: true} +} + +func (v NullableCrowdstrikeCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCrowdstrikeCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_custom_attributes_value.go b/go/model_custom_attributes_value.go new file mode 100644 index 0000000..ccb7a48 --- /dev/null +++ b/go/model_custom_attributes_value.go @@ -0,0 +1,90 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + + +// CustomAttributesValue struct for CustomAttributesValue +type CustomAttributesValue struct { + String *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *CustomAttributesValue) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into String + err = json.Unmarshal(data, &dst.String); + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + return nil // data stored in dst.String, return on the first match + } + } else { + dst.String = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(CustomAttributesValue)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CustomAttributesValue) MarshalJSON() ([]byte, error) { + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in anyOf schemas +} + + +type NullableCustomAttributesValue struct { + value *CustomAttributesValue + isSet bool +} + +func (v NullableCustomAttributesValue) Get() *CustomAttributesValue { + return v.value +} + +func (v *NullableCustomAttributesValue) Set(val *CustomAttributesValue) { + v.value = val + v.isSet = true +} + +func (v NullableCustomAttributesValue) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomAttributesValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomAttributesValue(val *CustomAttributesValue) *NullableCustomAttributesValue { + return &NullableCustomAttributesValue{value: val, isSet: true} +} + +func (v NullableCustomAttributesValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomAttributesValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_custom_integration.go b/go/model_custom_integration.go new file mode 100644 index 0000000..5a4654e --- /dev/null +++ b/go/model_custom_integration.go @@ -0,0 +1,417 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CustomIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomIntegration{} + +// CustomIntegration struct for CustomIntegration +type CustomIntegration struct { + // The unique name of the custom integration, without spaces. + Name string `json:"name"` + // Base64 encoded png with maximum size 256x256 pixels + Icon *string `json:"icon,omitempty"` + // A text description of the custom integration + Description *string `json:"description,omitempty"` + // The unique ID of the object + Id string `json:"id"` + // The unique ID of the runZero client/customer account that owns the object + ClientId string `json:"client_id"` + // The unique ID of the entity that created the object + CreatedById string `json:"created_by_id"` + // A timestamp indicating creation time of the object + CreatedAt time.Time `json:"created_at"` + // A timestamp indicating last modified time of the object + UpdatedAt time.Time `json:"updated_at"` + // A timestamp indicating deletion time of the object + DestroyedAt *time.Time `json:"destroyed_at,omitempty"` +} + +type _CustomIntegration CustomIntegration + +// NewCustomIntegration instantiates a new CustomIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomIntegration(name string, id string, clientId string, createdById string, createdAt time.Time, updatedAt time.Time) *CustomIntegration { + this := CustomIntegration{} + this.Name = name + this.Id = id + this.ClientId = clientId + this.CreatedById = createdById + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewCustomIntegrationWithDefaults instantiates a new CustomIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomIntegrationWithDefaults() *CustomIntegration { + this := CustomIntegration{} + return &this +} + +// GetName returns the Name field value +func (o *CustomIntegration) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CustomIntegration) SetName(v string) { + o.Name = v +} + +// GetIcon returns the Icon field value if set, zero value otherwise. +func (o *CustomIntegration) GetIcon() string { + if o == nil || IsNil(o.Icon) { + var ret string + return ret + } + return *o.Icon +} + +// GetIconOk returns a tuple with the Icon field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetIconOk() (*string, bool) { + if o == nil || IsNil(o.Icon) { + return nil, false + } + return o.Icon, true +} + +// HasIcon returns a boolean if a field has been set. +func (o *CustomIntegration) HasIcon() bool { + if o != nil && !IsNil(o.Icon) { + return true + } + + return false +} + +// SetIcon gets a reference to the given string and assigns it to the Icon field. +func (o *CustomIntegration) SetIcon(v string) { + o.Icon = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CustomIntegration) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CustomIntegration) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CustomIntegration) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value +func (o *CustomIntegration) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CustomIntegration) SetId(v string) { + o.Id = v +} + +// GetClientId returns the ClientId field value +func (o *CustomIntegration) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CustomIntegration) SetClientId(v string) { + o.ClientId = v +} + +// GetCreatedById returns the CreatedById field value +func (o *CustomIntegration) GetCreatedById() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedById +} + +// GetCreatedByIdOk returns a tuple with the CreatedById field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetCreatedByIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedById, true +} + +// SetCreatedById sets field value +func (o *CustomIntegration) SetCreatedById(v string) { + o.CreatedById = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CustomIntegration) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CustomIntegration) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CustomIntegration) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CustomIntegration) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetDestroyedAt returns the DestroyedAt field value if set, zero value otherwise. +func (o *CustomIntegration) GetDestroyedAt() time.Time { + if o == nil || IsNil(o.DestroyedAt) { + var ret time.Time + return ret + } + return *o.DestroyedAt +} + +// GetDestroyedAtOk returns a tuple with the DestroyedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomIntegration) GetDestroyedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.DestroyedAt) { + return nil, false + } + return o.DestroyedAt, true +} + +// HasDestroyedAt returns a boolean if a field has been set. +func (o *CustomIntegration) HasDestroyedAt() bool { + if o != nil && !IsNil(o.DestroyedAt) { + return true + } + + return false +} + +// SetDestroyedAt gets a reference to the given time.Time and assigns it to the DestroyedAt field. +func (o *CustomIntegration) SetDestroyedAt(v time.Time) { + o.DestroyedAt = &v +} + +func (o CustomIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Icon) { + toSerialize["icon"] = o.Icon + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["id"] = o.Id + toSerialize["client_id"] = o.ClientId + toSerialize["created_by_id"] = o.CreatedById + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + if !IsNil(o.DestroyedAt) { + toSerialize["destroyed_at"] = o.DestroyedAt + } + return toSerialize, nil +} + +func (o *CustomIntegration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "client_id", + "created_by_id", + "created_at", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomIntegration := _CustomIntegration{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomIntegration) + + if err != nil { + return err + } + + *o = CustomIntegration(varCustomIntegration) + + return err +} + +type NullableCustomIntegration struct { + value *CustomIntegration + isSet bool +} + +func (v NullableCustomIntegration) Get() *CustomIntegration { + return v.value +} + +func (v *NullableCustomIntegration) Set(val *CustomIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableCustomIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomIntegration(val *CustomIntegration) *NullableCustomIntegration { + return &NullableCustomIntegration{value: val, isSet: true} +} + +func (v NullableCustomIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_custom_integration_create.go b/go/model_custom_integration_create.go new file mode 100644 index 0000000..d8b295c --- /dev/null +++ b/go/model_custom_integration_create.go @@ -0,0 +1,234 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CustomIntegrationCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomIntegrationCreate{} + +// CustomIntegrationCreate Request body used to register a new custom integration. +type CustomIntegrationCreate struct { + // The unique name of the custom integration, without spaces. + Name string `json:"name"` + // Base64 encoded png with maximum size 256x256 pixels + Icon *string `json:"icon,omitempty"` + // A text description of the custom integration + Description *string `json:"description,omitempty"` +} + +type _CustomIntegrationCreate CustomIntegrationCreate + +// NewCustomIntegrationCreate instantiates a new CustomIntegrationCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomIntegrationCreate(name string) *CustomIntegrationCreate { + this := CustomIntegrationCreate{} + this.Name = name + return &this +} + +// NewCustomIntegrationCreateWithDefaults instantiates a new CustomIntegrationCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomIntegrationCreateWithDefaults() *CustomIntegrationCreate { + this := CustomIntegrationCreate{} + return &this +} + +// GetName returns the Name field value +func (o *CustomIntegrationCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CustomIntegrationCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CustomIntegrationCreate) SetName(v string) { + o.Name = v +} + +// GetIcon returns the Icon field value if set, zero value otherwise. +func (o *CustomIntegrationCreate) GetIcon() string { + if o == nil || IsNil(o.Icon) { + var ret string + return ret + } + return *o.Icon +} + +// GetIconOk returns a tuple with the Icon field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomIntegrationCreate) GetIconOk() (*string, bool) { + if o == nil || IsNil(o.Icon) { + return nil, false + } + return o.Icon, true +} + +// HasIcon returns a boolean if a field has been set. +func (o *CustomIntegrationCreate) HasIcon() bool { + if o != nil && !IsNil(o.Icon) { + return true + } + + return false +} + +// SetIcon gets a reference to the given string and assigns it to the Icon field. +func (o *CustomIntegrationCreate) SetIcon(v string) { + o.Icon = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CustomIntegrationCreate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomIntegrationCreate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CustomIntegrationCreate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CustomIntegrationCreate) SetDescription(v string) { + o.Description = &v +} + +func (o CustomIntegrationCreate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomIntegrationCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Icon) { + toSerialize["icon"] = o.Icon + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *CustomIntegrationCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomIntegrationCreate := _CustomIntegrationCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomIntegrationCreate) + + if err != nil { + return err + } + + *o = CustomIntegrationCreate(varCustomIntegrationCreate) + + return err +} + +type NullableCustomIntegrationCreate struct { + value *CustomIntegrationCreate + isSet bool +} + +func (v NullableCustomIntegrationCreate) Get() *CustomIntegrationCreate { + return v.value +} + +func (v *NullableCustomIntegrationCreate) Set(val *CustomIntegrationCreate) { + v.value = val + v.isSet = true +} + +func (v NullableCustomIntegrationCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomIntegrationCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomIntegrationCreate(val *CustomIntegrationCreate) *NullableCustomIntegrationCreate { + return &NullableCustomIntegrationCreate{value: val, isSet: true} +} + +func (v NullableCustomIntegrationCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomIntegrationCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_custom_integration_script_credential_fields.go b/go/model_custom_integration_script_credential_fields.go new file mode 100644 index 0000000..038a24b --- /dev/null +++ b/go/model_custom_integration_script_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CustomIntegrationScriptCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomIntegrationScriptCredentialFields{} + +// CustomIntegrationScriptCredentialFields struct for CustomIntegrationScriptCredentialFields +type CustomIntegrationScriptCredentialFields struct { + AccessKey string `json:"access_key"` + AccessSecret string `json:"access_secret"` +} + +type _CustomIntegrationScriptCredentialFields CustomIntegrationScriptCredentialFields + +// NewCustomIntegrationScriptCredentialFields instantiates a new CustomIntegrationScriptCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomIntegrationScriptCredentialFields(accessKey string, accessSecret string) *CustomIntegrationScriptCredentialFields { + this := CustomIntegrationScriptCredentialFields{} + this.AccessKey = accessKey + this.AccessSecret = accessSecret + return &this +} + +// NewCustomIntegrationScriptCredentialFieldsWithDefaults instantiates a new CustomIntegrationScriptCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomIntegrationScriptCredentialFieldsWithDefaults() *CustomIntegrationScriptCredentialFields { + this := CustomIntegrationScriptCredentialFields{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *CustomIntegrationScriptCredentialFields) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *CustomIntegrationScriptCredentialFields) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *CustomIntegrationScriptCredentialFields) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetAccessSecret returns the AccessSecret field value +func (o *CustomIntegrationScriptCredentialFields) GetAccessSecret() string { + if o == nil { + var ret string + return ret + } + + return o.AccessSecret +} + +// GetAccessSecretOk returns a tuple with the AccessSecret field value +// and a boolean to check if the value has been set. +func (o *CustomIntegrationScriptCredentialFields) GetAccessSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessSecret, true +} + +// SetAccessSecret sets field value +func (o *CustomIntegrationScriptCredentialFields) SetAccessSecret(v string) { + o.AccessSecret = v +} + +func (o CustomIntegrationScriptCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomIntegrationScriptCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["access_secret"] = o.AccessSecret + return toSerialize, nil +} + +func (o *CustomIntegrationScriptCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "access_secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomIntegrationScriptCredentialFields := _CustomIntegrationScriptCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomIntegrationScriptCredentialFields) + + if err != nil { + return err + } + + *o = CustomIntegrationScriptCredentialFields(varCustomIntegrationScriptCredentialFields) + + return err +} + +type NullableCustomIntegrationScriptCredentialFields struct { + value *CustomIntegrationScriptCredentialFields + isSet bool +} + +func (v NullableCustomIntegrationScriptCredentialFields) Get() *CustomIntegrationScriptCredentialFields { + return v.value +} + +func (v *NullableCustomIntegrationScriptCredentialFields) Set(val *CustomIntegrationScriptCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableCustomIntegrationScriptCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomIntegrationScriptCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomIntegrationScriptCredentialFields(val *CustomIntegrationScriptCredentialFields) *NullableCustomIntegrationScriptCredentialFields { + return &NullableCustomIntegrationScriptCredentialFields{value: val, isSet: true} +} + +func (v NullableCustomIntegrationScriptCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomIntegrationScriptCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_directory_group.go b/go/model_directory_group.go new file mode 100644 index 0000000..b216255 --- /dev/null +++ b/go/model_directory_group.go @@ -0,0 +1,663 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DirectoryGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DirectoryGroup{} + +// DirectoryGroup struct for DirectoryGroup +type DirectoryGroup struct { + Id string `json:"id"` + DirectoryGroupId *string `json:"directory_group_id,omitempty"` + DirectoryGroupOrganizationId *string `json:"directory_group_organization_id,omitempty"` + DirectoryGroupSiteId *string `json:"directory_group_site_id,omitempty"` + DirectoryGroupSourceId *int32 `json:"directory_group_source_id,omitempty"` + DirectoryGroupCreatedAt *int64 `json:"directory_group_created_at,omitempty"` + DirectoryGroupUpdatedAt *int64 `json:"directory_group_updated_at,omitempty"` + DirectoryGroupGroupId *string `json:"directory_group_group_id,omitempty"` + DirectoryGroupUserCount *int64 `json:"directory_group_user_count,omitempty"` + DirectoryGroupName *string `json:"directory_group_name,omitempty"` + DirectoryGroupDisplayName *string `json:"directory_group_display_name,omitempty"` + DirectoryGroupDescription *string `json:"directory_group_description,omitempty"` + DirectoryGroupEmail *string `json:"directory_group_email,omitempty"` + DirectoryGroupEmailNormalized *string `json:"directory_group_email_normalized,omitempty"` + DirectoryGroupAttributes *map[string]string `json:"directory_group_attributes,omitempty"` +} + +type _DirectoryGroup DirectoryGroup + +// NewDirectoryGroup instantiates a new DirectoryGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDirectoryGroup(id string) *DirectoryGroup { + this := DirectoryGroup{} + this.Id = id + return &this +} + +// NewDirectoryGroupWithDefaults instantiates a new DirectoryGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDirectoryGroupWithDefaults() *DirectoryGroup { + this := DirectoryGroup{} + return &this +} + +// GetId returns the Id field value +func (o *DirectoryGroup) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DirectoryGroup) SetId(v string) { + o.Id = v +} + +// GetDirectoryGroupId returns the DirectoryGroupId field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupId() string { + if o == nil || IsNil(o.DirectoryGroupId) { + var ret string + return ret + } + return *o.DirectoryGroupId +} + +// GetDirectoryGroupIdOk returns a tuple with the DirectoryGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupId) { + return nil, false + } + return o.DirectoryGroupId, true +} + +// HasDirectoryGroupId returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupId() bool { + if o != nil && !IsNil(o.DirectoryGroupId) { + return true + } + + return false +} + +// SetDirectoryGroupId gets a reference to the given string and assigns it to the DirectoryGroupId field. +func (o *DirectoryGroup) SetDirectoryGroupId(v string) { + o.DirectoryGroupId = &v +} + +// GetDirectoryGroupOrganizationId returns the DirectoryGroupOrganizationId field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupOrganizationId() string { + if o == nil || IsNil(o.DirectoryGroupOrganizationId) { + var ret string + return ret + } + return *o.DirectoryGroupOrganizationId +} + +// GetDirectoryGroupOrganizationIdOk returns a tuple with the DirectoryGroupOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupOrganizationId) { + return nil, false + } + return o.DirectoryGroupOrganizationId, true +} + +// HasDirectoryGroupOrganizationId returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupOrganizationId() bool { + if o != nil && !IsNil(o.DirectoryGroupOrganizationId) { + return true + } + + return false +} + +// SetDirectoryGroupOrganizationId gets a reference to the given string and assigns it to the DirectoryGroupOrganizationId field. +func (o *DirectoryGroup) SetDirectoryGroupOrganizationId(v string) { + o.DirectoryGroupOrganizationId = &v +} + +// GetDirectoryGroupSiteId returns the DirectoryGroupSiteId field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupSiteId() string { + if o == nil || IsNil(o.DirectoryGroupSiteId) { + var ret string + return ret + } + return *o.DirectoryGroupSiteId +} + +// GetDirectoryGroupSiteIdOk returns a tuple with the DirectoryGroupSiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupSiteId) { + return nil, false + } + return o.DirectoryGroupSiteId, true +} + +// HasDirectoryGroupSiteId returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupSiteId() bool { + if o != nil && !IsNil(o.DirectoryGroupSiteId) { + return true + } + + return false +} + +// SetDirectoryGroupSiteId gets a reference to the given string and assigns it to the DirectoryGroupSiteId field. +func (o *DirectoryGroup) SetDirectoryGroupSiteId(v string) { + o.DirectoryGroupSiteId = &v +} + +// GetDirectoryGroupSourceId returns the DirectoryGroupSourceId field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupSourceId() int32 { + if o == nil || IsNil(o.DirectoryGroupSourceId) { + var ret int32 + return ret + } + return *o.DirectoryGroupSourceId +} + +// GetDirectoryGroupSourceIdOk returns a tuple with the DirectoryGroupSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.DirectoryGroupSourceId) { + return nil, false + } + return o.DirectoryGroupSourceId, true +} + +// HasDirectoryGroupSourceId returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupSourceId() bool { + if o != nil && !IsNil(o.DirectoryGroupSourceId) { + return true + } + + return false +} + +// SetDirectoryGroupSourceId gets a reference to the given int32 and assigns it to the DirectoryGroupSourceId field. +func (o *DirectoryGroup) SetDirectoryGroupSourceId(v int32) { + o.DirectoryGroupSourceId = &v +} + +// GetDirectoryGroupCreatedAt returns the DirectoryGroupCreatedAt field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupCreatedAt() int64 { + if o == nil || IsNil(o.DirectoryGroupCreatedAt) { + var ret int64 + return ret + } + return *o.DirectoryGroupCreatedAt +} + +// GetDirectoryGroupCreatedAtOk returns a tuple with the DirectoryGroupCreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryGroupCreatedAt) { + return nil, false + } + return o.DirectoryGroupCreatedAt, true +} + +// HasDirectoryGroupCreatedAt returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupCreatedAt() bool { + if o != nil && !IsNil(o.DirectoryGroupCreatedAt) { + return true + } + + return false +} + +// SetDirectoryGroupCreatedAt gets a reference to the given int64 and assigns it to the DirectoryGroupCreatedAt field. +func (o *DirectoryGroup) SetDirectoryGroupCreatedAt(v int64) { + o.DirectoryGroupCreatedAt = &v +} + +// GetDirectoryGroupUpdatedAt returns the DirectoryGroupUpdatedAt field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupUpdatedAt() int64 { + if o == nil || IsNil(o.DirectoryGroupUpdatedAt) { + var ret int64 + return ret + } + return *o.DirectoryGroupUpdatedAt +} + +// GetDirectoryGroupUpdatedAtOk returns a tuple with the DirectoryGroupUpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryGroupUpdatedAt) { + return nil, false + } + return o.DirectoryGroupUpdatedAt, true +} + +// HasDirectoryGroupUpdatedAt returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupUpdatedAt() bool { + if o != nil && !IsNil(o.DirectoryGroupUpdatedAt) { + return true + } + + return false +} + +// SetDirectoryGroupUpdatedAt gets a reference to the given int64 and assigns it to the DirectoryGroupUpdatedAt field. +func (o *DirectoryGroup) SetDirectoryGroupUpdatedAt(v int64) { + o.DirectoryGroupUpdatedAt = &v +} + +// GetDirectoryGroupGroupId returns the DirectoryGroupGroupId field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupGroupId() string { + if o == nil || IsNil(o.DirectoryGroupGroupId) { + var ret string + return ret + } + return *o.DirectoryGroupGroupId +} + +// GetDirectoryGroupGroupIdOk returns a tuple with the DirectoryGroupGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupGroupId) { + return nil, false + } + return o.DirectoryGroupGroupId, true +} + +// HasDirectoryGroupGroupId returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupGroupId() bool { + if o != nil && !IsNil(o.DirectoryGroupGroupId) { + return true + } + + return false +} + +// SetDirectoryGroupGroupId gets a reference to the given string and assigns it to the DirectoryGroupGroupId field. +func (o *DirectoryGroup) SetDirectoryGroupGroupId(v string) { + o.DirectoryGroupGroupId = &v +} + +// GetDirectoryGroupUserCount returns the DirectoryGroupUserCount field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupUserCount() int64 { + if o == nil || IsNil(o.DirectoryGroupUserCount) { + var ret int64 + return ret + } + return *o.DirectoryGroupUserCount +} + +// GetDirectoryGroupUserCountOk returns a tuple with the DirectoryGroupUserCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupUserCountOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryGroupUserCount) { + return nil, false + } + return o.DirectoryGroupUserCount, true +} + +// HasDirectoryGroupUserCount returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupUserCount() bool { + if o != nil && !IsNil(o.DirectoryGroupUserCount) { + return true + } + + return false +} + +// SetDirectoryGroupUserCount gets a reference to the given int64 and assigns it to the DirectoryGroupUserCount field. +func (o *DirectoryGroup) SetDirectoryGroupUserCount(v int64) { + o.DirectoryGroupUserCount = &v +} + +// GetDirectoryGroupName returns the DirectoryGroupName field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupName() string { + if o == nil || IsNil(o.DirectoryGroupName) { + var ret string + return ret + } + return *o.DirectoryGroupName +} + +// GetDirectoryGroupNameOk returns a tuple with the DirectoryGroupName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupName) { + return nil, false + } + return o.DirectoryGroupName, true +} + +// HasDirectoryGroupName returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupName() bool { + if o != nil && !IsNil(o.DirectoryGroupName) { + return true + } + + return false +} + +// SetDirectoryGroupName gets a reference to the given string and assigns it to the DirectoryGroupName field. +func (o *DirectoryGroup) SetDirectoryGroupName(v string) { + o.DirectoryGroupName = &v +} + +// GetDirectoryGroupDisplayName returns the DirectoryGroupDisplayName field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupDisplayName() string { + if o == nil || IsNil(o.DirectoryGroupDisplayName) { + var ret string + return ret + } + return *o.DirectoryGroupDisplayName +} + +// GetDirectoryGroupDisplayNameOk returns a tuple with the DirectoryGroupDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupDisplayName) { + return nil, false + } + return o.DirectoryGroupDisplayName, true +} + +// HasDirectoryGroupDisplayName returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupDisplayName() bool { + if o != nil && !IsNil(o.DirectoryGroupDisplayName) { + return true + } + + return false +} + +// SetDirectoryGroupDisplayName gets a reference to the given string and assigns it to the DirectoryGroupDisplayName field. +func (o *DirectoryGroup) SetDirectoryGroupDisplayName(v string) { + o.DirectoryGroupDisplayName = &v +} + +// GetDirectoryGroupDescription returns the DirectoryGroupDescription field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupDescription() string { + if o == nil || IsNil(o.DirectoryGroupDescription) { + var ret string + return ret + } + return *o.DirectoryGroupDescription +} + +// GetDirectoryGroupDescriptionOk returns a tuple with the DirectoryGroupDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupDescription) { + return nil, false + } + return o.DirectoryGroupDescription, true +} + +// HasDirectoryGroupDescription returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupDescription() bool { + if o != nil && !IsNil(o.DirectoryGroupDescription) { + return true + } + + return false +} + +// SetDirectoryGroupDescription gets a reference to the given string and assigns it to the DirectoryGroupDescription field. +func (o *DirectoryGroup) SetDirectoryGroupDescription(v string) { + o.DirectoryGroupDescription = &v +} + +// GetDirectoryGroupEmail returns the DirectoryGroupEmail field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupEmail() string { + if o == nil || IsNil(o.DirectoryGroupEmail) { + var ret string + return ret + } + return *o.DirectoryGroupEmail +} + +// GetDirectoryGroupEmailOk returns a tuple with the DirectoryGroupEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupEmailOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupEmail) { + return nil, false + } + return o.DirectoryGroupEmail, true +} + +// HasDirectoryGroupEmail returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupEmail() bool { + if o != nil && !IsNil(o.DirectoryGroupEmail) { + return true + } + + return false +} + +// SetDirectoryGroupEmail gets a reference to the given string and assigns it to the DirectoryGroupEmail field. +func (o *DirectoryGroup) SetDirectoryGroupEmail(v string) { + o.DirectoryGroupEmail = &v +} + +// GetDirectoryGroupEmailNormalized returns the DirectoryGroupEmailNormalized field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupEmailNormalized() string { + if o == nil || IsNil(o.DirectoryGroupEmailNormalized) { + var ret string + return ret + } + return *o.DirectoryGroupEmailNormalized +} + +// GetDirectoryGroupEmailNormalizedOk returns a tuple with the DirectoryGroupEmailNormalized field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupEmailNormalizedOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryGroupEmailNormalized) { + return nil, false + } + return o.DirectoryGroupEmailNormalized, true +} + +// HasDirectoryGroupEmailNormalized returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupEmailNormalized() bool { + if o != nil && !IsNil(o.DirectoryGroupEmailNormalized) { + return true + } + + return false +} + +// SetDirectoryGroupEmailNormalized gets a reference to the given string and assigns it to the DirectoryGroupEmailNormalized field. +func (o *DirectoryGroup) SetDirectoryGroupEmailNormalized(v string) { + o.DirectoryGroupEmailNormalized = &v +} + +// GetDirectoryGroupAttributes returns the DirectoryGroupAttributes field value if set, zero value otherwise. +func (o *DirectoryGroup) GetDirectoryGroupAttributes() map[string]string { + if o == nil || IsNil(o.DirectoryGroupAttributes) { + var ret map[string]string + return ret + } + return *o.DirectoryGroupAttributes +} + +// GetDirectoryGroupAttributesOk returns a tuple with the DirectoryGroupAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryGroup) GetDirectoryGroupAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.DirectoryGroupAttributes) { + return nil, false + } + return o.DirectoryGroupAttributes, true +} + +// HasDirectoryGroupAttributes returns a boolean if a field has been set. +func (o *DirectoryGroup) HasDirectoryGroupAttributes() bool { + if o != nil && !IsNil(o.DirectoryGroupAttributes) { + return true + } + + return false +} + +// SetDirectoryGroupAttributes gets a reference to the given map[string]string and assigns it to the DirectoryGroupAttributes field. +func (o *DirectoryGroup) SetDirectoryGroupAttributes(v map[string]string) { + o.DirectoryGroupAttributes = &v +} + +func (o DirectoryGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DirectoryGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.DirectoryGroupId) { + toSerialize["directory_group_id"] = o.DirectoryGroupId + } + if !IsNil(o.DirectoryGroupOrganizationId) { + toSerialize["directory_group_organization_id"] = o.DirectoryGroupOrganizationId + } + if !IsNil(o.DirectoryGroupSiteId) { + toSerialize["directory_group_site_id"] = o.DirectoryGroupSiteId + } + if !IsNil(o.DirectoryGroupSourceId) { + toSerialize["directory_group_source_id"] = o.DirectoryGroupSourceId + } + if !IsNil(o.DirectoryGroupCreatedAt) { + toSerialize["directory_group_created_at"] = o.DirectoryGroupCreatedAt + } + if !IsNil(o.DirectoryGroupUpdatedAt) { + toSerialize["directory_group_updated_at"] = o.DirectoryGroupUpdatedAt + } + if !IsNil(o.DirectoryGroupGroupId) { + toSerialize["directory_group_group_id"] = o.DirectoryGroupGroupId + } + if !IsNil(o.DirectoryGroupUserCount) { + toSerialize["directory_group_user_count"] = o.DirectoryGroupUserCount + } + if !IsNil(o.DirectoryGroupName) { + toSerialize["directory_group_name"] = o.DirectoryGroupName + } + if !IsNil(o.DirectoryGroupDisplayName) { + toSerialize["directory_group_display_name"] = o.DirectoryGroupDisplayName + } + if !IsNil(o.DirectoryGroupDescription) { + toSerialize["directory_group_description"] = o.DirectoryGroupDescription + } + if !IsNil(o.DirectoryGroupEmail) { + toSerialize["directory_group_email"] = o.DirectoryGroupEmail + } + if !IsNil(o.DirectoryGroupEmailNormalized) { + toSerialize["directory_group_email_normalized"] = o.DirectoryGroupEmailNormalized + } + if !IsNil(o.DirectoryGroupAttributes) { + toSerialize["directory_group_attributes"] = o.DirectoryGroupAttributes + } + return toSerialize, nil +} + +func (o *DirectoryGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDirectoryGroup := _DirectoryGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDirectoryGroup) + + if err != nil { + return err + } + + *o = DirectoryGroup(varDirectoryGroup) + + return err +} + +type NullableDirectoryGroup struct { + value *DirectoryGroup + isSet bool +} + +func (v NullableDirectoryGroup) Get() *DirectoryGroup { + return v.value +} + +func (v *NullableDirectoryGroup) Set(val *DirectoryGroup) { + v.value = val + v.isSet = true +} + +func (v NullableDirectoryGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableDirectoryGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDirectoryGroup(val *DirectoryGroup) *NullableDirectoryGroup { + return &NullableDirectoryGroup{value: val, isSet: true} +} + +func (v NullableDirectoryGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDirectoryGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_directory_user.go b/go/model_directory_user.go new file mode 100644 index 0000000..e692703 --- /dev/null +++ b/go/model_directory_user.go @@ -0,0 +1,879 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DirectoryUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DirectoryUser{} + +// DirectoryUser struct for DirectoryUser +type DirectoryUser struct { + Id string `json:"id"` + DirectoryUserId *string `json:"directory_user_id,omitempty"` + DirectoryUserOrganizationId *string `json:"directory_user_organization_id,omitempty"` + DirectoryUserSiteId *string `json:"directory_user_site_id,omitempty"` + DirectoryUserSourceId *int32 `json:"directory_user_source_id,omitempty"` + DirectoryUserCreatedAt *int64 `json:"directory_user_created_at,omitempty"` + DirectoryUserUpdatedAt *int64 `json:"directory_user_updated_at,omitempty"` + DirectoryUserUserId *string `json:"directory_user_user_id,omitempty"` + DirectoryUserGroupIds []string `json:"directory_user_group_ids,omitempty"` + DirectoryUserDisplayName *string `json:"directory_user_display_name,omitempty"` + DirectoryUserName *string `json:"directory_user_name,omitempty"` + DirectoryUserFirstName *string `json:"directory_user_first_name,omitempty"` + DirectoryUserLastName *string `json:"directory_user_last_name,omitempty"` + DirectoryUserDescription *string `json:"directory_user_description,omitempty"` + DirectoryUserEmail *string `json:"directory_user_email,omitempty"` + DirectoryUserEmailNormalized *string `json:"directory_user_email_normalized,omitempty"` + DirectoryUserPhone *string `json:"directory_user_phone,omitempty"` + DirectoryUserTitle *string `json:"directory_user_title,omitempty"` + DirectoryUserLocation *string `json:"directory_user_location,omitempty"` + DirectoryUserLastLogonAt *int64 `json:"directory_user_last_logon_at,omitempty"` + DirectoryUserAttributes *map[string]string `json:"directory_user_attributes,omitempty"` +} + +type _DirectoryUser DirectoryUser + +// NewDirectoryUser instantiates a new DirectoryUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDirectoryUser(id string) *DirectoryUser { + this := DirectoryUser{} + this.Id = id + return &this +} + +// NewDirectoryUserWithDefaults instantiates a new DirectoryUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDirectoryUserWithDefaults() *DirectoryUser { + this := DirectoryUser{} + return &this +} + +// GetId returns the Id field value +func (o *DirectoryUser) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DirectoryUser) SetId(v string) { + o.Id = v +} + +// GetDirectoryUserId returns the DirectoryUserId field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserId() string { + if o == nil || IsNil(o.DirectoryUserId) { + var ret string + return ret + } + return *o.DirectoryUserId +} + +// GetDirectoryUserIdOk returns a tuple with the DirectoryUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserId) { + return nil, false + } + return o.DirectoryUserId, true +} + +// HasDirectoryUserId returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserId() bool { + if o != nil && !IsNil(o.DirectoryUserId) { + return true + } + + return false +} + +// SetDirectoryUserId gets a reference to the given string and assigns it to the DirectoryUserId field. +func (o *DirectoryUser) SetDirectoryUserId(v string) { + o.DirectoryUserId = &v +} + +// GetDirectoryUserOrganizationId returns the DirectoryUserOrganizationId field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserOrganizationId() string { + if o == nil || IsNil(o.DirectoryUserOrganizationId) { + var ret string + return ret + } + return *o.DirectoryUserOrganizationId +} + +// GetDirectoryUserOrganizationIdOk returns a tuple with the DirectoryUserOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserOrganizationId) { + return nil, false + } + return o.DirectoryUserOrganizationId, true +} + +// HasDirectoryUserOrganizationId returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserOrganizationId() bool { + if o != nil && !IsNil(o.DirectoryUserOrganizationId) { + return true + } + + return false +} + +// SetDirectoryUserOrganizationId gets a reference to the given string and assigns it to the DirectoryUserOrganizationId field. +func (o *DirectoryUser) SetDirectoryUserOrganizationId(v string) { + o.DirectoryUserOrganizationId = &v +} + +// GetDirectoryUserSiteId returns the DirectoryUserSiteId field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserSiteId() string { + if o == nil || IsNil(o.DirectoryUserSiteId) { + var ret string + return ret + } + return *o.DirectoryUserSiteId +} + +// GetDirectoryUserSiteIdOk returns a tuple with the DirectoryUserSiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserSiteId) { + return nil, false + } + return o.DirectoryUserSiteId, true +} + +// HasDirectoryUserSiteId returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserSiteId() bool { + if o != nil && !IsNil(o.DirectoryUserSiteId) { + return true + } + + return false +} + +// SetDirectoryUserSiteId gets a reference to the given string and assigns it to the DirectoryUserSiteId field. +func (o *DirectoryUser) SetDirectoryUserSiteId(v string) { + o.DirectoryUserSiteId = &v +} + +// GetDirectoryUserSourceId returns the DirectoryUserSourceId field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserSourceId() int32 { + if o == nil || IsNil(o.DirectoryUserSourceId) { + var ret int32 + return ret + } + return *o.DirectoryUserSourceId +} + +// GetDirectoryUserSourceIdOk returns a tuple with the DirectoryUserSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.DirectoryUserSourceId) { + return nil, false + } + return o.DirectoryUserSourceId, true +} + +// HasDirectoryUserSourceId returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserSourceId() bool { + if o != nil && !IsNil(o.DirectoryUserSourceId) { + return true + } + + return false +} + +// SetDirectoryUserSourceId gets a reference to the given int32 and assigns it to the DirectoryUserSourceId field. +func (o *DirectoryUser) SetDirectoryUserSourceId(v int32) { + o.DirectoryUserSourceId = &v +} + +// GetDirectoryUserCreatedAt returns the DirectoryUserCreatedAt field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserCreatedAt() int64 { + if o == nil || IsNil(o.DirectoryUserCreatedAt) { + var ret int64 + return ret + } + return *o.DirectoryUserCreatedAt +} + +// GetDirectoryUserCreatedAtOk returns a tuple with the DirectoryUserCreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryUserCreatedAt) { + return nil, false + } + return o.DirectoryUserCreatedAt, true +} + +// HasDirectoryUserCreatedAt returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserCreatedAt() bool { + if o != nil && !IsNil(o.DirectoryUserCreatedAt) { + return true + } + + return false +} + +// SetDirectoryUserCreatedAt gets a reference to the given int64 and assigns it to the DirectoryUserCreatedAt field. +func (o *DirectoryUser) SetDirectoryUserCreatedAt(v int64) { + o.DirectoryUserCreatedAt = &v +} + +// GetDirectoryUserUpdatedAt returns the DirectoryUserUpdatedAt field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserUpdatedAt() int64 { + if o == nil || IsNil(o.DirectoryUserUpdatedAt) { + var ret int64 + return ret + } + return *o.DirectoryUserUpdatedAt +} + +// GetDirectoryUserUpdatedAtOk returns a tuple with the DirectoryUserUpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryUserUpdatedAt) { + return nil, false + } + return o.DirectoryUserUpdatedAt, true +} + +// HasDirectoryUserUpdatedAt returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserUpdatedAt() bool { + if o != nil && !IsNil(o.DirectoryUserUpdatedAt) { + return true + } + + return false +} + +// SetDirectoryUserUpdatedAt gets a reference to the given int64 and assigns it to the DirectoryUserUpdatedAt field. +func (o *DirectoryUser) SetDirectoryUserUpdatedAt(v int64) { + o.DirectoryUserUpdatedAt = &v +} + +// GetDirectoryUserUserId returns the DirectoryUserUserId field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserUserId() string { + if o == nil || IsNil(o.DirectoryUserUserId) { + var ret string + return ret + } + return *o.DirectoryUserUserId +} + +// GetDirectoryUserUserIdOk returns a tuple with the DirectoryUserUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserUserIdOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserUserId) { + return nil, false + } + return o.DirectoryUserUserId, true +} + +// HasDirectoryUserUserId returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserUserId() bool { + if o != nil && !IsNil(o.DirectoryUserUserId) { + return true + } + + return false +} + +// SetDirectoryUserUserId gets a reference to the given string and assigns it to the DirectoryUserUserId field. +func (o *DirectoryUser) SetDirectoryUserUserId(v string) { + o.DirectoryUserUserId = &v +} + +// GetDirectoryUserGroupIds returns the DirectoryUserGroupIds field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserGroupIds() []string { + if o == nil || IsNil(o.DirectoryUserGroupIds) { + var ret []string + return ret + } + return o.DirectoryUserGroupIds +} + +// GetDirectoryUserGroupIdsOk returns a tuple with the DirectoryUserGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserGroupIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DirectoryUserGroupIds) { + return nil, false + } + return o.DirectoryUserGroupIds, true +} + +// HasDirectoryUserGroupIds returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserGroupIds() bool { + if o != nil && !IsNil(o.DirectoryUserGroupIds) { + return true + } + + return false +} + +// SetDirectoryUserGroupIds gets a reference to the given []string and assigns it to the DirectoryUserGroupIds field. +func (o *DirectoryUser) SetDirectoryUserGroupIds(v []string) { + o.DirectoryUserGroupIds = v +} + +// GetDirectoryUserDisplayName returns the DirectoryUserDisplayName field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserDisplayName() string { + if o == nil || IsNil(o.DirectoryUserDisplayName) { + var ret string + return ret + } + return *o.DirectoryUserDisplayName +} + +// GetDirectoryUserDisplayNameOk returns a tuple with the DirectoryUserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserDisplayName) { + return nil, false + } + return o.DirectoryUserDisplayName, true +} + +// HasDirectoryUserDisplayName returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserDisplayName() bool { + if o != nil && !IsNil(o.DirectoryUserDisplayName) { + return true + } + + return false +} + +// SetDirectoryUserDisplayName gets a reference to the given string and assigns it to the DirectoryUserDisplayName field. +func (o *DirectoryUser) SetDirectoryUserDisplayName(v string) { + o.DirectoryUserDisplayName = &v +} + +// GetDirectoryUserName returns the DirectoryUserName field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserName() string { + if o == nil || IsNil(o.DirectoryUserName) { + var ret string + return ret + } + return *o.DirectoryUserName +} + +// GetDirectoryUserNameOk returns a tuple with the DirectoryUserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserName) { + return nil, false + } + return o.DirectoryUserName, true +} + +// HasDirectoryUserName returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserName() bool { + if o != nil && !IsNil(o.DirectoryUserName) { + return true + } + + return false +} + +// SetDirectoryUserName gets a reference to the given string and assigns it to the DirectoryUserName field. +func (o *DirectoryUser) SetDirectoryUserName(v string) { + o.DirectoryUserName = &v +} + +// GetDirectoryUserFirstName returns the DirectoryUserFirstName field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserFirstName() string { + if o == nil || IsNil(o.DirectoryUserFirstName) { + var ret string + return ret + } + return *o.DirectoryUserFirstName +} + +// GetDirectoryUserFirstNameOk returns a tuple with the DirectoryUserFirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserFirstName) { + return nil, false + } + return o.DirectoryUserFirstName, true +} + +// HasDirectoryUserFirstName returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserFirstName() bool { + if o != nil && !IsNil(o.DirectoryUserFirstName) { + return true + } + + return false +} + +// SetDirectoryUserFirstName gets a reference to the given string and assigns it to the DirectoryUserFirstName field. +func (o *DirectoryUser) SetDirectoryUserFirstName(v string) { + o.DirectoryUserFirstName = &v +} + +// GetDirectoryUserLastName returns the DirectoryUserLastName field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserLastName() string { + if o == nil || IsNil(o.DirectoryUserLastName) { + var ret string + return ret + } + return *o.DirectoryUserLastName +} + +// GetDirectoryUserLastNameOk returns a tuple with the DirectoryUserLastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserLastNameOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserLastName) { + return nil, false + } + return o.DirectoryUserLastName, true +} + +// HasDirectoryUserLastName returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserLastName() bool { + if o != nil && !IsNil(o.DirectoryUserLastName) { + return true + } + + return false +} + +// SetDirectoryUserLastName gets a reference to the given string and assigns it to the DirectoryUserLastName field. +func (o *DirectoryUser) SetDirectoryUserLastName(v string) { + o.DirectoryUserLastName = &v +} + +// GetDirectoryUserDescription returns the DirectoryUserDescription field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserDescription() string { + if o == nil || IsNil(o.DirectoryUserDescription) { + var ret string + return ret + } + return *o.DirectoryUserDescription +} + +// GetDirectoryUserDescriptionOk returns a tuple with the DirectoryUserDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserDescription) { + return nil, false + } + return o.DirectoryUserDescription, true +} + +// HasDirectoryUserDescription returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserDescription() bool { + if o != nil && !IsNil(o.DirectoryUserDescription) { + return true + } + + return false +} + +// SetDirectoryUserDescription gets a reference to the given string and assigns it to the DirectoryUserDescription field. +func (o *DirectoryUser) SetDirectoryUserDescription(v string) { + o.DirectoryUserDescription = &v +} + +// GetDirectoryUserEmail returns the DirectoryUserEmail field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserEmail() string { + if o == nil || IsNil(o.DirectoryUserEmail) { + var ret string + return ret + } + return *o.DirectoryUserEmail +} + +// GetDirectoryUserEmailOk returns a tuple with the DirectoryUserEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserEmailOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserEmail) { + return nil, false + } + return o.DirectoryUserEmail, true +} + +// HasDirectoryUserEmail returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserEmail() bool { + if o != nil && !IsNil(o.DirectoryUserEmail) { + return true + } + + return false +} + +// SetDirectoryUserEmail gets a reference to the given string and assigns it to the DirectoryUserEmail field. +func (o *DirectoryUser) SetDirectoryUserEmail(v string) { + o.DirectoryUserEmail = &v +} + +// GetDirectoryUserEmailNormalized returns the DirectoryUserEmailNormalized field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserEmailNormalized() string { + if o == nil || IsNil(o.DirectoryUserEmailNormalized) { + var ret string + return ret + } + return *o.DirectoryUserEmailNormalized +} + +// GetDirectoryUserEmailNormalizedOk returns a tuple with the DirectoryUserEmailNormalized field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserEmailNormalizedOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserEmailNormalized) { + return nil, false + } + return o.DirectoryUserEmailNormalized, true +} + +// HasDirectoryUserEmailNormalized returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserEmailNormalized() bool { + if o != nil && !IsNil(o.DirectoryUserEmailNormalized) { + return true + } + + return false +} + +// SetDirectoryUserEmailNormalized gets a reference to the given string and assigns it to the DirectoryUserEmailNormalized field. +func (o *DirectoryUser) SetDirectoryUserEmailNormalized(v string) { + o.DirectoryUserEmailNormalized = &v +} + +// GetDirectoryUserPhone returns the DirectoryUserPhone field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserPhone() string { + if o == nil || IsNil(o.DirectoryUserPhone) { + var ret string + return ret + } + return *o.DirectoryUserPhone +} + +// GetDirectoryUserPhoneOk returns a tuple with the DirectoryUserPhone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserPhoneOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserPhone) { + return nil, false + } + return o.DirectoryUserPhone, true +} + +// HasDirectoryUserPhone returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserPhone() bool { + if o != nil && !IsNil(o.DirectoryUserPhone) { + return true + } + + return false +} + +// SetDirectoryUserPhone gets a reference to the given string and assigns it to the DirectoryUserPhone field. +func (o *DirectoryUser) SetDirectoryUserPhone(v string) { + o.DirectoryUserPhone = &v +} + +// GetDirectoryUserTitle returns the DirectoryUserTitle field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserTitle() string { + if o == nil || IsNil(o.DirectoryUserTitle) { + var ret string + return ret + } + return *o.DirectoryUserTitle +} + +// GetDirectoryUserTitleOk returns a tuple with the DirectoryUserTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserTitleOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserTitle) { + return nil, false + } + return o.DirectoryUserTitle, true +} + +// HasDirectoryUserTitle returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserTitle() bool { + if o != nil && !IsNil(o.DirectoryUserTitle) { + return true + } + + return false +} + +// SetDirectoryUserTitle gets a reference to the given string and assigns it to the DirectoryUserTitle field. +func (o *DirectoryUser) SetDirectoryUserTitle(v string) { + o.DirectoryUserTitle = &v +} + +// GetDirectoryUserLocation returns the DirectoryUserLocation field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserLocation() string { + if o == nil || IsNil(o.DirectoryUserLocation) { + var ret string + return ret + } + return *o.DirectoryUserLocation +} + +// GetDirectoryUserLocationOk returns a tuple with the DirectoryUserLocation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserLocationOk() (*string, bool) { + if o == nil || IsNil(o.DirectoryUserLocation) { + return nil, false + } + return o.DirectoryUserLocation, true +} + +// HasDirectoryUserLocation returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserLocation() bool { + if o != nil && !IsNil(o.DirectoryUserLocation) { + return true + } + + return false +} + +// SetDirectoryUserLocation gets a reference to the given string and assigns it to the DirectoryUserLocation field. +func (o *DirectoryUser) SetDirectoryUserLocation(v string) { + o.DirectoryUserLocation = &v +} + +// GetDirectoryUserLastLogonAt returns the DirectoryUserLastLogonAt field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserLastLogonAt() int64 { + if o == nil || IsNil(o.DirectoryUserLastLogonAt) { + var ret int64 + return ret + } + return *o.DirectoryUserLastLogonAt +} + +// GetDirectoryUserLastLogonAtOk returns a tuple with the DirectoryUserLastLogonAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserLastLogonAtOk() (*int64, bool) { + if o == nil || IsNil(o.DirectoryUserLastLogonAt) { + return nil, false + } + return o.DirectoryUserLastLogonAt, true +} + +// HasDirectoryUserLastLogonAt returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserLastLogonAt() bool { + if o != nil && !IsNil(o.DirectoryUserLastLogonAt) { + return true + } + + return false +} + +// SetDirectoryUserLastLogonAt gets a reference to the given int64 and assigns it to the DirectoryUserLastLogonAt field. +func (o *DirectoryUser) SetDirectoryUserLastLogonAt(v int64) { + o.DirectoryUserLastLogonAt = &v +} + +// GetDirectoryUserAttributes returns the DirectoryUserAttributes field value if set, zero value otherwise. +func (o *DirectoryUser) GetDirectoryUserAttributes() map[string]string { + if o == nil || IsNil(o.DirectoryUserAttributes) { + var ret map[string]string + return ret + } + return *o.DirectoryUserAttributes +} + +// GetDirectoryUserAttributesOk returns a tuple with the DirectoryUserAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DirectoryUser) GetDirectoryUserAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.DirectoryUserAttributes) { + return nil, false + } + return o.DirectoryUserAttributes, true +} + +// HasDirectoryUserAttributes returns a boolean if a field has been set. +func (o *DirectoryUser) HasDirectoryUserAttributes() bool { + if o != nil && !IsNil(o.DirectoryUserAttributes) { + return true + } + + return false +} + +// SetDirectoryUserAttributes gets a reference to the given map[string]string and assigns it to the DirectoryUserAttributes field. +func (o *DirectoryUser) SetDirectoryUserAttributes(v map[string]string) { + o.DirectoryUserAttributes = &v +} + +func (o DirectoryUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DirectoryUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.DirectoryUserId) { + toSerialize["directory_user_id"] = o.DirectoryUserId + } + if !IsNil(o.DirectoryUserOrganizationId) { + toSerialize["directory_user_organization_id"] = o.DirectoryUserOrganizationId + } + if !IsNil(o.DirectoryUserSiteId) { + toSerialize["directory_user_site_id"] = o.DirectoryUserSiteId + } + if !IsNil(o.DirectoryUserSourceId) { + toSerialize["directory_user_source_id"] = o.DirectoryUserSourceId + } + if !IsNil(o.DirectoryUserCreatedAt) { + toSerialize["directory_user_created_at"] = o.DirectoryUserCreatedAt + } + if !IsNil(o.DirectoryUserUpdatedAt) { + toSerialize["directory_user_updated_at"] = o.DirectoryUserUpdatedAt + } + if !IsNil(o.DirectoryUserUserId) { + toSerialize["directory_user_user_id"] = o.DirectoryUserUserId + } + if !IsNil(o.DirectoryUserGroupIds) { + toSerialize["directory_user_group_ids"] = o.DirectoryUserGroupIds + } + if !IsNil(o.DirectoryUserDisplayName) { + toSerialize["directory_user_display_name"] = o.DirectoryUserDisplayName + } + if !IsNil(o.DirectoryUserName) { + toSerialize["directory_user_name"] = o.DirectoryUserName + } + if !IsNil(o.DirectoryUserFirstName) { + toSerialize["directory_user_first_name"] = o.DirectoryUserFirstName + } + if !IsNil(o.DirectoryUserLastName) { + toSerialize["directory_user_last_name"] = o.DirectoryUserLastName + } + if !IsNil(o.DirectoryUserDescription) { + toSerialize["directory_user_description"] = o.DirectoryUserDescription + } + if !IsNil(o.DirectoryUserEmail) { + toSerialize["directory_user_email"] = o.DirectoryUserEmail + } + if !IsNil(o.DirectoryUserEmailNormalized) { + toSerialize["directory_user_email_normalized"] = o.DirectoryUserEmailNormalized + } + if !IsNil(o.DirectoryUserPhone) { + toSerialize["directory_user_phone"] = o.DirectoryUserPhone + } + if !IsNil(o.DirectoryUserTitle) { + toSerialize["directory_user_title"] = o.DirectoryUserTitle + } + if !IsNil(o.DirectoryUserLocation) { + toSerialize["directory_user_location"] = o.DirectoryUserLocation + } + if !IsNil(o.DirectoryUserLastLogonAt) { + toSerialize["directory_user_last_logon_at"] = o.DirectoryUserLastLogonAt + } + if !IsNil(o.DirectoryUserAttributes) { + toSerialize["directory_user_attributes"] = o.DirectoryUserAttributes + } + return toSerialize, nil +} + +func (o *DirectoryUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDirectoryUser := _DirectoryUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDirectoryUser) + + if err != nil { + return err + } + + *o = DirectoryUser(varDirectoryUser) + + return err +} + +type NullableDirectoryUser struct { + value *DirectoryUser + isSet bool +} + +func (v NullableDirectoryUser) Get() *DirectoryUser { + return v.value +} + +func (v *NullableDirectoryUser) Set(val *DirectoryUser) { + v.value = val + v.isSet = true +} + +func (v NullableDirectoryUser) IsSet() bool { + return v.isSet +} + +func (v *NullableDirectoryUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDirectoryUser(val *DirectoryUser) *NullableDirectoryUser { + return &NullableDirectoryUser{value: val, isSet: true} +} + +func (v NullableDirectoryUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDirectoryUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_event.go b/go/model_event.go new file mode 100644 index 0000000..3ad141c --- /dev/null +++ b/go/model_event.go @@ -0,0 +1,703 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Event type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Event{} + +// Event struct for Event +type Event struct { + Id *string `json:"id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + Action *string `json:"action,omitempty"` + SourceId *string `json:"source_id,omitempty"` + SourceName *string `json:"source_name,omitempty"` + SourceType *string `json:"source_type,omitempty"` + TargetId *string `json:"target_id,omitempty"` + TargetName *string `json:"target_name,omitempty"` + TargetType *string `json:"target_type,omitempty"` + Success *bool `json:"success,omitempty"` + Details map[string]interface{} `json:"details,omitempty"` + State *string `json:"state,omitempty"` + ProcessorId *string `json:"processor_id,omitempty"` + ProcessedAt *int64 `json:"processed_at,omitempty"` +} + +// NewEvent instantiates a new Event object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvent() *Event { + this := Event{} + return &this +} + +// NewEventWithDefaults instantiates a new Event object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventWithDefaults() *Event { + this := Event{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Event) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Event) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Event) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Event) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Event) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Event) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *Event) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *Event) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *Event) SetClientId(v string) { + o.ClientId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *Event) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *Event) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *Event) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *Event) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *Event) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *Event) SetSiteId(v string) { + o.SiteId = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *Event) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *Event) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *Event) SetAction(v string) { + o.Action = &v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *Event) GetSourceId() string { + if o == nil || IsNil(o.SourceId) { + var ret string + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *Event) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given string and assigns it to the SourceId field. +func (o *Event) SetSourceId(v string) { + o.SourceId = &v +} + +// GetSourceName returns the SourceName field value if set, zero value otherwise. +func (o *Event) GetSourceName() string { + if o == nil || IsNil(o.SourceName) { + var ret string + return ret + } + return *o.SourceName +} + +// GetSourceNameOk returns a tuple with the SourceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSourceNameOk() (*string, bool) { + if o == nil || IsNil(o.SourceName) { + return nil, false + } + return o.SourceName, true +} + +// HasSourceName returns a boolean if a field has been set. +func (o *Event) HasSourceName() bool { + if o != nil && !IsNil(o.SourceName) { + return true + } + + return false +} + +// SetSourceName gets a reference to the given string and assigns it to the SourceName field. +func (o *Event) SetSourceName(v string) { + o.SourceName = &v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *Event) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *Event) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *Event) SetSourceType(v string) { + o.SourceType = &v +} + +// GetTargetId returns the TargetId field value if set, zero value otherwise. +func (o *Event) GetTargetId() string { + if o == nil || IsNil(o.TargetId) { + var ret string + return ret + } + return *o.TargetId +} + +// GetTargetIdOk returns a tuple with the TargetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetTargetIdOk() (*string, bool) { + if o == nil || IsNil(o.TargetId) { + return nil, false + } + return o.TargetId, true +} + +// HasTargetId returns a boolean if a field has been set. +func (o *Event) HasTargetId() bool { + if o != nil && !IsNil(o.TargetId) { + return true + } + + return false +} + +// SetTargetId gets a reference to the given string and assigns it to the TargetId field. +func (o *Event) SetTargetId(v string) { + o.TargetId = &v +} + +// GetTargetName returns the TargetName field value if set, zero value otherwise. +func (o *Event) GetTargetName() string { + if o == nil || IsNil(o.TargetName) { + var ret string + return ret + } + return *o.TargetName +} + +// GetTargetNameOk returns a tuple with the TargetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetTargetNameOk() (*string, bool) { + if o == nil || IsNil(o.TargetName) { + return nil, false + } + return o.TargetName, true +} + +// HasTargetName returns a boolean if a field has been set. +func (o *Event) HasTargetName() bool { + if o != nil && !IsNil(o.TargetName) { + return true + } + + return false +} + +// SetTargetName gets a reference to the given string and assigns it to the TargetName field. +func (o *Event) SetTargetName(v string) { + o.TargetName = &v +} + +// GetTargetType returns the TargetType field value if set, zero value otherwise. +func (o *Event) GetTargetType() string { + if o == nil || IsNil(o.TargetType) { + var ret string + return ret + } + return *o.TargetType +} + +// GetTargetTypeOk returns a tuple with the TargetType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetTargetTypeOk() (*string, bool) { + if o == nil || IsNil(o.TargetType) { + return nil, false + } + return o.TargetType, true +} + +// HasTargetType returns a boolean if a field has been set. +func (o *Event) HasTargetType() bool { + if o != nil && !IsNil(o.TargetType) { + return true + } + + return false +} + +// SetTargetType gets a reference to the given string and assigns it to the TargetType field. +func (o *Event) SetTargetType(v string) { + o.TargetType = &v +} + +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *Event) GetSuccess() bool { + if o == nil || IsNil(o.Success) { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSuccessOk() (*bool, bool) { + if o == nil || IsNil(o.Success) { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *Event) HasSuccess() bool { + if o != nil && !IsNil(o.Success) { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *Event) SetSuccess(v bool) { + o.Success = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Event) GetDetails() map[string]interface{} { + if o == nil || IsNil(o.Details) { + var ret map[string]interface{} + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Details) { + return map[string]interface{}{}, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Event) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. +func (o *Event) SetDetails(v map[string]interface{}) { + o.Details = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *Event) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *Event) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *Event) SetState(v string) { + o.State = &v +} + +// GetProcessorId returns the ProcessorId field value if set, zero value otherwise. +func (o *Event) GetProcessorId() string { + if o == nil || IsNil(o.ProcessorId) { + var ret string + return ret + } + return *o.ProcessorId +} + +// GetProcessorIdOk returns a tuple with the ProcessorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetProcessorIdOk() (*string, bool) { + if o == nil || IsNil(o.ProcessorId) { + return nil, false + } + return o.ProcessorId, true +} + +// HasProcessorId returns a boolean if a field has been set. +func (o *Event) HasProcessorId() bool { + if o != nil && !IsNil(o.ProcessorId) { + return true + } + + return false +} + +// SetProcessorId gets a reference to the given string and assigns it to the ProcessorId field. +func (o *Event) SetProcessorId(v string) { + o.ProcessorId = &v +} + +// GetProcessedAt returns the ProcessedAt field value if set, zero value otherwise. +func (o *Event) GetProcessedAt() int64 { + if o == nil || IsNil(o.ProcessedAt) { + var ret int64 + return ret + } + return *o.ProcessedAt +} + +// GetProcessedAtOk returns a tuple with the ProcessedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetProcessedAtOk() (*int64, bool) { + if o == nil || IsNil(o.ProcessedAt) { + return nil, false + } + return o.ProcessedAt, true +} + +// HasProcessedAt returns a boolean if a field has been set. +func (o *Event) HasProcessedAt() bool { + if o != nil && !IsNil(o.ProcessedAt) { + return true + } + + return false +} + +// SetProcessedAt gets a reference to the given int64 and assigns it to the ProcessedAt field. +func (o *Event) SetProcessedAt(v int64) { + o.ProcessedAt = &v +} + +func (o Event) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Event) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.SourceName) { + toSerialize["source_name"] = o.SourceName + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + if !IsNil(o.TargetId) { + toSerialize["target_id"] = o.TargetId + } + if !IsNil(o.TargetName) { + toSerialize["target_name"] = o.TargetName + } + if !IsNil(o.TargetType) { + toSerialize["target_type"] = o.TargetType + } + if !IsNil(o.Success) { + toSerialize["success"] = o.Success + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.ProcessorId) { + toSerialize["processor_id"] = o.ProcessorId + } + if !IsNil(o.ProcessedAt) { + toSerialize["processed_at"] = o.ProcessedAt + } + return toSerialize, nil +} + +type NullableEvent struct { + value *Event + isSet bool +} + +func (v NullableEvent) Get() *Event { + return v.value +} + +func (v *NullableEvent) Set(val *Event) { + v.value = val + v.isSet = true +} + +func (v NullableEvent) IsSet() bool { + return v.isSet +} + +func (v *NullableEvent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvent(val *Event) *NullableEvent { + return &NullableEvent{value: val, isSet: true} +} + +func (v NullableEvent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_event_export_response.go b/go/model_event_export_response.go new file mode 100644 index 0000000..b6d96ab --- /dev/null +++ b/go/model_event_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// EventExportResponse - Response body for the event export endpoint. Bare array unless `page_size` is provided. +type EventExportResponse struct { + EventPage *EventPage + ArrayOfEvent *[]Event +} + +// EventPageAsEventExportResponse is a convenience function that returns EventPage wrapped in EventExportResponse +func EventPageAsEventExportResponse(v *EventPage) EventExportResponse { + return EventExportResponse{ + EventPage: v, + } +} + +// []EventAsEventExportResponse is a convenience function that returns []Event wrapped in EventExportResponse +func ArrayOfEventAsEventExportResponse(v *[]Event) EventExportResponse { + return EventExportResponse{ + ArrayOfEvent: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *EventExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EventPage + err = newStrictDecoder(data).Decode(&dst.EventPage) + if err == nil { + jsonEventPage, _ := json.Marshal(dst.EventPage) + if string(jsonEventPage) == "{}" { // empty struct + dst.EventPage = nil + } else { + if err = validator.Validate(dst.EventPage); err != nil { + dst.EventPage = nil + } else { + match++ + } + } + } else { + dst.EventPage = nil + } + + // try to unmarshal data into ArrayOfEvent + err = newStrictDecoder(data).Decode(&dst.ArrayOfEvent) + if err == nil { + jsonArrayOfEvent, _ := json.Marshal(dst.ArrayOfEvent) + if string(jsonArrayOfEvent) == "{}" { // empty struct + dst.ArrayOfEvent = nil + } else { + if err = validator.Validate(dst.ArrayOfEvent); err != nil { + dst.ArrayOfEvent = nil + } else { + match++ + } + } + } else { + dst.ArrayOfEvent = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.EventPage = nil + dst.ArrayOfEvent = nil + + return fmt.Errorf("data matches more than one schema in oneOf(EventExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(EventExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src EventExportResponse) MarshalJSON() ([]byte, error) { + if src.EventPage != nil { + return json.Marshal(&src.EventPage) + } + + if src.ArrayOfEvent != nil { + return json.Marshal(&src.ArrayOfEvent) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *EventExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.EventPage != nil { + return obj.EventPage + } + + if obj.ArrayOfEvent != nil { + return obj.ArrayOfEvent + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj EventExportResponse) GetActualInstanceValue() (interface{}) { + if obj.EventPage != nil { + return *obj.EventPage + } + + if obj.ArrayOfEvent != nil { + return *obj.ArrayOfEvent + } + + // all schemas are nil + return nil +} + +type NullableEventExportResponse struct { + value *EventExportResponse + isSet bool +} + +func (v NullableEventExportResponse) Get() *EventExportResponse { + return v.value +} + +func (v *NullableEventExportResponse) Set(val *EventExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEventExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEventExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventExportResponse(val *EventExportResponse) *NullableEventExportResponse { + return &NullableEventExportResponse{value: val, isSet: true} +} + +func (v NullableEventExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_event_page.go b/go/model_event_page.go new file mode 100644 index 0000000..eaf011e --- /dev/null +++ b/go/model_event_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the EventPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventPage{} + +// EventPage A page of events returned from a paginated export. +type EventPage struct { + Events []Event `json:"events,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewEventPage instantiates a new EventPage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventPage() *EventPage { + this := EventPage{} + return &this +} + +// NewEventPageWithDefaults instantiates a new EventPage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventPageWithDefaults() *EventPage { + this := EventPage{} + return &this +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *EventPage) GetEvents() []Event { + if o == nil || IsNil(o.Events) { + var ret []Event + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventPage) GetEventsOk() ([]Event, bool) { + if o == nil || IsNil(o.Events) { + return nil, false + } + return o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *EventPage) HasEvents() bool { + if o != nil && !IsNil(o.Events) { + return true + } + + return false +} + +// SetEvents gets a reference to the given []Event and assigns it to the Events field. +func (o *EventPage) SetEvents(v []Event) { + o.Events = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *EventPage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventPage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *EventPage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *EventPage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o EventPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Events) { + toSerialize["events"] = o.Events + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableEventPage struct { + value *EventPage + isSet bool +} + +func (v NullableEventPage) Get() *EventPage { + return v.value +} + +func (v *NullableEventPage) Set(val *EventPage) { + v.value = val + v.isSet = true +} + +func (v NullableEventPage) IsSet() bool { + return v.isSet +} + +func (v *NullableEventPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventPage(val *EventPage) *NullableEventPage { + return &NullableEventPage{value: val, isSet: true} +} + +func (v NullableEventPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_export_token.go b/go/model_export_token.go new file mode 100644 index 0000000..bd8c2fc --- /dev/null +++ b/go/model_export_token.go @@ -0,0 +1,379 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ExportToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportToken{} + +// ExportToken struct for ExportToken +type ExportToken struct { + Id interface{} `json:"id"` + Token *string `json:"token,omitempty"` + Comment *string `json:"comment,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + LastUsedAt *int64 `json:"last_used_at,omitempty"` + LastUsedBy *string `json:"last_used_by,omitempty"` + Counter *int64 `json:"counter,omitempty"` +} + +type _ExportToken ExportToken + +// NewExportToken instantiates a new ExportToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportToken(id interface{}) *ExportToken { + this := ExportToken{} + this.Id = id + return &this +} + +// NewExportTokenWithDefaults instantiates a new ExportToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportTokenWithDefaults() *ExportToken { + this := ExportToken{} + return &this +} + +// GetId returns the Id field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *ExportToken) GetId() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExportToken) GetIdOk() (*interface{}, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExportToken) SetId(v interface{}) { + o.Id = v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *ExportToken) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *ExportToken) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *ExportToken) SetToken(v string) { + o.Token = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *ExportToken) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *ExportToken) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *ExportToken) SetComment(v string) { + o.Comment = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ExportToken) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ExportToken) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *ExportToken) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise. +func (o *ExportToken) GetLastUsedAt() int64 { + if o == nil || IsNil(o.LastUsedAt) { + var ret int64 + return ret + } + return *o.LastUsedAt +} + +// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetLastUsedAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastUsedAt) { + return nil, false + } + return o.LastUsedAt, true +} + +// HasLastUsedAt returns a boolean if a field has been set. +func (o *ExportToken) HasLastUsedAt() bool { + if o != nil && !IsNil(o.LastUsedAt) { + return true + } + + return false +} + +// SetLastUsedAt gets a reference to the given int64 and assigns it to the LastUsedAt field. +func (o *ExportToken) SetLastUsedAt(v int64) { + o.LastUsedAt = &v +} + +// GetLastUsedBy returns the LastUsedBy field value if set, zero value otherwise. +func (o *ExportToken) GetLastUsedBy() string { + if o == nil || IsNil(o.LastUsedBy) { + var ret string + return ret + } + return *o.LastUsedBy +} + +// GetLastUsedByOk returns a tuple with the LastUsedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetLastUsedByOk() (*string, bool) { + if o == nil || IsNil(o.LastUsedBy) { + return nil, false + } + return o.LastUsedBy, true +} + +// HasLastUsedBy returns a boolean if a field has been set. +func (o *ExportToken) HasLastUsedBy() bool { + if o != nil && !IsNil(o.LastUsedBy) { + return true + } + + return false +} + +// SetLastUsedBy gets a reference to the given string and assigns it to the LastUsedBy field. +func (o *ExportToken) SetLastUsedBy(v string) { + o.LastUsedBy = &v +} + +// GetCounter returns the Counter field value if set, zero value otherwise. +func (o *ExportToken) GetCounter() int64 { + if o == nil || IsNil(o.Counter) { + var ret int64 + return ret + } + return *o.Counter +} + +// GetCounterOk returns a tuple with the Counter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportToken) GetCounterOk() (*int64, bool) { + if o == nil || IsNil(o.Counter) { + return nil, false + } + return o.Counter, true +} + +// HasCounter returns a boolean if a field has been set. +func (o *ExportToken) HasCounter() bool { + if o != nil && !IsNil(o.Counter) { + return true + } + + return false +} + +// SetCounter gets a reference to the given int64 and assigns it to the Counter field. +func (o *ExportToken) SetCounter(v int64) { + o.Counter = &v +} + +func (o ExportToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.LastUsedAt) { + toSerialize["last_used_at"] = o.LastUsedAt + } + if !IsNil(o.LastUsedBy) { + toSerialize["last_used_by"] = o.LastUsedBy + } + if !IsNil(o.Counter) { + toSerialize["counter"] = o.Counter + } + return toSerialize, nil +} + +func (o *ExportToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExportToken := _ExportToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExportToken) + + if err != nil { + return err + } + + *o = ExportToken(varExportToken) + + return err +} + +type NullableExportToken struct { + value *ExportToken + isSet bool +} + +func (v NullableExportToken) Get() *ExportToken { + return v.value +} + +func (v *NullableExportToken) Set(val *ExportToken) { + v.value = val + v.isSet = true +} + +func (v NullableExportToken) IsSet() bool { + return v.isSet +} + +func (v *NullableExportToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportToken(val *ExportToken) *NullableExportToken { + return &NullableExportToken{value: val, isSet: true} +} + +func (v NullableExportToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_export_token_options.go b/go/model_export_token_options.go new file mode 100644 index 0000000..04662ed --- /dev/null +++ b/go/model_export_token_options.go @@ -0,0 +1,127 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the ExportTokenOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportTokenOptions{} + +// ExportTokenOptions struct for ExportTokenOptions +type ExportTokenOptions struct { + Comment *string `json:"comment,omitempty"` +} + +// NewExportTokenOptions instantiates a new ExportTokenOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportTokenOptions() *ExportTokenOptions { + this := ExportTokenOptions{} + return &this +} + +// NewExportTokenOptionsWithDefaults instantiates a new ExportTokenOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportTokenOptionsWithDefaults() *ExportTokenOptions { + this := ExportTokenOptions{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *ExportTokenOptions) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportTokenOptions) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *ExportTokenOptions) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *ExportTokenOptions) SetComment(v string) { + o.Comment = &v +} + +func (o ExportTokenOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportTokenOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + return toSerialize, nil +} + +type NullableExportTokenOptions struct { + value *ExportTokenOptions + isSet bool +} + +func (v NullableExportTokenOptions) Get() *ExportTokenOptions { + return v.value +} + +func (v *NullableExportTokenOptions) Set(val *ExportTokenOptions) { + v.value = val + v.isSet = true +} + +func (v NullableExportTokenOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableExportTokenOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportTokenOptions(val *ExportTokenOptions) *NullableExportTokenOptions { + return &NullableExportTokenOptions{value: val, isSet: true} +} + +func (v NullableExportTokenOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportTokenOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_finding.go b/go/model_finding.go new file mode 100644 index 0000000..aba34fd --- /dev/null +++ b/go/model_finding.go @@ -0,0 +1,624 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Finding type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Finding{} + +// Finding struct for Finding +type Finding struct { + Id string `json:"id"` + Category *string `json:"category,omitempty"` + OrganizationId string `json:"organization_id"` + // A runZero-assigned code for the finding. + FindingCode *string `json:"finding_code,omitempty"` + // The title of the finding. + Name *string `json:"name,omitempty"` + // Additional information about the finding. + Description *string `json:"description,omitempty"` + // Remediation information. + Solution *string `json:"solution,omitempty"` + Links *FindingLinks `json:"links,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + LastDetectedAt *int64 `json:"last_detected_at,omitempty"` + InstanceCount *int64 `json:"instance_count,omitempty"` + RiskRank *string `json:"risk_rank,omitempty"` + // 0 = info, 4 = critical + RiskRankValue *int32 `json:"risk_rank_value,omitempty"` +} + +type _Finding Finding + +// NewFinding instantiates a new Finding object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFinding(id string, organizationId string) *Finding { + this := Finding{} + this.Id = id + this.OrganizationId = organizationId + return &this +} + +// NewFindingWithDefaults instantiates a new Finding object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFindingWithDefaults() *Finding { + this := Finding{} + return &this +} + +// GetId returns the Id field value +func (o *Finding) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Finding) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Finding) SetId(v string) { + o.Id = v +} + +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *Finding) GetCategory() string { + if o == nil || IsNil(o.Category) { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetCategoryOk() (*string, bool) { + if o == nil || IsNil(o.Category) { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *Finding) HasCategory() bool { + if o != nil && !IsNil(o.Category) { + return true + } + + return false +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *Finding) SetCategory(v string) { + o.Category = &v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *Finding) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *Finding) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *Finding) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetFindingCode returns the FindingCode field value if set, zero value otherwise. +func (o *Finding) GetFindingCode() string { + if o == nil || IsNil(o.FindingCode) { + var ret string + return ret + } + return *o.FindingCode +} + +// GetFindingCodeOk returns a tuple with the FindingCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetFindingCodeOk() (*string, bool) { + if o == nil || IsNil(o.FindingCode) { + return nil, false + } + return o.FindingCode, true +} + +// HasFindingCode returns a boolean if a field has been set. +func (o *Finding) HasFindingCode() bool { + if o != nil && !IsNil(o.FindingCode) { + return true + } + + return false +} + +// SetFindingCode gets a reference to the given string and assigns it to the FindingCode field. +func (o *Finding) SetFindingCode(v string) { + o.FindingCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Finding) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Finding) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Finding) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Finding) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Finding) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Finding) SetDescription(v string) { + o.Description = &v +} + +// GetSolution returns the Solution field value if set, zero value otherwise. +func (o *Finding) GetSolution() string { + if o == nil || IsNil(o.Solution) { + var ret string + return ret + } + return *o.Solution +} + +// GetSolutionOk returns a tuple with the Solution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetSolutionOk() (*string, bool) { + if o == nil || IsNil(o.Solution) { + return nil, false + } + return o.Solution, true +} + +// HasSolution returns a boolean if a field has been set. +func (o *Finding) HasSolution() bool { + if o != nil && !IsNil(o.Solution) { + return true + } + + return false +} + +// SetSolution gets a reference to the given string and assigns it to the Solution field. +func (o *Finding) SetSolution(v string) { + o.Solution = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *Finding) GetLinks() FindingLinks { + if o == nil || IsNil(o.Links) { + var ret FindingLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetLinksOk() (*FindingLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *Finding) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given FindingLinks and assigns it to the Links field. +func (o *Finding) SetLinks(v FindingLinks) { + o.Links = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Finding) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Finding) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Finding) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Finding) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Finding) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *Finding) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetLastDetectedAt returns the LastDetectedAt field value if set, zero value otherwise. +func (o *Finding) GetLastDetectedAt() int64 { + if o == nil || IsNil(o.LastDetectedAt) { + var ret int64 + return ret + } + return *o.LastDetectedAt +} + +// GetLastDetectedAtOk returns a tuple with the LastDetectedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetLastDetectedAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastDetectedAt) { + return nil, false + } + return o.LastDetectedAt, true +} + +// HasLastDetectedAt returns a boolean if a field has been set. +func (o *Finding) HasLastDetectedAt() bool { + if o != nil && !IsNil(o.LastDetectedAt) { + return true + } + + return false +} + +// SetLastDetectedAt gets a reference to the given int64 and assigns it to the LastDetectedAt field. +func (o *Finding) SetLastDetectedAt(v int64) { + o.LastDetectedAt = &v +} + +// GetInstanceCount returns the InstanceCount field value if set, zero value otherwise. +func (o *Finding) GetInstanceCount() int64 { + if o == nil || IsNil(o.InstanceCount) { + var ret int64 + return ret + } + return *o.InstanceCount +} + +// GetInstanceCountOk returns a tuple with the InstanceCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetInstanceCountOk() (*int64, bool) { + if o == nil || IsNil(o.InstanceCount) { + return nil, false + } + return o.InstanceCount, true +} + +// HasInstanceCount returns a boolean if a field has been set. +func (o *Finding) HasInstanceCount() bool { + if o != nil && !IsNil(o.InstanceCount) { + return true + } + + return false +} + +// SetInstanceCount gets a reference to the given int64 and assigns it to the InstanceCount field. +func (o *Finding) SetInstanceCount(v int64) { + o.InstanceCount = &v +} + +// GetRiskRank returns the RiskRank field value if set, zero value otherwise. +func (o *Finding) GetRiskRank() string { + if o == nil || IsNil(o.RiskRank) { + var ret string + return ret + } + return *o.RiskRank +} + +// GetRiskRankOk returns a tuple with the RiskRank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetRiskRankOk() (*string, bool) { + if o == nil || IsNil(o.RiskRank) { + return nil, false + } + return o.RiskRank, true +} + +// HasRiskRank returns a boolean if a field has been set. +func (o *Finding) HasRiskRank() bool { + if o != nil && !IsNil(o.RiskRank) { + return true + } + + return false +} + +// SetRiskRank gets a reference to the given string and assigns it to the RiskRank field. +func (o *Finding) SetRiskRank(v string) { + o.RiskRank = &v +} + +// GetRiskRankValue returns the RiskRankValue field value if set, zero value otherwise. +func (o *Finding) GetRiskRankValue() int32 { + if o == nil || IsNil(o.RiskRankValue) { + var ret int32 + return ret + } + return *o.RiskRankValue +} + +// GetRiskRankValueOk returns a tuple with the RiskRankValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Finding) GetRiskRankValueOk() (*int32, bool) { + if o == nil || IsNil(o.RiskRankValue) { + return nil, false + } + return o.RiskRankValue, true +} + +// HasRiskRankValue returns a boolean if a field has been set. +func (o *Finding) HasRiskRankValue() bool { + if o != nil && !IsNil(o.RiskRankValue) { + return true + } + + return false +} + +// SetRiskRankValue gets a reference to the given int32 and assigns it to the RiskRankValue field. +func (o *Finding) SetRiskRankValue(v int32) { + o.RiskRankValue = &v +} + +func (o Finding) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Finding) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Category) { + toSerialize["category"] = o.Category + } + toSerialize["organization_id"] = o.OrganizationId + if !IsNil(o.FindingCode) { + toSerialize["finding_code"] = o.FindingCode + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Solution) { + toSerialize["solution"] = o.Solution + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.LastDetectedAt) { + toSerialize["last_detected_at"] = o.LastDetectedAt + } + if !IsNil(o.InstanceCount) { + toSerialize["instance_count"] = o.InstanceCount + } + if !IsNil(o.RiskRank) { + toSerialize["risk_rank"] = o.RiskRank + } + if !IsNil(o.RiskRankValue) { + toSerialize["risk_rank_value"] = o.RiskRankValue + } + return toSerialize, nil +} + +func (o *Finding) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "organization_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFinding := _Finding{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFinding) + + if err != nil { + return err + } + + *o = Finding(varFinding) + + return err +} + +type NullableFinding struct { + value *Finding + isSet bool +} + +func (v NullableFinding) Get() *Finding { + return v.value +} + +func (v *NullableFinding) Set(val *Finding) { + v.value = val + v.isSet = true +} + +func (v NullableFinding) IsSet() bool { + return v.isSet +} + +func (v *NullableFinding) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinding(val *Finding) *NullableFinding { + return &NullableFinding{value: val, isSet: true} +} + +func (v NullableFinding) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinding) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_finding_link.go b/go/model_finding_link.go new file mode 100644 index 0000000..2902deb --- /dev/null +++ b/go/model_finding_link.go @@ -0,0 +1,163 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the FindingLink type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FindingLink{} + +// FindingLink A title and URL pointing to additional finding context. +type FindingLink struct { + Title *string `json:"title,omitempty"` + Url *string `json:"url,omitempty"` +} + +// NewFindingLink instantiates a new FindingLink object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFindingLink() *FindingLink { + this := FindingLink{} + return &this +} + +// NewFindingLinkWithDefaults instantiates a new FindingLink object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFindingLinkWithDefaults() *FindingLink { + this := FindingLink{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *FindingLink) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindingLink) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *FindingLink) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *FindingLink) SetTitle(v string) { + o.Title = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *FindingLink) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindingLink) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *FindingLink) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *FindingLink) SetUrl(v string) { + o.Url = &v +} + +func (o FindingLink) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FindingLink) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + return toSerialize, nil +} + +type NullableFindingLink struct { + value *FindingLink + isSet bool +} + +func (v NullableFindingLink) Get() *FindingLink { + return v.value +} + +func (v *NullableFindingLink) Set(val *FindingLink) { + v.value = val + v.isSet = true +} + +func (v NullableFindingLink) IsSet() bool { + return v.isSet +} + +func (v *NullableFindingLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFindingLink(val *FindingLink) *NullableFindingLink { + return &NullableFindingLink{value: val, isSet: true} +} + +func (v NullableFindingLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFindingLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_finding_links.go b/go/model_finding_links.go new file mode 100644 index 0000000..0f29041 --- /dev/null +++ b/go/model_finding_links.go @@ -0,0 +1,202 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the FindingLinks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FindingLinks{} + +// FindingLinks Groups of related URLs that provide additional context for a finding. +type FindingLinks struct { + // URLs of relevant CVE records. + Cves []FindingLink `json:"cves,omitempty"` + // URLs of relevant runZero blog postings. + RzBlog []FindingLink `json:"rz_blog,omitempty"` + // Additional relevant URLs. + Urls []FindingLink `json:"urls,omitempty"` +} + +// NewFindingLinks instantiates a new FindingLinks object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFindingLinks() *FindingLinks { + this := FindingLinks{} + return &this +} + +// NewFindingLinksWithDefaults instantiates a new FindingLinks object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFindingLinksWithDefaults() *FindingLinks { + this := FindingLinks{} + return &this +} + +// GetCves returns the Cves field value if set, zero value otherwise. +func (o *FindingLinks) GetCves() []FindingLink { + if o == nil || IsNil(o.Cves) { + var ret []FindingLink + return ret + } + return o.Cves +} + +// GetCvesOk returns a tuple with the Cves field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindingLinks) GetCvesOk() ([]FindingLink, bool) { + if o == nil || IsNil(o.Cves) { + return nil, false + } + return o.Cves, true +} + +// HasCves returns a boolean if a field has been set. +func (o *FindingLinks) HasCves() bool { + if o != nil && !IsNil(o.Cves) { + return true + } + + return false +} + +// SetCves gets a reference to the given []FindingLink and assigns it to the Cves field. +func (o *FindingLinks) SetCves(v []FindingLink) { + o.Cves = v +} + +// GetRzBlog returns the RzBlog field value if set, zero value otherwise. +func (o *FindingLinks) GetRzBlog() []FindingLink { + if o == nil || IsNil(o.RzBlog) { + var ret []FindingLink + return ret + } + return o.RzBlog +} + +// GetRzBlogOk returns a tuple with the RzBlog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindingLinks) GetRzBlogOk() ([]FindingLink, bool) { + if o == nil || IsNil(o.RzBlog) { + return nil, false + } + return o.RzBlog, true +} + +// HasRzBlog returns a boolean if a field has been set. +func (o *FindingLinks) HasRzBlog() bool { + if o != nil && !IsNil(o.RzBlog) { + return true + } + + return false +} + +// SetRzBlog gets a reference to the given []FindingLink and assigns it to the RzBlog field. +func (o *FindingLinks) SetRzBlog(v []FindingLink) { + o.RzBlog = v +} + +// GetUrls returns the Urls field value if set, zero value otherwise. +func (o *FindingLinks) GetUrls() []FindingLink { + if o == nil || IsNil(o.Urls) { + var ret []FindingLink + return ret + } + return o.Urls +} + +// GetUrlsOk returns a tuple with the Urls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindingLinks) GetUrlsOk() ([]FindingLink, bool) { + if o == nil || IsNil(o.Urls) { + return nil, false + } + return o.Urls, true +} + +// HasUrls returns a boolean if a field has been set. +func (o *FindingLinks) HasUrls() bool { + if o != nil && !IsNil(o.Urls) { + return true + } + + return false +} + +// SetUrls gets a reference to the given []FindingLink and assigns it to the Urls field. +func (o *FindingLinks) SetUrls(v []FindingLink) { + o.Urls = v +} + +func (o FindingLinks) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FindingLinks) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cves) { + toSerialize["cves"] = o.Cves + } + if !IsNil(o.RzBlog) { + toSerialize["rz_blog"] = o.RzBlog + } + if !IsNil(o.Urls) { + toSerialize["urls"] = o.Urls + } + return toSerialize, nil +} + +type NullableFindingLinks struct { + value *FindingLinks + isSet bool +} + +func (v NullableFindingLinks) Get() *FindingLinks { + return v.value +} + +func (v *NullableFindingLinks) Set(val *FindingLinks) { + v.value = val + v.isSet = true +} + +func (v NullableFindingLinks) IsSet() bool { + return v.isSet +} + +func (v *NullableFindingLinks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFindingLinks(val *FindingLinks) *NullableFindingLinks { + return &NullableFindingLinks{value: val, isSet: true} +} + +func (v NullableFindingLinks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFindingLinks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_gcp_credential_fields.go b/go/model_gcp_credential_fields.go new file mode 100644 index 0000000..02eead4 --- /dev/null +++ b/go/model_gcp_credential_fields.go @@ -0,0 +1,524 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the GCPCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GCPCredentialFields{} + +// GCPCredentialFields struct for GCPCredentialFields +type GCPCredentialFields struct { + CrossProject *string `json:"cross_project,omitempty"` + AuthProviderX509CertUrl *string `json:"auth_provider_x509_cert_url,omitempty"` + AuthUri *string `json:"auth_uri,omitempty"` + ClientEmail *string `json:"client_email,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"` + // base64 encoded private key, beginning with -----BEGIN PRIVATE KEY----- + PrivateKey *string `json:"private_key,omitempty"` + PrivateKeyId *string `json:"private_key_id,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + TokenUri *string `json:"token_uri,omitempty"` + Type *string `json:"type,omitempty"` + UniverseDomain *string `json:"universe_domain,omitempty"` +} + +// NewGCPCredentialFields instantiates a new GCPCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGCPCredentialFields() *GCPCredentialFields { + this := GCPCredentialFields{} + return &this +} + +// NewGCPCredentialFieldsWithDefaults instantiates a new GCPCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGCPCredentialFieldsWithDefaults() *GCPCredentialFields { + this := GCPCredentialFields{} + return &this +} + +// GetCrossProject returns the CrossProject field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetCrossProject() string { + if o == nil || IsNil(o.CrossProject) { + var ret string + return ret + } + return *o.CrossProject +} + +// GetCrossProjectOk returns a tuple with the CrossProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetCrossProjectOk() (*string, bool) { + if o == nil || IsNil(o.CrossProject) { + return nil, false + } + return o.CrossProject, true +} + +// HasCrossProject returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasCrossProject() bool { + if o != nil && !IsNil(o.CrossProject) { + return true + } + + return false +} + +// SetCrossProject gets a reference to the given string and assigns it to the CrossProject field. +func (o *GCPCredentialFields) SetCrossProject(v string) { + o.CrossProject = &v +} + +// GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetAuthProviderX509CertUrl() string { + if o == nil || IsNil(o.AuthProviderX509CertUrl) { + var ret string + return ret + } + return *o.AuthProviderX509CertUrl +} + +// GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetAuthProviderX509CertUrlOk() (*string, bool) { + if o == nil || IsNil(o.AuthProviderX509CertUrl) { + return nil, false + } + return o.AuthProviderX509CertUrl, true +} + +// HasAuthProviderX509CertUrl returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasAuthProviderX509CertUrl() bool { + if o != nil && !IsNil(o.AuthProviderX509CertUrl) { + return true + } + + return false +} + +// SetAuthProviderX509CertUrl gets a reference to the given string and assigns it to the AuthProviderX509CertUrl field. +func (o *GCPCredentialFields) SetAuthProviderX509CertUrl(v string) { + o.AuthProviderX509CertUrl = &v +} + +// GetAuthUri returns the AuthUri field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetAuthUri() string { + if o == nil || IsNil(o.AuthUri) { + var ret string + return ret + } + return *o.AuthUri +} + +// GetAuthUriOk returns a tuple with the AuthUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetAuthUriOk() (*string, bool) { + if o == nil || IsNil(o.AuthUri) { + return nil, false + } + return o.AuthUri, true +} + +// HasAuthUri returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasAuthUri() bool { + if o != nil && !IsNil(o.AuthUri) { + return true + } + + return false +} + +// SetAuthUri gets a reference to the given string and assigns it to the AuthUri field. +func (o *GCPCredentialFields) SetAuthUri(v string) { + o.AuthUri = &v +} + +// GetClientEmail returns the ClientEmail field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetClientEmail() string { + if o == nil || IsNil(o.ClientEmail) { + var ret string + return ret + } + return *o.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetClientEmailOk() (*string, bool) { + if o == nil || IsNil(o.ClientEmail) { + return nil, false + } + return o.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasClientEmail() bool { + if o != nil && !IsNil(o.ClientEmail) { + return true + } + + return false +} + +// SetClientEmail gets a reference to the given string and assigns it to the ClientEmail field. +func (o *GCPCredentialFields) SetClientEmail(v string) { + o.ClientEmail = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *GCPCredentialFields) SetClientId(v string) { + o.ClientId = &v +} + +// GetClientX509CertUrl returns the ClientX509CertUrl field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetClientX509CertUrl() string { + if o == nil || IsNil(o.ClientX509CertUrl) { + var ret string + return ret + } + return *o.ClientX509CertUrl +} + +// GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetClientX509CertUrlOk() (*string, bool) { + if o == nil || IsNil(o.ClientX509CertUrl) { + return nil, false + } + return o.ClientX509CertUrl, true +} + +// HasClientX509CertUrl returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasClientX509CertUrl() bool { + if o != nil && !IsNil(o.ClientX509CertUrl) { + return true + } + + return false +} + +// SetClientX509CertUrl gets a reference to the given string and assigns it to the ClientX509CertUrl field. +func (o *GCPCredentialFields) SetClientX509CertUrl(v string) { + o.ClientX509CertUrl = &v +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey) { + var ret string + return ret + } + return *o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetPrivateKeyOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKey) { + return nil, false + } + return o.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasPrivateKey() bool { + if o != nil && !IsNil(o.PrivateKey) { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +func (o *GCPCredentialFields) SetPrivateKey(v string) { + o.PrivateKey = &v +} + +// GetPrivateKeyId returns the PrivateKeyId field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetPrivateKeyId() string { + if o == nil || IsNil(o.PrivateKeyId) { + var ret string + return ret + } + return *o.PrivateKeyId +} + +// GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetPrivateKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKeyId) { + return nil, false + } + return o.PrivateKeyId, true +} + +// HasPrivateKeyId returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasPrivateKeyId() bool { + if o != nil && !IsNil(o.PrivateKeyId) { + return true + } + + return false +} + +// SetPrivateKeyId gets a reference to the given string and assigns it to the PrivateKeyId field. +func (o *GCPCredentialFields) SetPrivateKeyId(v string) { + o.PrivateKeyId = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GCPCredentialFields) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetTokenUri returns the TokenUri field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetTokenUri() string { + if o == nil || IsNil(o.TokenUri) { + var ret string + return ret + } + return *o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetTokenUriOk() (*string, bool) { + if o == nil || IsNil(o.TokenUri) { + return nil, false + } + return o.TokenUri, true +} + +// HasTokenUri returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasTokenUri() bool { + if o != nil && !IsNil(o.TokenUri) { + return true + } + + return false +} + +// SetTokenUri gets a reference to the given string and assigns it to the TokenUri field. +func (o *GCPCredentialFields) SetTokenUri(v string) { + o.TokenUri = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GCPCredentialFields) SetType(v string) { + o.Type = &v +} + +// GetUniverseDomain returns the UniverseDomain field value if set, zero value otherwise. +func (o *GCPCredentialFields) GetUniverseDomain() string { + if o == nil || IsNil(o.UniverseDomain) { + var ret string + return ret + } + return *o.UniverseDomain +} + +// GetUniverseDomainOk returns a tuple with the UniverseDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GCPCredentialFields) GetUniverseDomainOk() (*string, bool) { + if o == nil || IsNil(o.UniverseDomain) { + return nil, false + } + return o.UniverseDomain, true +} + +// HasUniverseDomain returns a boolean if a field has been set. +func (o *GCPCredentialFields) HasUniverseDomain() bool { + if o != nil && !IsNil(o.UniverseDomain) { + return true + } + + return false +} + +// SetUniverseDomain gets a reference to the given string and assigns it to the UniverseDomain field. +func (o *GCPCredentialFields) SetUniverseDomain(v string) { + o.UniverseDomain = &v +} + +func (o GCPCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GCPCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CrossProject) { + toSerialize["cross_project"] = o.CrossProject + } + if !IsNil(o.AuthProviderX509CertUrl) { + toSerialize["auth_provider_x509_cert_url"] = o.AuthProviderX509CertUrl + } + if !IsNil(o.AuthUri) { + toSerialize["auth_uri"] = o.AuthUri + } + if !IsNil(o.ClientEmail) { + toSerialize["client_email"] = o.ClientEmail + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.ClientX509CertUrl) { + toSerialize["client_x509_cert_url"] = o.ClientX509CertUrl + } + if !IsNil(o.PrivateKey) { + toSerialize["private_key"] = o.PrivateKey + } + if !IsNil(o.PrivateKeyId) { + toSerialize["private_key_id"] = o.PrivateKeyId + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.TokenUri) { + toSerialize["token_uri"] = o.TokenUri + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.UniverseDomain) { + toSerialize["universe_domain"] = o.UniverseDomain + } + return toSerialize, nil +} + +type NullableGCPCredentialFields struct { + value *GCPCredentialFields + isSet bool +} + +func (v NullableGCPCredentialFields) Get() *GCPCredentialFields { + return v.value +} + +func (v *NullableGCPCredentialFields) Set(val *GCPCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableGCPCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableGCPCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGCPCredentialFields(val *GCPCredentialFields) *NullableGCPCredentialFields { + return &NullableGCPCredentialFields{value: val, isSet: true} +} + +func (v NullableGCPCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGCPCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_google_workspace_credential_fields.go b/go/model_google_workspace_credential_fields.go new file mode 100644 index 0000000..2b65f99 --- /dev/null +++ b/go/model_google_workspace_credential_fields.go @@ -0,0 +1,592 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GoogleWorkspaceCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleWorkspaceCredentialFields{} + +// GoogleWorkspaceCredentialFields struct for GoogleWorkspaceCredentialFields +type GoogleWorkspaceCredentialFields struct { + Delegate string `json:"delegate"` + CustomerId *string `json:"customer_id,omitempty"` + AuthProviderX509CertUrl *string `json:"auth_provider_x509_cert_url,omitempty"` + AuthUri *string `json:"auth_uri,omitempty"` + ClientEmail *string `json:"client_email,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"` + // base64 encoded private key, beginning with -----BEGIN PRIVATE KEY----- + PrivateKey *string `json:"private_key,omitempty"` + PrivateKeyId *string `json:"private_key_id,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + TokenUri *string `json:"token_uri,omitempty"` + Type *string `json:"type,omitempty"` + UniverseDomain *string `json:"universe_domain,omitempty"` +} + +type _GoogleWorkspaceCredentialFields GoogleWorkspaceCredentialFields + +// NewGoogleWorkspaceCredentialFields instantiates a new GoogleWorkspaceCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGoogleWorkspaceCredentialFields(delegate string) *GoogleWorkspaceCredentialFields { + this := GoogleWorkspaceCredentialFields{} + this.Delegate = delegate + return &this +} + +// NewGoogleWorkspaceCredentialFieldsWithDefaults instantiates a new GoogleWorkspaceCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGoogleWorkspaceCredentialFieldsWithDefaults() *GoogleWorkspaceCredentialFields { + this := GoogleWorkspaceCredentialFields{} + return &this +} + +// GetDelegate returns the Delegate field value +func (o *GoogleWorkspaceCredentialFields) GetDelegate() string { + if o == nil { + var ret string + return ret + } + + return o.Delegate +} + +// GetDelegateOk returns a tuple with the Delegate field value +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetDelegateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Delegate, true +} + +// SetDelegate sets field value +func (o *GoogleWorkspaceCredentialFields) SetDelegate(v string) { + o.Delegate = v +} + +// GetCustomerId returns the CustomerId field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetCustomerId() string { + if o == nil || IsNil(o.CustomerId) { + var ret string + return ret + } + return *o.CustomerId +} + +// GetCustomerIdOk returns a tuple with the CustomerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetCustomerIdOk() (*string, bool) { + if o == nil || IsNil(o.CustomerId) { + return nil, false + } + return o.CustomerId, true +} + +// HasCustomerId returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasCustomerId() bool { + if o != nil && !IsNil(o.CustomerId) { + return true + } + + return false +} + +// SetCustomerId gets a reference to the given string and assigns it to the CustomerId field. +func (o *GoogleWorkspaceCredentialFields) SetCustomerId(v string) { + o.CustomerId = &v +} + +// GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetAuthProviderX509CertUrl() string { + if o == nil || IsNil(o.AuthProviderX509CertUrl) { + var ret string + return ret + } + return *o.AuthProviderX509CertUrl +} + +// GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetAuthProviderX509CertUrlOk() (*string, bool) { + if o == nil || IsNil(o.AuthProviderX509CertUrl) { + return nil, false + } + return o.AuthProviderX509CertUrl, true +} + +// HasAuthProviderX509CertUrl returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasAuthProviderX509CertUrl() bool { + if o != nil && !IsNil(o.AuthProviderX509CertUrl) { + return true + } + + return false +} + +// SetAuthProviderX509CertUrl gets a reference to the given string and assigns it to the AuthProviderX509CertUrl field. +func (o *GoogleWorkspaceCredentialFields) SetAuthProviderX509CertUrl(v string) { + o.AuthProviderX509CertUrl = &v +} + +// GetAuthUri returns the AuthUri field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetAuthUri() string { + if o == nil || IsNil(o.AuthUri) { + var ret string + return ret + } + return *o.AuthUri +} + +// GetAuthUriOk returns a tuple with the AuthUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetAuthUriOk() (*string, bool) { + if o == nil || IsNil(o.AuthUri) { + return nil, false + } + return o.AuthUri, true +} + +// HasAuthUri returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasAuthUri() bool { + if o != nil && !IsNil(o.AuthUri) { + return true + } + + return false +} + +// SetAuthUri gets a reference to the given string and assigns it to the AuthUri field. +func (o *GoogleWorkspaceCredentialFields) SetAuthUri(v string) { + o.AuthUri = &v +} + +// GetClientEmail returns the ClientEmail field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetClientEmail() string { + if o == nil || IsNil(o.ClientEmail) { + var ret string + return ret + } + return *o.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetClientEmailOk() (*string, bool) { + if o == nil || IsNil(o.ClientEmail) { + return nil, false + } + return o.ClientEmail, true +} + +// HasClientEmail returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasClientEmail() bool { + if o != nil && !IsNil(o.ClientEmail) { + return true + } + + return false +} + +// SetClientEmail gets a reference to the given string and assigns it to the ClientEmail field. +func (o *GoogleWorkspaceCredentialFields) SetClientEmail(v string) { + o.ClientEmail = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *GoogleWorkspaceCredentialFields) SetClientId(v string) { + o.ClientId = &v +} + +// GetClientX509CertUrl returns the ClientX509CertUrl field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetClientX509CertUrl() string { + if o == nil || IsNil(o.ClientX509CertUrl) { + var ret string + return ret + } + return *o.ClientX509CertUrl +} + +// GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetClientX509CertUrlOk() (*string, bool) { + if o == nil || IsNil(o.ClientX509CertUrl) { + return nil, false + } + return o.ClientX509CertUrl, true +} + +// HasClientX509CertUrl returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasClientX509CertUrl() bool { + if o != nil && !IsNil(o.ClientX509CertUrl) { + return true + } + + return false +} + +// SetClientX509CertUrl gets a reference to the given string and assigns it to the ClientX509CertUrl field. +func (o *GoogleWorkspaceCredentialFields) SetClientX509CertUrl(v string) { + o.ClientX509CertUrl = &v +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey) { + var ret string + return ret + } + return *o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKey) { + return nil, false + } + return o.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasPrivateKey() bool { + if o != nil && !IsNil(o.PrivateKey) { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +func (o *GoogleWorkspaceCredentialFields) SetPrivateKey(v string) { + o.PrivateKey = &v +} + +// GetPrivateKeyId returns the PrivateKeyId field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyId() string { + if o == nil || IsNil(o.PrivateKeyId) { + var ret string + return ret + } + return *o.PrivateKeyId +} + +// GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetPrivateKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKeyId) { + return nil, false + } + return o.PrivateKeyId, true +} + +// HasPrivateKeyId returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasPrivateKeyId() bool { + if o != nil && !IsNil(o.PrivateKeyId) { + return true + } + + return false +} + +// SetPrivateKeyId gets a reference to the given string and assigns it to the PrivateKeyId field. +func (o *GoogleWorkspaceCredentialFields) SetPrivateKeyId(v string) { + o.PrivateKeyId = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GoogleWorkspaceCredentialFields) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetTokenUri returns the TokenUri field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetTokenUri() string { + if o == nil || IsNil(o.TokenUri) { + var ret string + return ret + } + return *o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetTokenUriOk() (*string, bool) { + if o == nil || IsNil(o.TokenUri) { + return nil, false + } + return o.TokenUri, true +} + +// HasTokenUri returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasTokenUri() bool { + if o != nil && !IsNil(o.TokenUri) { + return true + } + + return false +} + +// SetTokenUri gets a reference to the given string and assigns it to the TokenUri field. +func (o *GoogleWorkspaceCredentialFields) SetTokenUri(v string) { + o.TokenUri = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleWorkspaceCredentialFields) SetType(v string) { + o.Type = &v +} + +// GetUniverseDomain returns the UniverseDomain field value if set, zero value otherwise. +func (o *GoogleWorkspaceCredentialFields) GetUniverseDomain() string { + if o == nil || IsNil(o.UniverseDomain) { + var ret string + return ret + } + return *o.UniverseDomain +} + +// GetUniverseDomainOk returns a tuple with the UniverseDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GoogleWorkspaceCredentialFields) GetUniverseDomainOk() (*string, bool) { + if o == nil || IsNil(o.UniverseDomain) { + return nil, false + } + return o.UniverseDomain, true +} + +// HasUniverseDomain returns a boolean if a field has been set. +func (o *GoogleWorkspaceCredentialFields) HasUniverseDomain() bool { + if o != nil && !IsNil(o.UniverseDomain) { + return true + } + + return false +} + +// SetUniverseDomain gets a reference to the given string and assigns it to the UniverseDomain field. +func (o *GoogleWorkspaceCredentialFields) SetUniverseDomain(v string) { + o.UniverseDomain = &v +} + +func (o GoogleWorkspaceCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GoogleWorkspaceCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["delegate"] = o.Delegate + if !IsNil(o.CustomerId) { + toSerialize["customer_id"] = o.CustomerId + } + if !IsNil(o.AuthProviderX509CertUrl) { + toSerialize["auth_provider_x509_cert_url"] = o.AuthProviderX509CertUrl + } + if !IsNil(o.AuthUri) { + toSerialize["auth_uri"] = o.AuthUri + } + if !IsNil(o.ClientEmail) { + toSerialize["client_email"] = o.ClientEmail + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.ClientX509CertUrl) { + toSerialize["client_x509_cert_url"] = o.ClientX509CertUrl + } + if !IsNil(o.PrivateKey) { + toSerialize["private_key"] = o.PrivateKey + } + if !IsNil(o.PrivateKeyId) { + toSerialize["private_key_id"] = o.PrivateKeyId + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.TokenUri) { + toSerialize["token_uri"] = o.TokenUri + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.UniverseDomain) { + toSerialize["universe_domain"] = o.UniverseDomain + } + return toSerialize, nil +} + +func (o *GoogleWorkspaceCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "delegate", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGoogleWorkspaceCredentialFields := _GoogleWorkspaceCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGoogleWorkspaceCredentialFields) + + if err != nil { + return err + } + + *o = GoogleWorkspaceCredentialFields(varGoogleWorkspaceCredentialFields) + + return err +} + +type NullableGoogleWorkspaceCredentialFields struct { + value *GoogleWorkspaceCredentialFields + isSet bool +} + +func (v NullableGoogleWorkspaceCredentialFields) Get() *GoogleWorkspaceCredentialFields { + return v.value +} + +func (v *NullableGoogleWorkspaceCredentialFields) Set(val *GoogleWorkspaceCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableGoogleWorkspaceCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableGoogleWorkspaceCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGoogleWorkspaceCredentialFields(val *GoogleWorkspaceCredentialFields) *NullableGoogleWorkspaceCredentialFields { + return &NullableGoogleWorkspaceCredentialFields{value: val, isSet: true} +} + +func (v NullableGoogleWorkspaceCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGoogleWorkspaceCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_group.go b/go/model_group.go new file mode 100644 index 0000000..7ed3f5f --- /dev/null +++ b/go/model_group.go @@ -0,0 +1,519 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Group type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Group{} + +// Group struct for Group +type Group struct { + Id string `json:"id"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RoleSummary *string `json:"role_summary,omitempty"` + UserCount *int64 `json:"user_count,omitempty"` + CreatedByEmail *string `json:"created_by_email,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` +} + +type _Group Group + +// NewGroup instantiates a new Group object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroup(id string) *Group { + this := Group{} + this.Id = id + return &this +} + +// NewGroupWithDefaults instantiates a new Group object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupWithDefaults() *Group { + this := Group{} + return &this +} + +// GetId returns the Id field value +func (o *Group) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Group) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Group) SetId(v string) { + o.Id = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Group) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Group) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Group) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Group) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Group) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Group) SetName(v string) { + o.Name = &v +} + +// GetRoleSummary returns the RoleSummary field value if set, zero value otherwise. +func (o *Group) GetRoleSummary() string { + if o == nil || IsNil(o.RoleSummary) { + var ret string + return ret + } + return *o.RoleSummary +} + +// GetRoleSummaryOk returns a tuple with the RoleSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetRoleSummaryOk() (*string, bool) { + if o == nil || IsNil(o.RoleSummary) { + return nil, false + } + return o.RoleSummary, true +} + +// HasRoleSummary returns a boolean if a field has been set. +func (o *Group) HasRoleSummary() bool { + if o != nil && !IsNil(o.RoleSummary) { + return true + } + + return false +} + +// SetRoleSummary gets a reference to the given string and assigns it to the RoleSummary field. +func (o *Group) SetRoleSummary(v string) { + o.RoleSummary = &v +} + +// GetUserCount returns the UserCount field value if set, zero value otherwise. +func (o *Group) GetUserCount() int64 { + if o == nil || IsNil(o.UserCount) { + var ret int64 + return ret + } + return *o.UserCount +} + +// GetUserCountOk returns a tuple with the UserCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetUserCountOk() (*int64, bool) { + if o == nil || IsNil(o.UserCount) { + return nil, false + } + return o.UserCount, true +} + +// HasUserCount returns a boolean if a field has been set. +func (o *Group) HasUserCount() bool { + if o != nil && !IsNil(o.UserCount) { + return true + } + + return false +} + +// SetUserCount gets a reference to the given int64 and assigns it to the UserCount field. +func (o *Group) SetUserCount(v int64) { + o.UserCount = &v +} + +// GetCreatedByEmail returns the CreatedByEmail field value if set, zero value otherwise. +func (o *Group) GetCreatedByEmail() string { + if o == nil || IsNil(o.CreatedByEmail) { + var ret string + return ret + } + return *o.CreatedByEmail +} + +// GetCreatedByEmailOk returns a tuple with the CreatedByEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetCreatedByEmailOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByEmail) { + return nil, false + } + return o.CreatedByEmail, true +} + +// HasCreatedByEmail returns a boolean if a field has been set. +func (o *Group) HasCreatedByEmail() bool { + if o != nil && !IsNil(o.CreatedByEmail) { + return true + } + + return false +} + +// SetCreatedByEmail gets a reference to the given string and assigns it to the CreatedByEmail field. +func (o *Group) SetCreatedByEmail(v string) { + o.CreatedByEmail = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Group) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Group) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Group) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Group) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Group) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *Group) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *Group) GetExpiresAt() int64 { + if o == nil || IsNil(o.ExpiresAt) { + var ret int64 + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetExpiresAtOk() (*int64, bool) { + if o == nil || IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *Group) HasExpiresAt() bool { + if o != nil && !IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field. +func (o *Group) SetExpiresAt(v int64) { + o.ExpiresAt = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *Group) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *Group) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *Group) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *Group) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *Group) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *Group) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +func (o Group) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Group) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.RoleSummary) { + toSerialize["role_summary"] = o.RoleSummary + } + if !IsNil(o.UserCount) { + toSerialize["user_count"] = o.UserCount + } + if !IsNil(o.CreatedByEmail) { + toSerialize["created_by_email"] = o.CreatedByEmail + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + return toSerialize, nil +} + +func (o *Group) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroup := _Group{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroup) + + if err != nil { + return err + } + + *o = Group(varGroup) + + return err +} + +type NullableGroup struct { + value *Group + isSet bool +} + +func (v NullableGroup) Get() *Group { + return v.value +} + +func (v *NullableGroup) Set(val *Group) { + v.value = val + v.isSet = true +} + +func (v NullableGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroup(val *Group) *NullableGroup { + return &NullableGroup{value: val, isSet: true} +} + +func (v NullableGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_group_mapping.go b/go/model_group_mapping.go new file mode 100644 index 0000000..b056f3a --- /dev/null +++ b/go/model_group_mapping.go @@ -0,0 +1,423 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GroupMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupMapping{} + +// GroupMapping struct for GroupMapping +type GroupMapping struct { + Id string `json:"id"` + GroupId string `json:"group_id"` + GroupName *string `json:"group_name,omitempty"` + SsoAttribute string `json:"sso_attribute"` + SsoValue string `json:"sso_value"` + Description *string `json:"description,omitempty"` + CreatedByEmail *string `json:"created_by_email,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` +} + +type _GroupMapping GroupMapping + +// NewGroupMapping instantiates a new GroupMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupMapping(id string, groupId string, ssoAttribute string, ssoValue string) *GroupMapping { + this := GroupMapping{} + this.Id = id + this.GroupId = groupId + this.SsoAttribute = ssoAttribute + this.SsoValue = ssoValue + return &this +} + +// NewGroupMappingWithDefaults instantiates a new GroupMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupMappingWithDefaults() *GroupMapping { + this := GroupMapping{} + return &this +} + +// GetId returns the Id field value +func (o *GroupMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GroupMapping) SetId(v string) { + o.Id = v +} + +// GetGroupId returns the GroupId field value +func (o *GroupMapping) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *GroupMapping) SetGroupId(v string) { + o.GroupId = v +} + +// GetGroupName returns the GroupName field value if set, zero value otherwise. +func (o *GroupMapping) GetGroupName() string { + if o == nil || IsNil(o.GroupName) { + var ret string + return ret + } + return *o.GroupName +} + +// GetGroupNameOk returns a tuple with the GroupName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetGroupNameOk() (*string, bool) { + if o == nil || IsNil(o.GroupName) { + return nil, false + } + return o.GroupName, true +} + +// HasGroupName returns a boolean if a field has been set. +func (o *GroupMapping) HasGroupName() bool { + if o != nil && !IsNil(o.GroupName) { + return true + } + + return false +} + +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. +func (o *GroupMapping) SetGroupName(v string) { + o.GroupName = &v +} + +// GetSsoAttribute returns the SsoAttribute field value +func (o *GroupMapping) GetSsoAttribute() string { + if o == nil { + var ret string + return ret + } + + return o.SsoAttribute +} + +// GetSsoAttributeOk returns a tuple with the SsoAttribute field value +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetSsoAttributeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SsoAttribute, true +} + +// SetSsoAttribute sets field value +func (o *GroupMapping) SetSsoAttribute(v string) { + o.SsoAttribute = v +} + +// GetSsoValue returns the SsoValue field value +func (o *GroupMapping) GetSsoValue() string { + if o == nil { + var ret string + return ret + } + + return o.SsoValue +} + +// GetSsoValueOk returns a tuple with the SsoValue field value +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetSsoValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SsoValue, true +} + +// SetSsoValue sets field value +func (o *GroupMapping) SetSsoValue(v string) { + o.SsoValue = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroupMapping) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroupMapping) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroupMapping) SetDescription(v string) { + o.Description = &v +} + +// GetCreatedByEmail returns the CreatedByEmail field value if set, zero value otherwise. +func (o *GroupMapping) GetCreatedByEmail() string { + if o == nil || IsNil(o.CreatedByEmail) { + var ret string + return ret + } + return *o.CreatedByEmail +} + +// GetCreatedByEmailOk returns a tuple with the CreatedByEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetCreatedByEmailOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByEmail) { + return nil, false + } + return o.CreatedByEmail, true +} + +// HasCreatedByEmail returns a boolean if a field has been set. +func (o *GroupMapping) HasCreatedByEmail() bool { + if o != nil && !IsNil(o.CreatedByEmail) { + return true + } + + return false +} + +// SetCreatedByEmail gets a reference to the given string and assigns it to the CreatedByEmail field. +func (o *GroupMapping) SetCreatedByEmail(v string) { + o.CreatedByEmail = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GroupMapping) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GroupMapping) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *GroupMapping) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GroupMapping) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupMapping) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GroupMapping) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *GroupMapping) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +func (o GroupMapping) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["group_id"] = o.GroupId + if !IsNil(o.GroupName) { + toSerialize["group_name"] = o.GroupName + } + toSerialize["sso_attribute"] = o.SsoAttribute + toSerialize["sso_value"] = o.SsoValue + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.CreatedByEmail) { + toSerialize["created_by_email"] = o.CreatedByEmail + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +func (o *GroupMapping) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "group_id", + "sso_attribute", + "sso_value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupMapping := _GroupMapping{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupMapping) + + if err != nil { + return err + } + + *o = GroupMapping(varGroupMapping) + + return err +} + +type NullableGroupMapping struct { + value *GroupMapping + isSet bool +} + +func (v NullableGroupMapping) Get() *GroupMapping { + return v.value +} + +func (v *NullableGroupMapping) Set(val *GroupMapping) { + v.value = val + v.isSet = true +} + +func (v NullableGroupMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupMapping(val *GroupMapping) *NullableGroupMapping { + return &NullableGroupMapping{value: val, isSet: true} +} + +func (v NullableGroupMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_group_post.go b/go/model_group_post.go new file mode 100644 index 0000000..117a047 --- /dev/null +++ b/go/model_group_post.go @@ -0,0 +1,271 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the GroupPost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupPost{} + +// GroupPost struct for GroupPost +type GroupPost struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` +} + +// NewGroupPost instantiates a new GroupPost object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupPost() *GroupPost { + this := GroupPost{} + return &this +} + +// NewGroupPostWithDefaults instantiates a new GroupPost object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupPostWithDefaults() *GroupPost { + this := GroupPost{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroupPost) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPost) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroupPost) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroupPost) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GroupPost) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPost) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GroupPost) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GroupPost) SetName(v string) { + o.Name = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *GroupPost) GetExpiresAt() int64 { + if o == nil || IsNil(o.ExpiresAt) { + var ret int64 + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPost) GetExpiresAtOk() (*int64, bool) { + if o == nil || IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *GroupPost) HasExpiresAt() bool { + if o != nil && !IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field. +func (o *GroupPost) SetExpiresAt(v int64) { + o.ExpiresAt = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *GroupPost) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPost) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *GroupPost) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *GroupPost) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *GroupPost) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPost) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *GroupPost) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *GroupPost) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +func (o GroupPost) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupPost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + return toSerialize, nil +} + +type NullableGroupPost struct { + value *GroupPost + isSet bool +} + +func (v NullableGroupPost) Get() *GroupPost { + return v.value +} + +func (v *NullableGroupPost) Set(val *GroupPost) { + v.value = val + v.isSet = true +} + +func (v NullableGroupPost) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupPost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupPost(val *GroupPost) *NullableGroupPost { + return &NullableGroupPost{value: val, isSet: true} +} + +func (v NullableGroupPost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupPost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_group_put.go b/go/model_group_put.go new file mode 100644 index 0000000..c2c8567 --- /dev/null +++ b/go/model_group_put.go @@ -0,0 +1,307 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the GroupPut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupPut{} + +// GroupPut struct for GroupPut +type GroupPut struct { + Id *string `json:"id,omitempty"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` +} + +// NewGroupPut instantiates a new GroupPut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupPut() *GroupPut { + this := GroupPut{} + return &this +} + +// NewGroupPutWithDefaults instantiates a new GroupPut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupPutWithDefaults() *GroupPut { + this := GroupPut{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GroupPut) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GroupPut) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GroupPut) SetId(v string) { + o.Id = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroupPut) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroupPut) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroupPut) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GroupPut) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GroupPut) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GroupPut) SetName(v string) { + o.Name = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *GroupPut) GetExpiresAt() int64 { + if o == nil || IsNil(o.ExpiresAt) { + var ret int64 + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetExpiresAtOk() (*int64, bool) { + if o == nil || IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *GroupPut) HasExpiresAt() bool { + if o != nil && !IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field. +func (o *GroupPut) SetExpiresAt(v int64) { + o.ExpiresAt = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *GroupPut) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *GroupPut) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *GroupPut) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *GroupPut) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupPut) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *GroupPut) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *GroupPut) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +func (o GroupPut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupPut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + return toSerialize, nil +} + +type NullableGroupPut struct { + value *GroupPut + isSet bool +} + +func (v NullableGroupPut) Get() *GroupPut { + return v.value +} + +func (v *NullableGroupPut) Set(val *GroupPut) { + v.value = val + v.isSet = true +} + +func (v NullableGroupPut) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupPut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupPut(val *GroupPut) *NullableGroupPut { + return &NullableGroupPut{value: val, isSet: true} +} + +func (v NullableGroupPut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupPut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_health_check_response.go b/go/model_health_check_response.go new file mode 100644 index 0000000..7f524bd --- /dev/null +++ b/go/model_health_check_response.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the HealthCheckResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckResponse{} + +// HealthCheckResponse A health check response and version +type HealthCheckResponse struct { + Status string `json:"status"` + Version string `json:"version"` +} + +type _HealthCheckResponse HealthCheckResponse + +// NewHealthCheckResponse instantiates a new HealthCheckResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHealthCheckResponse(status string, version string) *HealthCheckResponse { + this := HealthCheckResponse{} + this.Status = status + this.Version = version + return &this +} + +// NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHealthCheckResponseWithDefaults() *HealthCheckResponse { + this := HealthCheckResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *HealthCheckResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *HealthCheckResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *HealthCheckResponse) SetStatus(v string) { + o.Status = v +} + +// GetVersion returns the Version field value +func (o *HealthCheckResponse) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *HealthCheckResponse) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *HealthCheckResponse) SetVersion(v string) { + o.Version = v +} + +func (o HealthCheckResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *HealthCheckResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHealthCheckResponse := _HealthCheckResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHealthCheckResponse) + + if err != nil { + return err + } + + *o = HealthCheckResponse(varHealthCheckResponse) + + return err +} + +type NullableHealthCheckResponse struct { + value *HealthCheckResponse + isSet bool +} + +func (v NullableHealthCheckResponse) Get() *HealthCheckResponse { + return v.value +} + +func (v *NullableHealthCheckResponse) Set(val *HealthCheckResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckResponse(val *HealthCheckResponse) *NullableHealthCheckResponse { + return &NullableHealthCheckResponse{value: val, isSet: true} +} + +func (v NullableHealthCheckResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_hosted_zone.go b/go/model_hosted_zone.go new file mode 100644 index 0000000..7d3c8fb --- /dev/null +++ b/go/model_hosted_zone.go @@ -0,0 +1,493 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the HostedZone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostedZone{} + +// HostedZone A hosted service which performs scan tasks. Hosted zones are only available to Enterprise customers. +type HostedZone struct { + // The ID of the hosted zone + Id string `json:"id"` + Name *string `json:"name,omitempty"` + // Whether the hosted zone is enabled + Enabled *bool `json:"enabled,omitempty"` + // The last modification time of the hosted zone + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // The processor ID assigned to the hosted zone + ProcessorId *string `json:"processor_id,omitempty"` + // The number of concurrent explorer tasks that can be executed + ExplorersConcurrency *int64 `json:"explorers_concurrency,omitempty"` + // The number of explorers available in the zone + ExplorersTotal *int64 `json:"explorers_total,omitempty"` + // The number of tasks executing in the zone + TasksActive *int64 `json:"tasks_active,omitempty"` + // The number of tasks waiting to execute in the zone + TasksWaiting *int64 `json:"tasks_waiting,omitempty"` + // The ID of the organization the hosted zone is assigned to + OrganizationId *string `json:"organization_id,omitempty"` +} + +type _HostedZone HostedZone + +// NewHostedZone instantiates a new HostedZone object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHostedZone(id string) *HostedZone { + this := HostedZone{} + this.Id = id + return &this +} + +// NewHostedZoneWithDefaults instantiates a new HostedZone object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHostedZoneWithDefaults() *HostedZone { + this := HostedZone{} + return &this +} + +// GetId returns the Id field value +func (o *HostedZone) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *HostedZone) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *HostedZone) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HostedZone) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *HostedZone) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *HostedZone) SetName(v string) { + o.Name = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *HostedZone) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *HostedZone) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *HostedZone) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *HostedZone) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *HostedZone) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *HostedZone) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetProcessorId returns the ProcessorId field value if set, zero value otherwise. +func (o *HostedZone) GetProcessorId() string { + if o == nil || IsNil(o.ProcessorId) { + var ret string + return ret + } + return *o.ProcessorId +} + +// GetProcessorIdOk returns a tuple with the ProcessorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetProcessorIdOk() (*string, bool) { + if o == nil || IsNil(o.ProcessorId) { + return nil, false + } + return o.ProcessorId, true +} + +// HasProcessorId returns a boolean if a field has been set. +func (o *HostedZone) HasProcessorId() bool { + if o != nil && !IsNil(o.ProcessorId) { + return true + } + + return false +} + +// SetProcessorId gets a reference to the given string and assigns it to the ProcessorId field. +func (o *HostedZone) SetProcessorId(v string) { + o.ProcessorId = &v +} + +// GetExplorersConcurrency returns the ExplorersConcurrency field value if set, zero value otherwise. +func (o *HostedZone) GetExplorersConcurrency() int64 { + if o == nil || IsNil(o.ExplorersConcurrency) { + var ret int64 + return ret + } + return *o.ExplorersConcurrency +} + +// GetExplorersConcurrencyOk returns a tuple with the ExplorersConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetExplorersConcurrencyOk() (*int64, bool) { + if o == nil || IsNil(o.ExplorersConcurrency) { + return nil, false + } + return o.ExplorersConcurrency, true +} + +// HasExplorersConcurrency returns a boolean if a field has been set. +func (o *HostedZone) HasExplorersConcurrency() bool { + if o != nil && !IsNil(o.ExplorersConcurrency) { + return true + } + + return false +} + +// SetExplorersConcurrency gets a reference to the given int64 and assigns it to the ExplorersConcurrency field. +func (o *HostedZone) SetExplorersConcurrency(v int64) { + o.ExplorersConcurrency = &v +} + +// GetExplorersTotal returns the ExplorersTotal field value if set, zero value otherwise. +func (o *HostedZone) GetExplorersTotal() int64 { + if o == nil || IsNil(o.ExplorersTotal) { + var ret int64 + return ret + } + return *o.ExplorersTotal +} + +// GetExplorersTotalOk returns a tuple with the ExplorersTotal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetExplorersTotalOk() (*int64, bool) { + if o == nil || IsNil(o.ExplorersTotal) { + return nil, false + } + return o.ExplorersTotal, true +} + +// HasExplorersTotal returns a boolean if a field has been set. +func (o *HostedZone) HasExplorersTotal() bool { + if o != nil && !IsNil(o.ExplorersTotal) { + return true + } + + return false +} + +// SetExplorersTotal gets a reference to the given int64 and assigns it to the ExplorersTotal field. +func (o *HostedZone) SetExplorersTotal(v int64) { + o.ExplorersTotal = &v +} + +// GetTasksActive returns the TasksActive field value if set, zero value otherwise. +func (o *HostedZone) GetTasksActive() int64 { + if o == nil || IsNil(o.TasksActive) { + var ret int64 + return ret + } + return *o.TasksActive +} + +// GetTasksActiveOk returns a tuple with the TasksActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetTasksActiveOk() (*int64, bool) { + if o == nil || IsNil(o.TasksActive) { + return nil, false + } + return o.TasksActive, true +} + +// HasTasksActive returns a boolean if a field has been set. +func (o *HostedZone) HasTasksActive() bool { + if o != nil && !IsNil(o.TasksActive) { + return true + } + + return false +} + +// SetTasksActive gets a reference to the given int64 and assigns it to the TasksActive field. +func (o *HostedZone) SetTasksActive(v int64) { + o.TasksActive = &v +} + +// GetTasksWaiting returns the TasksWaiting field value if set, zero value otherwise. +func (o *HostedZone) GetTasksWaiting() int64 { + if o == nil || IsNil(o.TasksWaiting) { + var ret int64 + return ret + } + return *o.TasksWaiting +} + +// GetTasksWaitingOk returns a tuple with the TasksWaiting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetTasksWaitingOk() (*int64, bool) { + if o == nil || IsNil(o.TasksWaiting) { + return nil, false + } + return o.TasksWaiting, true +} + +// HasTasksWaiting returns a boolean if a field has been set. +func (o *HostedZone) HasTasksWaiting() bool { + if o != nil && !IsNil(o.TasksWaiting) { + return true + } + + return false +} + +// SetTasksWaiting gets a reference to the given int64 and assigns it to the TasksWaiting field. +func (o *HostedZone) SetTasksWaiting(v int64) { + o.TasksWaiting = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *HostedZone) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostedZone) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *HostedZone) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *HostedZone) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +func (o HostedZone) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HostedZone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.ProcessorId) { + toSerialize["processor_id"] = o.ProcessorId + } + if !IsNil(o.ExplorersConcurrency) { + toSerialize["explorers_concurrency"] = o.ExplorersConcurrency + } + if !IsNil(o.ExplorersTotal) { + toSerialize["explorers_total"] = o.ExplorersTotal + } + if !IsNil(o.TasksActive) { + toSerialize["tasks_active"] = o.TasksActive + } + if !IsNil(o.TasksWaiting) { + toSerialize["tasks_waiting"] = o.TasksWaiting + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + return toSerialize, nil +} + +func (o *HostedZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostedZone := _HostedZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHostedZone) + + if err != nil { + return err + } + + *o = HostedZone(varHostedZone) + + return err +} + +type NullableHostedZone struct { + value *HostedZone + isSet bool +} + +func (v NullableHostedZone) Get() *HostedZone { + return v.value +} + +func (v *NullableHostedZone) Set(val *HostedZone) { + v.value = val + v.isSet = true +} + +func (v NullableHostedZone) IsSet() bool { + return v.isSet +} + +func (v *NullableHostedZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostedZone(val *HostedZone) *NullableHostedZone { + return &NullableHostedZone{value: val, isSet: true} +} + +func (v NullableHostedZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostedZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_import_asset.go b/go/model_import_asset.go new file mode 100644 index 0000000..5e51ef7 --- /dev/null +++ b/go/model_import_asset.go @@ -0,0 +1,604 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ImportAsset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportAsset{} + +// ImportAsset Represents a custom asset to be created or merged after import. +type ImportAsset struct { + // Any value which can uniquely identify the asset within the custom integration. + Id string `json:"id"` + // The unique identifier of the runZero asset to merge into. + RunZeroID *string `json:"runZeroID,omitempty"` + // The asset's networking configuration. + NetworkInterfaces []NetworkInterface `json:"networkInterfaces,omitempty"` + // Represents hostnames the asset is assigned or reachable at. These can be fully-qualified hostnames with the domain name, or a short hostname. + Hostnames []string `json:"hostnames,omitempty"` + // Represents a single domain name which could be applied to all non-fqdns in the hostnames field. + Domain *string `json:"domain,omitempty"` + // Represents the earliest time the asset was seen by the custom integration reporting it, using a date string as defined by RFC 3339, section 5.6. + FirstSeenTS *time.Time `json:"firstSeenTS,omitempty"` + // The name of the asset's operating system. It is advisable to keep the data clean by normalizing to existing values when possible. + Os *string `json:"os,omitempty"` + // The version of the asset's operating system. It is advisable to keep the data clean by normalizing to existing values when possible. + OsVersion *string `json:"osVersion,omitempty"` + // The manufacturer of the operating system of the asset. It is advisable to keep the data clean by normalizing to existing values when possible. + Manufacturer *string `json:"manufacturer,omitempty"` + // The hardware model of the asset. It is advisable to keep the data clean by normalizing to existing values when possible. + Model *string `json:"model,omitempty"` + // Arbitrary string tags applied to the asset. + Tags []string `json:"tags,omitempty"` + DeviceType *string `json:"deviceType,omitempty"` + // Flat map of arbitrary string key/value pairs representing custom attribute data not described in properties above. Note the maximum number of keys and length of values. Additionally, property names may only be 256 characters long. + CustomAttributes map[string]CustomAttributesValue `json:"customAttributes,omitempty"` +} + +type _ImportAsset ImportAsset + +// NewImportAsset instantiates a new ImportAsset object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportAsset(id string) *ImportAsset { + this := ImportAsset{} + this.Id = id + return &this +} + +// NewImportAssetWithDefaults instantiates a new ImportAsset object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportAssetWithDefaults() *ImportAsset { + this := ImportAsset{} + return &this +} + +// GetId returns the Id field value +func (o *ImportAsset) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ImportAsset) SetId(v string) { + o.Id = v +} + +// GetRunZeroID returns the RunZeroID field value if set, zero value otherwise. +func (o *ImportAsset) GetRunZeroID() string { + if o == nil || IsNil(o.RunZeroID) { + var ret string + return ret + } + return *o.RunZeroID +} + +// GetRunZeroIDOk returns a tuple with the RunZeroID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetRunZeroIDOk() (*string, bool) { + if o == nil || IsNil(o.RunZeroID) { + return nil, false + } + return o.RunZeroID, true +} + +// HasRunZeroID returns a boolean if a field has been set. +func (o *ImportAsset) HasRunZeroID() bool { + if o != nil && !IsNil(o.RunZeroID) { + return true + } + + return false +} + +// SetRunZeroID gets a reference to the given string and assigns it to the RunZeroID field. +func (o *ImportAsset) SetRunZeroID(v string) { + o.RunZeroID = &v +} + +// GetNetworkInterfaces returns the NetworkInterfaces field value if set, zero value otherwise. +func (o *ImportAsset) GetNetworkInterfaces() []NetworkInterface { + if o == nil || IsNil(o.NetworkInterfaces) { + var ret []NetworkInterface + return ret + } + return o.NetworkInterfaces +} + +// GetNetworkInterfacesOk returns a tuple with the NetworkInterfaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetNetworkInterfacesOk() ([]NetworkInterface, bool) { + if o == nil || IsNil(o.NetworkInterfaces) { + return nil, false + } + return o.NetworkInterfaces, true +} + +// HasNetworkInterfaces returns a boolean if a field has been set. +func (o *ImportAsset) HasNetworkInterfaces() bool { + if o != nil && !IsNil(o.NetworkInterfaces) { + return true + } + + return false +} + +// SetNetworkInterfaces gets a reference to the given []NetworkInterface and assigns it to the NetworkInterfaces field. +func (o *ImportAsset) SetNetworkInterfaces(v []NetworkInterface) { + o.NetworkInterfaces = v +} + +// GetHostnames returns the Hostnames field value if set, zero value otherwise. +func (o *ImportAsset) GetHostnames() []string { + if o == nil || IsNil(o.Hostnames) { + var ret []string + return ret + } + return o.Hostnames +} + +// GetHostnamesOk returns a tuple with the Hostnames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetHostnamesOk() ([]string, bool) { + if o == nil || IsNil(o.Hostnames) { + return nil, false + } + return o.Hostnames, true +} + +// HasHostnames returns a boolean if a field has been set. +func (o *ImportAsset) HasHostnames() bool { + if o != nil && !IsNil(o.Hostnames) { + return true + } + + return false +} + +// SetHostnames gets a reference to the given []string and assigns it to the Hostnames field. +func (o *ImportAsset) SetHostnames(v []string) { + o.Hostnames = v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *ImportAsset) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *ImportAsset) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +func (o *ImportAsset) SetDomain(v string) { + o.Domain = &v +} + +// GetFirstSeenTS returns the FirstSeenTS field value if set, zero value otherwise. +func (o *ImportAsset) GetFirstSeenTS() time.Time { + if o == nil || IsNil(o.FirstSeenTS) { + var ret time.Time + return ret + } + return *o.FirstSeenTS +} + +// GetFirstSeenTSOk returns a tuple with the FirstSeenTS field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetFirstSeenTSOk() (*time.Time, bool) { + if o == nil || IsNil(o.FirstSeenTS) { + return nil, false + } + return o.FirstSeenTS, true +} + +// HasFirstSeenTS returns a boolean if a field has been set. +func (o *ImportAsset) HasFirstSeenTS() bool { + if o != nil && !IsNil(o.FirstSeenTS) { + return true + } + + return false +} + +// SetFirstSeenTS gets a reference to the given time.Time and assigns it to the FirstSeenTS field. +func (o *ImportAsset) SetFirstSeenTS(v time.Time) { + o.FirstSeenTS = &v +} + +// GetOs returns the Os field value if set, zero value otherwise. +func (o *ImportAsset) GetOs() string { + if o == nil || IsNil(o.Os) { + var ret string + return ret + } + return *o.Os +} + +// GetOsOk returns a tuple with the Os field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetOsOk() (*string, bool) { + if o == nil || IsNil(o.Os) { + return nil, false + } + return o.Os, true +} + +// HasOs returns a boolean if a field has been set. +func (o *ImportAsset) HasOs() bool { + if o != nil && !IsNil(o.Os) { + return true + } + + return false +} + +// SetOs gets a reference to the given string and assigns it to the Os field. +func (o *ImportAsset) SetOs(v string) { + o.Os = &v +} + +// GetOsVersion returns the OsVersion field value if set, zero value otherwise. +func (o *ImportAsset) GetOsVersion() string { + if o == nil || IsNil(o.OsVersion) { + var ret string + return ret + } + return *o.OsVersion +} + +// GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetOsVersionOk() (*string, bool) { + if o == nil || IsNil(o.OsVersion) { + return nil, false + } + return o.OsVersion, true +} + +// HasOsVersion returns a boolean if a field has been set. +func (o *ImportAsset) HasOsVersion() bool { + if o != nil && !IsNil(o.OsVersion) { + return true + } + + return false +} + +// SetOsVersion gets a reference to the given string and assigns it to the OsVersion field. +func (o *ImportAsset) SetOsVersion(v string) { + o.OsVersion = &v +} + +// GetManufacturer returns the Manufacturer field value if set, zero value otherwise. +func (o *ImportAsset) GetManufacturer() string { + if o == nil || IsNil(o.Manufacturer) { + var ret string + return ret + } + return *o.Manufacturer +} + +// GetManufacturerOk returns a tuple with the Manufacturer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetManufacturerOk() (*string, bool) { + if o == nil || IsNil(o.Manufacturer) { + return nil, false + } + return o.Manufacturer, true +} + +// HasManufacturer returns a boolean if a field has been set. +func (o *ImportAsset) HasManufacturer() bool { + if o != nil && !IsNil(o.Manufacturer) { + return true + } + + return false +} + +// SetManufacturer gets a reference to the given string and assigns it to the Manufacturer field. +func (o *ImportAsset) SetManufacturer(v string) { + o.Manufacturer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *ImportAsset) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *ImportAsset) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *ImportAsset) SetModel(v string) { + o.Model = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ImportAsset) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ImportAsset) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ImportAsset) SetTags(v []string) { + o.Tags = v +} + +// GetDeviceType returns the DeviceType field value if set, zero value otherwise. +func (o *ImportAsset) GetDeviceType() string { + if o == nil || IsNil(o.DeviceType) { + var ret string + return ret + } + return *o.DeviceType +} + +// GetDeviceTypeOk returns a tuple with the DeviceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetDeviceTypeOk() (*string, bool) { + if o == nil || IsNil(o.DeviceType) { + return nil, false + } + return o.DeviceType, true +} + +// HasDeviceType returns a boolean if a field has been set. +func (o *ImportAsset) HasDeviceType() bool { + if o != nil && !IsNil(o.DeviceType) { + return true + } + + return false +} + +// SetDeviceType gets a reference to the given string and assigns it to the DeviceType field. +func (o *ImportAsset) SetDeviceType(v string) { + o.DeviceType = &v +} + +// GetCustomAttributes returns the CustomAttributes field value if set, zero value otherwise. +func (o *ImportAsset) GetCustomAttributes() map[string]CustomAttributesValue { + if o == nil || IsNil(o.CustomAttributes) { + var ret map[string]CustomAttributesValue + return ret + } + return o.CustomAttributes +} + +// GetCustomAttributesOk returns a tuple with the CustomAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAsset) GetCustomAttributesOk() (map[string]CustomAttributesValue, bool) { + if o == nil || IsNil(o.CustomAttributes) { + return map[string]CustomAttributesValue{}, false + } + return o.CustomAttributes, true +} + +// HasCustomAttributes returns a boolean if a field has been set. +func (o *ImportAsset) HasCustomAttributes() bool { + if o != nil && !IsNil(o.CustomAttributes) { + return true + } + + return false +} + +// SetCustomAttributes gets a reference to the given map[string]CustomAttributesValue and assigns it to the CustomAttributes field. +func (o *ImportAsset) SetCustomAttributes(v map[string]CustomAttributesValue) { + o.CustomAttributes = v +} + +func (o ImportAsset) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportAsset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.RunZeroID) { + toSerialize["runZeroID"] = o.RunZeroID + } + if !IsNil(o.NetworkInterfaces) { + toSerialize["networkInterfaces"] = o.NetworkInterfaces + } + if !IsNil(o.Hostnames) { + toSerialize["hostnames"] = o.Hostnames + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.FirstSeenTS) { + toSerialize["firstSeenTS"] = o.FirstSeenTS + } + if !IsNil(o.Os) { + toSerialize["os"] = o.Os + } + if !IsNil(o.OsVersion) { + toSerialize["osVersion"] = o.OsVersion + } + if !IsNil(o.Manufacturer) { + toSerialize["manufacturer"] = o.Manufacturer + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.DeviceType) { + toSerialize["deviceType"] = o.DeviceType + } + if !IsNil(o.CustomAttributes) { + toSerialize["customAttributes"] = o.CustomAttributes + } + return toSerialize, nil +} + +func (o *ImportAsset) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportAsset := _ImportAsset{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportAsset) + + if err != nil { + return err + } + + *o = ImportAsset(varImportAsset) + + return err +} + +type NullableImportAsset struct { + value *ImportAsset + isSet bool +} + +func (v NullableImportAsset) Get() *ImportAsset { + return v.value +} + +func (v *NullableImportAsset) Set(val *ImportAsset) { + v.value = val + v.isSet = true +} + +func (v NullableImportAsset) IsSet() bool { + return v.isSet +} + +func (v *NullableImportAsset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportAsset(val *ImportAsset) *NullableImportAsset { + return &NullableImportAsset{value: val, isSet: true} +} + +func (v NullableImportAsset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportAsset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_import_task.go b/go/model_import_task.go new file mode 100644 index 0000000..d903385 --- /dev/null +++ b/go/model_import_task.go @@ -0,0 +1,273 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ImportTask type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportTask{} + +// ImportTask Information which describes the task created when asset data is imported. +type ImportTask struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + // Instructs the data ingestion process whether to skip assets which do not merge into an existing asset in the asset inventory + ExcludeUnknown *bool `json:"excludeUnknown,omitempty"` + // Arbitrary string tag values which are applied to the asset data import task created. + Tags []string `json:"tags,omitempty"` +} + +type _ImportTask ImportTask + +// NewImportTask instantiates a new ImportTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportTask(name string) *ImportTask { + this := ImportTask{} + this.Name = name + var excludeUnknown bool = false + this.ExcludeUnknown = &excludeUnknown + return &this +} + +// NewImportTaskWithDefaults instantiates a new ImportTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportTaskWithDefaults() *ImportTask { + this := ImportTask{} + var excludeUnknown bool = false + this.ExcludeUnknown = &excludeUnknown + return &this +} + +// GetName returns the Name field value +func (o *ImportTask) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ImportTask) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ImportTask) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ImportTask) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportTask) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ImportTask) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ImportTask) SetDescription(v string) { + o.Description = &v +} + +// GetExcludeUnknown returns the ExcludeUnknown field value if set, zero value otherwise. +func (o *ImportTask) GetExcludeUnknown() bool { + if o == nil || IsNil(o.ExcludeUnknown) { + var ret bool + return ret + } + return *o.ExcludeUnknown +} + +// GetExcludeUnknownOk returns a tuple with the ExcludeUnknown field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportTask) GetExcludeUnknownOk() (*bool, bool) { + if o == nil || IsNil(o.ExcludeUnknown) { + return nil, false + } + return o.ExcludeUnknown, true +} + +// HasExcludeUnknown returns a boolean if a field has been set. +func (o *ImportTask) HasExcludeUnknown() bool { + if o != nil && !IsNil(o.ExcludeUnknown) { + return true + } + + return false +} + +// SetExcludeUnknown gets a reference to the given bool and assigns it to the ExcludeUnknown field. +func (o *ImportTask) SetExcludeUnknown(v bool) { + o.ExcludeUnknown = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ImportTask) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportTask) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ImportTask) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ImportTask) SetTags(v []string) { + o.Tags = v +} + +func (o ImportTask) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportTask) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExcludeUnknown) { + toSerialize["excludeUnknown"] = o.ExcludeUnknown + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +func (o *ImportTask) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportTask := _ImportTask{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportTask) + + if err != nil { + return err + } + + *o = ImportTask(varImportTask) + + return err +} + +type NullableImportTask struct { + value *ImportTask + isSet bool +} + +func (v NullableImportTask) Get() *ImportTask { + return v.value +} + +func (v *NullableImportTask) Set(val *ImportTask) { + v.value = val + v.isSet = true +} + +func (v NullableImportTask) IsSet() bool { + return v.isSet +} + +func (v *NullableImportTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportTask(val *ImportTask) *NullableImportTask { + return &NullableImportTask{value: val, isSet: true} +} + +func (v NullableImportTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_insight_vm_credential_fields.go b/go/model_insight_vm_credential_fields.go new file mode 100644 index 0000000..08915b2 --- /dev/null +++ b/go/model_insight_vm_credential_fields.go @@ -0,0 +1,287 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the InsightVMCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InsightVMCredentialFields{} + +// InsightVMCredentialFields struct for InsightVMCredentialFields +type InsightVMCredentialFields struct { + ApiUrl string `json:"api_url"` + Username string `json:"username"` + Password string `json:"password"` + Insecure *string `json:"insecure,omitempty"` + Thumbprints *string `json:"thumbprints,omitempty"` +} + +type _InsightVMCredentialFields InsightVMCredentialFields + +// NewInsightVMCredentialFields instantiates a new InsightVMCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInsightVMCredentialFields(apiUrl string, username string, password string) *InsightVMCredentialFields { + this := InsightVMCredentialFields{} + this.ApiUrl = apiUrl + this.Username = username + this.Password = password + return &this +} + +// NewInsightVMCredentialFieldsWithDefaults instantiates a new InsightVMCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInsightVMCredentialFieldsWithDefaults() *InsightVMCredentialFields { + this := InsightVMCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *InsightVMCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *InsightVMCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *InsightVMCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetUsername returns the Username field value +func (o *InsightVMCredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *InsightVMCredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *InsightVMCredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *InsightVMCredentialFields) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *InsightVMCredentialFields) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *InsightVMCredentialFields) SetPassword(v string) { + o.Password = v +} + +// GetInsecure returns the Insecure field value if set, zero value otherwise. +func (o *InsightVMCredentialFields) GetInsecure() string { + if o == nil || IsNil(o.Insecure) { + var ret string + return ret + } + return *o.Insecure +} + +// GetInsecureOk returns a tuple with the Insecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InsightVMCredentialFields) GetInsecureOk() (*string, bool) { + if o == nil || IsNil(o.Insecure) { + return nil, false + } + return o.Insecure, true +} + +// HasInsecure returns a boolean if a field has been set. +func (o *InsightVMCredentialFields) HasInsecure() bool { + if o != nil && !IsNil(o.Insecure) { + return true + } + + return false +} + +// SetInsecure gets a reference to the given string and assigns it to the Insecure field. +func (o *InsightVMCredentialFields) SetInsecure(v string) { + o.Insecure = &v +} + +// GetThumbprints returns the Thumbprints field value if set, zero value otherwise. +func (o *InsightVMCredentialFields) GetThumbprints() string { + if o == nil || IsNil(o.Thumbprints) { + var ret string + return ret + } + return *o.Thumbprints +} + +// GetThumbprintsOk returns a tuple with the Thumbprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InsightVMCredentialFields) GetThumbprintsOk() (*string, bool) { + if o == nil || IsNil(o.Thumbprints) { + return nil, false + } + return o.Thumbprints, true +} + +// HasThumbprints returns a boolean if a field has been set. +func (o *InsightVMCredentialFields) HasThumbprints() bool { + if o != nil && !IsNil(o.Thumbprints) { + return true + } + + return false +} + +// SetThumbprints gets a reference to the given string and assigns it to the Thumbprints field. +func (o *InsightVMCredentialFields) SetThumbprints(v string) { + o.Thumbprints = &v +} + +func (o InsightVMCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InsightVMCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + if !IsNil(o.Insecure) { + toSerialize["insecure"] = o.Insecure + } + if !IsNil(o.Thumbprints) { + toSerialize["thumbprints"] = o.Thumbprints + } + return toSerialize, nil +} + +func (o *InsightVMCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "username", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInsightVMCredentialFields := _InsightVMCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInsightVMCredentialFields) + + if err != nil { + return err + } + + *o = InsightVMCredentialFields(varInsightVMCredentialFields) + + return err +} + +type NullableInsightVMCredentialFields struct { + value *InsightVMCredentialFields + isSet bool +} + +func (v NullableInsightVMCredentialFields) Get() *InsightVMCredentialFields { + return v.value +} + +func (v *NullableInsightVMCredentialFields) Set(val *InsightVMCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableInsightVMCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableInsightVMCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInsightVMCredentialFields(val *InsightVMCredentialFields) *NullableInsightVMCredentialFields { + return &NullableInsightVMCredentialFields{value: val, isSet: true} +} + +func (v NullableInsightVMCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInsightVMCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_ldap_credential_fields.go b/go/model_ldap_credential_fields.go new file mode 100644 index 0000000..466f764 --- /dev/null +++ b/go/model_ldap_credential_fields.go @@ -0,0 +1,351 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LDAPCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPCredentialFields{} + +// LDAPCredentialFields struct for LDAPCredentialFields +type LDAPCredentialFields struct { + Url string `json:"url"` + Username string `json:"username"` + Password string `json:"password"` + BaseDn string `json:"base_dn"` + Insecure *string `json:"insecure,omitempty"` + LegacyTls *string `json:"legacy_tls,omitempty"` + Thumbprints *string `json:"thumbprints,omitempty"` +} + +type _LDAPCredentialFields LDAPCredentialFields + +// NewLDAPCredentialFields instantiates a new LDAPCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLDAPCredentialFields(url string, username string, password string, baseDn string) *LDAPCredentialFields { + this := LDAPCredentialFields{} + this.Url = url + this.Username = username + this.Password = password + this.BaseDn = baseDn + return &this +} + +// NewLDAPCredentialFieldsWithDefaults instantiates a new LDAPCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLDAPCredentialFieldsWithDefaults() *LDAPCredentialFields { + this := LDAPCredentialFields{} + return &this +} + +// GetUrl returns the Url field value +func (o *LDAPCredentialFields) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *LDAPCredentialFields) SetUrl(v string) { + o.Url = v +} + +// GetUsername returns the Username field value +func (o *LDAPCredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *LDAPCredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *LDAPCredentialFields) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *LDAPCredentialFields) SetPassword(v string) { + o.Password = v +} + +// GetBaseDn returns the BaseDn field value +func (o *LDAPCredentialFields) GetBaseDn() string { + if o == nil { + var ret string + return ret + } + + return o.BaseDn +} + +// GetBaseDnOk returns a tuple with the BaseDn field value +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetBaseDnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BaseDn, true +} + +// SetBaseDn sets field value +func (o *LDAPCredentialFields) SetBaseDn(v string) { + o.BaseDn = v +} + +// GetInsecure returns the Insecure field value if set, zero value otherwise. +func (o *LDAPCredentialFields) GetInsecure() string { + if o == nil || IsNil(o.Insecure) { + var ret string + return ret + } + return *o.Insecure +} + +// GetInsecureOk returns a tuple with the Insecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetInsecureOk() (*string, bool) { + if o == nil || IsNil(o.Insecure) { + return nil, false + } + return o.Insecure, true +} + +// HasInsecure returns a boolean if a field has been set. +func (o *LDAPCredentialFields) HasInsecure() bool { + if o != nil && !IsNil(o.Insecure) { + return true + } + + return false +} + +// SetInsecure gets a reference to the given string and assigns it to the Insecure field. +func (o *LDAPCredentialFields) SetInsecure(v string) { + o.Insecure = &v +} + +// GetLegacyTls returns the LegacyTls field value if set, zero value otherwise. +func (o *LDAPCredentialFields) GetLegacyTls() string { + if o == nil || IsNil(o.LegacyTls) { + var ret string + return ret + } + return *o.LegacyTls +} + +// GetLegacyTlsOk returns a tuple with the LegacyTls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetLegacyTlsOk() (*string, bool) { + if o == nil || IsNil(o.LegacyTls) { + return nil, false + } + return o.LegacyTls, true +} + +// HasLegacyTls returns a boolean if a field has been set. +func (o *LDAPCredentialFields) HasLegacyTls() bool { + if o != nil && !IsNil(o.LegacyTls) { + return true + } + + return false +} + +// SetLegacyTls gets a reference to the given string and assigns it to the LegacyTls field. +func (o *LDAPCredentialFields) SetLegacyTls(v string) { + o.LegacyTls = &v +} + +// GetThumbprints returns the Thumbprints field value if set, zero value otherwise. +func (o *LDAPCredentialFields) GetThumbprints() string { + if o == nil || IsNil(o.Thumbprints) { + var ret string + return ret + } + return *o.Thumbprints +} + +// GetThumbprintsOk returns a tuple with the Thumbprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LDAPCredentialFields) GetThumbprintsOk() (*string, bool) { + if o == nil || IsNil(o.Thumbprints) { + return nil, false + } + return o.Thumbprints, true +} + +// HasThumbprints returns a boolean if a field has been set. +func (o *LDAPCredentialFields) HasThumbprints() bool { + if o != nil && !IsNil(o.Thumbprints) { + return true + } + + return false +} + +// SetThumbprints gets a reference to the given string and assigns it to the Thumbprints field. +func (o *LDAPCredentialFields) SetThumbprints(v string) { + o.Thumbprints = &v +} + +func (o LDAPCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LDAPCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + toSerialize["base_dn"] = o.BaseDn + if !IsNil(o.Insecure) { + toSerialize["insecure"] = o.Insecure + } + if !IsNil(o.LegacyTls) { + toSerialize["legacy_tls"] = o.LegacyTls + } + if !IsNil(o.Thumbprints) { + toSerialize["thumbprints"] = o.Thumbprints + } + return toSerialize, nil +} + +func (o *LDAPCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "username", + "password", + "base_dn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLDAPCredentialFields := _LDAPCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLDAPCredentialFields) + + if err != nil { + return err + } + + *o = LDAPCredentialFields(varLDAPCredentialFields) + + return err +} + +type NullableLDAPCredentialFields struct { + value *LDAPCredentialFields + isSet bool +} + +func (v NullableLDAPCredentialFields) Get() *LDAPCredentialFields { + return v.value +} + +func (v *NullableLDAPCredentialFields) Set(val *LDAPCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableLDAPCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableLDAPCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLDAPCredentialFields(val *LDAPCredentialFields) *NullableLDAPCredentialFields { + return &NullableLDAPCredentialFields{value: val, isSet: true} +} + +func (v NullableLDAPCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLDAPCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_license.go b/go/model_license.go new file mode 100644 index 0000000..acaca7e --- /dev/null +++ b/go/model_license.go @@ -0,0 +1,1207 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the License type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &License{} + +// License struct for License +type License struct { + Id *string `json:"id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Name *string `json:"name,omitempty"` + ActivatedAt *int64 `json:"activated_at,omitempty"` + LicenseType *string `json:"license_type,omitempty"` + LicenseExpiration *int64 `json:"license_expiration,omitempty"` + LicenseMaxAssets *int64 `json:"license_max_assets,omitempty"` + LicenseLiveAssetCount *int64 `json:"license_live_asset_count,omitempty"` + LicenseProjectAssetCount *int64 `json:"license_project_asset_count,omitempty"` + ViaReseller *bool `json:"via_reseller,omitempty"` + Phone *string `json:"phone,omitempty"` + AddressStreet *string `json:"address_street,omitempty"` + AddressCountry *string `json:"address_country,omitempty"` + AddressCity *string `json:"address_city,omitempty"` + AddressRegion *string `json:"address_region,omitempty"` + AddressPostal *string `json:"address_postal,omitempty"` + SubscriptionPeriodStart *int64 `json:"subscription_period_start,omitempty"` + SubscriptionPeriodEnd *int64 `json:"subscription_period_end,omitempty"` + SubscriptionCancelAt *int64 `json:"subscription_cancel_at,omitempty"` + SubscriptionCanceledAt *int64 `json:"subscription_canceled_at,omitempty"` + Settings map[string]interface{} `json:"settings,omitempty"` + SsoType *string `json:"sso_type,omitempty"` + SsoDomain *string `json:"sso_domain,omitempty"` + SsoMode *string `json:"sso_mode,omitempty"` + SsoLoginMessage *string `json:"sso_login_message,omitempty"` + SsoLoginIssuerUrl *string `json:"sso_login_issuer_url,omitempty"` + SsoLoginLoginUrl *string `json:"sso_login_login_url,omitempty"` + SsoLoginLogoutUrl *string `json:"sso_login_logout_url,omitempty"` + SsoDefaultRole *string `json:"sso_default_role,omitempty"` + Partner *string `json:"partner,omitempty"` +} + +// NewLicense instantiates a new License object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLicense() *License { + this := License{} + return &this +} + +// NewLicenseWithDefaults instantiates a new License object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLicenseWithDefaults() *License { + this := License{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *License) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *License) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *License) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *License) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *License) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *License) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *License) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *License) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *License) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *License) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *License) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *License) SetName(v string) { + o.Name = &v +} + +// GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise. +func (o *License) GetActivatedAt() int64 { + if o == nil || IsNil(o.ActivatedAt) { + var ret int64 + return ret + } + return *o.ActivatedAt +} + +// GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetActivatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.ActivatedAt) { + return nil, false + } + return o.ActivatedAt, true +} + +// HasActivatedAt returns a boolean if a field has been set. +func (o *License) HasActivatedAt() bool { + if o != nil && !IsNil(o.ActivatedAt) { + return true + } + + return false +} + +// SetActivatedAt gets a reference to the given int64 and assigns it to the ActivatedAt field. +func (o *License) SetActivatedAt(v int64) { + o.ActivatedAt = &v +} + +// GetLicenseType returns the LicenseType field value if set, zero value otherwise. +func (o *License) GetLicenseType() string { + if o == nil || IsNil(o.LicenseType) { + var ret string + return ret + } + return *o.LicenseType +} + +// GetLicenseTypeOk returns a tuple with the LicenseType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetLicenseTypeOk() (*string, bool) { + if o == nil || IsNil(o.LicenseType) { + return nil, false + } + return o.LicenseType, true +} + +// HasLicenseType returns a boolean if a field has been set. +func (o *License) HasLicenseType() bool { + if o != nil && !IsNil(o.LicenseType) { + return true + } + + return false +} + +// SetLicenseType gets a reference to the given string and assigns it to the LicenseType field. +func (o *License) SetLicenseType(v string) { + o.LicenseType = &v +} + +// GetLicenseExpiration returns the LicenseExpiration field value if set, zero value otherwise. +func (o *License) GetLicenseExpiration() int64 { + if o == nil || IsNil(o.LicenseExpiration) { + var ret int64 + return ret + } + return *o.LicenseExpiration +} + +// GetLicenseExpirationOk returns a tuple with the LicenseExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetLicenseExpirationOk() (*int64, bool) { + if o == nil || IsNil(o.LicenseExpiration) { + return nil, false + } + return o.LicenseExpiration, true +} + +// HasLicenseExpiration returns a boolean if a field has been set. +func (o *License) HasLicenseExpiration() bool { + if o != nil && !IsNil(o.LicenseExpiration) { + return true + } + + return false +} + +// SetLicenseExpiration gets a reference to the given int64 and assigns it to the LicenseExpiration field. +func (o *License) SetLicenseExpiration(v int64) { + o.LicenseExpiration = &v +} + +// GetLicenseMaxAssets returns the LicenseMaxAssets field value if set, zero value otherwise. +func (o *License) GetLicenseMaxAssets() int64 { + if o == nil || IsNil(o.LicenseMaxAssets) { + var ret int64 + return ret + } + return *o.LicenseMaxAssets +} + +// GetLicenseMaxAssetsOk returns a tuple with the LicenseMaxAssets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetLicenseMaxAssetsOk() (*int64, bool) { + if o == nil || IsNil(o.LicenseMaxAssets) { + return nil, false + } + return o.LicenseMaxAssets, true +} + +// HasLicenseMaxAssets returns a boolean if a field has been set. +func (o *License) HasLicenseMaxAssets() bool { + if o != nil && !IsNil(o.LicenseMaxAssets) { + return true + } + + return false +} + +// SetLicenseMaxAssets gets a reference to the given int64 and assigns it to the LicenseMaxAssets field. +func (o *License) SetLicenseMaxAssets(v int64) { + o.LicenseMaxAssets = &v +} + +// GetLicenseLiveAssetCount returns the LicenseLiveAssetCount field value if set, zero value otherwise. +func (o *License) GetLicenseLiveAssetCount() int64 { + if o == nil || IsNil(o.LicenseLiveAssetCount) { + var ret int64 + return ret + } + return *o.LicenseLiveAssetCount +} + +// GetLicenseLiveAssetCountOk returns a tuple with the LicenseLiveAssetCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetLicenseLiveAssetCountOk() (*int64, bool) { + if o == nil || IsNil(o.LicenseLiveAssetCount) { + return nil, false + } + return o.LicenseLiveAssetCount, true +} + +// HasLicenseLiveAssetCount returns a boolean if a field has been set. +func (o *License) HasLicenseLiveAssetCount() bool { + if o != nil && !IsNil(o.LicenseLiveAssetCount) { + return true + } + + return false +} + +// SetLicenseLiveAssetCount gets a reference to the given int64 and assigns it to the LicenseLiveAssetCount field. +func (o *License) SetLicenseLiveAssetCount(v int64) { + o.LicenseLiveAssetCount = &v +} + +// GetLicenseProjectAssetCount returns the LicenseProjectAssetCount field value if set, zero value otherwise. +func (o *License) GetLicenseProjectAssetCount() int64 { + if o == nil || IsNil(o.LicenseProjectAssetCount) { + var ret int64 + return ret + } + return *o.LicenseProjectAssetCount +} + +// GetLicenseProjectAssetCountOk returns a tuple with the LicenseProjectAssetCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetLicenseProjectAssetCountOk() (*int64, bool) { + if o == nil || IsNil(o.LicenseProjectAssetCount) { + return nil, false + } + return o.LicenseProjectAssetCount, true +} + +// HasLicenseProjectAssetCount returns a boolean if a field has been set. +func (o *License) HasLicenseProjectAssetCount() bool { + if o != nil && !IsNil(o.LicenseProjectAssetCount) { + return true + } + + return false +} + +// SetLicenseProjectAssetCount gets a reference to the given int64 and assigns it to the LicenseProjectAssetCount field. +func (o *License) SetLicenseProjectAssetCount(v int64) { + o.LicenseProjectAssetCount = &v +} + +// GetViaReseller returns the ViaReseller field value if set, zero value otherwise. +func (o *License) GetViaReseller() bool { + if o == nil || IsNil(o.ViaReseller) { + var ret bool + return ret + } + return *o.ViaReseller +} + +// GetViaResellerOk returns a tuple with the ViaReseller field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetViaResellerOk() (*bool, bool) { + if o == nil || IsNil(o.ViaReseller) { + return nil, false + } + return o.ViaReseller, true +} + +// HasViaReseller returns a boolean if a field has been set. +func (o *License) HasViaReseller() bool { + if o != nil && !IsNil(o.ViaReseller) { + return true + } + + return false +} + +// SetViaReseller gets a reference to the given bool and assigns it to the ViaReseller field. +func (o *License) SetViaReseller(v bool) { + o.ViaReseller = &v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *License) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *License) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *License) SetPhone(v string) { + o.Phone = &v +} + +// GetAddressStreet returns the AddressStreet field value if set, zero value otherwise. +func (o *License) GetAddressStreet() string { + if o == nil || IsNil(o.AddressStreet) { + var ret string + return ret + } + return *o.AddressStreet +} + +// GetAddressStreetOk returns a tuple with the AddressStreet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetAddressStreetOk() (*string, bool) { + if o == nil || IsNil(o.AddressStreet) { + return nil, false + } + return o.AddressStreet, true +} + +// HasAddressStreet returns a boolean if a field has been set. +func (o *License) HasAddressStreet() bool { + if o != nil && !IsNil(o.AddressStreet) { + return true + } + + return false +} + +// SetAddressStreet gets a reference to the given string and assigns it to the AddressStreet field. +func (o *License) SetAddressStreet(v string) { + o.AddressStreet = &v +} + +// GetAddressCountry returns the AddressCountry field value if set, zero value otherwise. +func (o *License) GetAddressCountry() string { + if o == nil || IsNil(o.AddressCountry) { + var ret string + return ret + } + return *o.AddressCountry +} + +// GetAddressCountryOk returns a tuple with the AddressCountry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetAddressCountryOk() (*string, bool) { + if o == nil || IsNil(o.AddressCountry) { + return nil, false + } + return o.AddressCountry, true +} + +// HasAddressCountry returns a boolean if a field has been set. +func (o *License) HasAddressCountry() bool { + if o != nil && !IsNil(o.AddressCountry) { + return true + } + + return false +} + +// SetAddressCountry gets a reference to the given string and assigns it to the AddressCountry field. +func (o *License) SetAddressCountry(v string) { + o.AddressCountry = &v +} + +// GetAddressCity returns the AddressCity field value if set, zero value otherwise. +func (o *License) GetAddressCity() string { + if o == nil || IsNil(o.AddressCity) { + var ret string + return ret + } + return *o.AddressCity +} + +// GetAddressCityOk returns a tuple with the AddressCity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetAddressCityOk() (*string, bool) { + if o == nil || IsNil(o.AddressCity) { + return nil, false + } + return o.AddressCity, true +} + +// HasAddressCity returns a boolean if a field has been set. +func (o *License) HasAddressCity() bool { + if o != nil && !IsNil(o.AddressCity) { + return true + } + + return false +} + +// SetAddressCity gets a reference to the given string and assigns it to the AddressCity field. +func (o *License) SetAddressCity(v string) { + o.AddressCity = &v +} + +// GetAddressRegion returns the AddressRegion field value if set, zero value otherwise. +func (o *License) GetAddressRegion() string { + if o == nil || IsNil(o.AddressRegion) { + var ret string + return ret + } + return *o.AddressRegion +} + +// GetAddressRegionOk returns a tuple with the AddressRegion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetAddressRegionOk() (*string, bool) { + if o == nil || IsNil(o.AddressRegion) { + return nil, false + } + return o.AddressRegion, true +} + +// HasAddressRegion returns a boolean if a field has been set. +func (o *License) HasAddressRegion() bool { + if o != nil && !IsNil(o.AddressRegion) { + return true + } + + return false +} + +// SetAddressRegion gets a reference to the given string and assigns it to the AddressRegion field. +func (o *License) SetAddressRegion(v string) { + o.AddressRegion = &v +} + +// GetAddressPostal returns the AddressPostal field value if set, zero value otherwise. +func (o *License) GetAddressPostal() string { + if o == nil || IsNil(o.AddressPostal) { + var ret string + return ret + } + return *o.AddressPostal +} + +// GetAddressPostalOk returns a tuple with the AddressPostal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetAddressPostalOk() (*string, bool) { + if o == nil || IsNil(o.AddressPostal) { + return nil, false + } + return o.AddressPostal, true +} + +// HasAddressPostal returns a boolean if a field has been set. +func (o *License) HasAddressPostal() bool { + if o != nil && !IsNil(o.AddressPostal) { + return true + } + + return false +} + +// SetAddressPostal gets a reference to the given string and assigns it to the AddressPostal field. +func (o *License) SetAddressPostal(v string) { + o.AddressPostal = &v +} + +// GetSubscriptionPeriodStart returns the SubscriptionPeriodStart field value if set, zero value otherwise. +func (o *License) GetSubscriptionPeriodStart() int64 { + if o == nil || IsNil(o.SubscriptionPeriodStart) { + var ret int64 + return ret + } + return *o.SubscriptionPeriodStart +} + +// GetSubscriptionPeriodStartOk returns a tuple with the SubscriptionPeriodStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSubscriptionPeriodStartOk() (*int64, bool) { + if o == nil || IsNil(o.SubscriptionPeriodStart) { + return nil, false + } + return o.SubscriptionPeriodStart, true +} + +// HasSubscriptionPeriodStart returns a boolean if a field has been set. +func (o *License) HasSubscriptionPeriodStart() bool { + if o != nil && !IsNil(o.SubscriptionPeriodStart) { + return true + } + + return false +} + +// SetSubscriptionPeriodStart gets a reference to the given int64 and assigns it to the SubscriptionPeriodStart field. +func (o *License) SetSubscriptionPeriodStart(v int64) { + o.SubscriptionPeriodStart = &v +} + +// GetSubscriptionPeriodEnd returns the SubscriptionPeriodEnd field value if set, zero value otherwise. +func (o *License) GetSubscriptionPeriodEnd() int64 { + if o == nil || IsNil(o.SubscriptionPeriodEnd) { + var ret int64 + return ret + } + return *o.SubscriptionPeriodEnd +} + +// GetSubscriptionPeriodEndOk returns a tuple with the SubscriptionPeriodEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSubscriptionPeriodEndOk() (*int64, bool) { + if o == nil || IsNil(o.SubscriptionPeriodEnd) { + return nil, false + } + return o.SubscriptionPeriodEnd, true +} + +// HasSubscriptionPeriodEnd returns a boolean if a field has been set. +func (o *License) HasSubscriptionPeriodEnd() bool { + if o != nil && !IsNil(o.SubscriptionPeriodEnd) { + return true + } + + return false +} + +// SetSubscriptionPeriodEnd gets a reference to the given int64 and assigns it to the SubscriptionPeriodEnd field. +func (o *License) SetSubscriptionPeriodEnd(v int64) { + o.SubscriptionPeriodEnd = &v +} + +// GetSubscriptionCancelAt returns the SubscriptionCancelAt field value if set, zero value otherwise. +func (o *License) GetSubscriptionCancelAt() int64 { + if o == nil || IsNil(o.SubscriptionCancelAt) { + var ret int64 + return ret + } + return *o.SubscriptionCancelAt +} + +// GetSubscriptionCancelAtOk returns a tuple with the SubscriptionCancelAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSubscriptionCancelAtOk() (*int64, bool) { + if o == nil || IsNil(o.SubscriptionCancelAt) { + return nil, false + } + return o.SubscriptionCancelAt, true +} + +// HasSubscriptionCancelAt returns a boolean if a field has been set. +func (o *License) HasSubscriptionCancelAt() bool { + if o != nil && !IsNil(o.SubscriptionCancelAt) { + return true + } + + return false +} + +// SetSubscriptionCancelAt gets a reference to the given int64 and assigns it to the SubscriptionCancelAt field. +func (o *License) SetSubscriptionCancelAt(v int64) { + o.SubscriptionCancelAt = &v +} + +// GetSubscriptionCanceledAt returns the SubscriptionCanceledAt field value if set, zero value otherwise. +func (o *License) GetSubscriptionCanceledAt() int64 { + if o == nil || IsNil(o.SubscriptionCanceledAt) { + var ret int64 + return ret + } + return *o.SubscriptionCanceledAt +} + +// GetSubscriptionCanceledAtOk returns a tuple with the SubscriptionCanceledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSubscriptionCanceledAtOk() (*int64, bool) { + if o == nil || IsNil(o.SubscriptionCanceledAt) { + return nil, false + } + return o.SubscriptionCanceledAt, true +} + +// HasSubscriptionCanceledAt returns a boolean if a field has been set. +func (o *License) HasSubscriptionCanceledAt() bool { + if o != nil && !IsNil(o.SubscriptionCanceledAt) { + return true + } + + return false +} + +// SetSubscriptionCanceledAt gets a reference to the given int64 and assigns it to the SubscriptionCanceledAt field. +func (o *License) SetSubscriptionCanceledAt(v int64) { + o.SubscriptionCanceledAt = &v +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *License) GetSettings() map[string]interface{} { + if o == nil || IsNil(o.Settings) { + var ret map[string]interface{} + return ret + } + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Settings) { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *License) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field. +func (o *License) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +// GetSsoType returns the SsoType field value if set, zero value otherwise. +func (o *License) GetSsoType() string { + if o == nil || IsNil(o.SsoType) { + var ret string + return ret + } + return *o.SsoType +} + +// GetSsoTypeOk returns a tuple with the SsoType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoTypeOk() (*string, bool) { + if o == nil || IsNil(o.SsoType) { + return nil, false + } + return o.SsoType, true +} + +// HasSsoType returns a boolean if a field has been set. +func (o *License) HasSsoType() bool { + if o != nil && !IsNil(o.SsoType) { + return true + } + + return false +} + +// SetSsoType gets a reference to the given string and assigns it to the SsoType field. +func (o *License) SetSsoType(v string) { + o.SsoType = &v +} + +// GetSsoDomain returns the SsoDomain field value if set, zero value otherwise. +func (o *License) GetSsoDomain() string { + if o == nil || IsNil(o.SsoDomain) { + var ret string + return ret + } + return *o.SsoDomain +} + +// GetSsoDomainOk returns a tuple with the SsoDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoDomainOk() (*string, bool) { + if o == nil || IsNil(o.SsoDomain) { + return nil, false + } + return o.SsoDomain, true +} + +// HasSsoDomain returns a boolean if a field has been set. +func (o *License) HasSsoDomain() bool { + if o != nil && !IsNil(o.SsoDomain) { + return true + } + + return false +} + +// SetSsoDomain gets a reference to the given string and assigns it to the SsoDomain field. +func (o *License) SetSsoDomain(v string) { + o.SsoDomain = &v +} + +// GetSsoMode returns the SsoMode field value if set, zero value otherwise. +func (o *License) GetSsoMode() string { + if o == nil || IsNil(o.SsoMode) { + var ret string + return ret + } + return *o.SsoMode +} + +// GetSsoModeOk returns a tuple with the SsoMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoModeOk() (*string, bool) { + if o == nil || IsNil(o.SsoMode) { + return nil, false + } + return o.SsoMode, true +} + +// HasSsoMode returns a boolean if a field has been set. +func (o *License) HasSsoMode() bool { + if o != nil && !IsNil(o.SsoMode) { + return true + } + + return false +} + +// SetSsoMode gets a reference to the given string and assigns it to the SsoMode field. +func (o *License) SetSsoMode(v string) { + o.SsoMode = &v +} + +// GetSsoLoginMessage returns the SsoLoginMessage field value if set, zero value otherwise. +func (o *License) GetSsoLoginMessage() string { + if o == nil || IsNil(o.SsoLoginMessage) { + var ret string + return ret + } + return *o.SsoLoginMessage +} + +// GetSsoLoginMessageOk returns a tuple with the SsoLoginMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoLoginMessageOk() (*string, bool) { + if o == nil || IsNil(o.SsoLoginMessage) { + return nil, false + } + return o.SsoLoginMessage, true +} + +// HasSsoLoginMessage returns a boolean if a field has been set. +func (o *License) HasSsoLoginMessage() bool { + if o != nil && !IsNil(o.SsoLoginMessage) { + return true + } + + return false +} + +// SetSsoLoginMessage gets a reference to the given string and assigns it to the SsoLoginMessage field. +func (o *License) SetSsoLoginMessage(v string) { + o.SsoLoginMessage = &v +} + +// GetSsoLoginIssuerUrl returns the SsoLoginIssuerUrl field value if set, zero value otherwise. +func (o *License) GetSsoLoginIssuerUrl() string { + if o == nil || IsNil(o.SsoLoginIssuerUrl) { + var ret string + return ret + } + return *o.SsoLoginIssuerUrl +} + +// GetSsoLoginIssuerUrlOk returns a tuple with the SsoLoginIssuerUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoLoginIssuerUrlOk() (*string, bool) { + if o == nil || IsNil(o.SsoLoginIssuerUrl) { + return nil, false + } + return o.SsoLoginIssuerUrl, true +} + +// HasSsoLoginIssuerUrl returns a boolean if a field has been set. +func (o *License) HasSsoLoginIssuerUrl() bool { + if o != nil && !IsNil(o.SsoLoginIssuerUrl) { + return true + } + + return false +} + +// SetSsoLoginIssuerUrl gets a reference to the given string and assigns it to the SsoLoginIssuerUrl field. +func (o *License) SetSsoLoginIssuerUrl(v string) { + o.SsoLoginIssuerUrl = &v +} + +// GetSsoLoginLoginUrl returns the SsoLoginLoginUrl field value if set, zero value otherwise. +func (o *License) GetSsoLoginLoginUrl() string { + if o == nil || IsNil(o.SsoLoginLoginUrl) { + var ret string + return ret + } + return *o.SsoLoginLoginUrl +} + +// GetSsoLoginLoginUrlOk returns a tuple with the SsoLoginLoginUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoLoginLoginUrlOk() (*string, bool) { + if o == nil || IsNil(o.SsoLoginLoginUrl) { + return nil, false + } + return o.SsoLoginLoginUrl, true +} + +// HasSsoLoginLoginUrl returns a boolean if a field has been set. +func (o *License) HasSsoLoginLoginUrl() bool { + if o != nil && !IsNil(o.SsoLoginLoginUrl) { + return true + } + + return false +} + +// SetSsoLoginLoginUrl gets a reference to the given string and assigns it to the SsoLoginLoginUrl field. +func (o *License) SetSsoLoginLoginUrl(v string) { + o.SsoLoginLoginUrl = &v +} + +// GetSsoLoginLogoutUrl returns the SsoLoginLogoutUrl field value if set, zero value otherwise. +func (o *License) GetSsoLoginLogoutUrl() string { + if o == nil || IsNil(o.SsoLoginLogoutUrl) { + var ret string + return ret + } + return *o.SsoLoginLogoutUrl +} + +// GetSsoLoginLogoutUrlOk returns a tuple with the SsoLoginLogoutUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoLoginLogoutUrlOk() (*string, bool) { + if o == nil || IsNil(o.SsoLoginLogoutUrl) { + return nil, false + } + return o.SsoLoginLogoutUrl, true +} + +// HasSsoLoginLogoutUrl returns a boolean if a field has been set. +func (o *License) HasSsoLoginLogoutUrl() bool { + if o != nil && !IsNil(o.SsoLoginLogoutUrl) { + return true + } + + return false +} + +// SetSsoLoginLogoutUrl gets a reference to the given string and assigns it to the SsoLoginLogoutUrl field. +func (o *License) SetSsoLoginLogoutUrl(v string) { + o.SsoLoginLogoutUrl = &v +} + +// GetSsoDefaultRole returns the SsoDefaultRole field value if set, zero value otherwise. +func (o *License) GetSsoDefaultRole() string { + if o == nil || IsNil(o.SsoDefaultRole) { + var ret string + return ret + } + return *o.SsoDefaultRole +} + +// GetSsoDefaultRoleOk returns a tuple with the SsoDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetSsoDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.SsoDefaultRole) { + return nil, false + } + return o.SsoDefaultRole, true +} + +// HasSsoDefaultRole returns a boolean if a field has been set. +func (o *License) HasSsoDefaultRole() bool { + if o != nil && !IsNil(o.SsoDefaultRole) { + return true + } + + return false +} + +// SetSsoDefaultRole gets a reference to the given string and assigns it to the SsoDefaultRole field. +func (o *License) SetSsoDefaultRole(v string) { + o.SsoDefaultRole = &v +} + +// GetPartner returns the Partner field value if set, zero value otherwise. +func (o *License) GetPartner() string { + if o == nil || IsNil(o.Partner) { + var ret string + return ret + } + return *o.Partner +} + +// GetPartnerOk returns a tuple with the Partner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetPartnerOk() (*string, bool) { + if o == nil || IsNil(o.Partner) { + return nil, false + } + return o.Partner, true +} + +// HasPartner returns a boolean if a field has been set. +func (o *License) HasPartner() bool { + if o != nil && !IsNil(o.Partner) { + return true + } + + return false +} + +// SetPartner gets a reference to the given string and assigns it to the Partner field. +func (o *License) SetPartner(v string) { + o.Partner = &v +} + +func (o License) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o License) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ActivatedAt) { + toSerialize["activated_at"] = o.ActivatedAt + } + if !IsNil(o.LicenseType) { + toSerialize["license_type"] = o.LicenseType + } + if !IsNil(o.LicenseExpiration) { + toSerialize["license_expiration"] = o.LicenseExpiration + } + if !IsNil(o.LicenseMaxAssets) { + toSerialize["license_max_assets"] = o.LicenseMaxAssets + } + if !IsNil(o.LicenseLiveAssetCount) { + toSerialize["license_live_asset_count"] = o.LicenseLiveAssetCount + } + if !IsNil(o.LicenseProjectAssetCount) { + toSerialize["license_project_asset_count"] = o.LicenseProjectAssetCount + } + if !IsNil(o.ViaReseller) { + toSerialize["via_reseller"] = o.ViaReseller + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + if !IsNil(o.AddressStreet) { + toSerialize["address_street"] = o.AddressStreet + } + if !IsNil(o.AddressCountry) { + toSerialize["address_country"] = o.AddressCountry + } + if !IsNil(o.AddressCity) { + toSerialize["address_city"] = o.AddressCity + } + if !IsNil(o.AddressRegion) { + toSerialize["address_region"] = o.AddressRegion + } + if !IsNil(o.AddressPostal) { + toSerialize["address_postal"] = o.AddressPostal + } + if !IsNil(o.SubscriptionPeriodStart) { + toSerialize["subscription_period_start"] = o.SubscriptionPeriodStart + } + if !IsNil(o.SubscriptionPeriodEnd) { + toSerialize["subscription_period_end"] = o.SubscriptionPeriodEnd + } + if !IsNil(o.SubscriptionCancelAt) { + toSerialize["subscription_cancel_at"] = o.SubscriptionCancelAt + } + if !IsNil(o.SubscriptionCanceledAt) { + toSerialize["subscription_canceled_at"] = o.SubscriptionCanceledAt + } + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + if !IsNil(o.SsoType) { + toSerialize["sso_type"] = o.SsoType + } + if !IsNil(o.SsoDomain) { + toSerialize["sso_domain"] = o.SsoDomain + } + if !IsNil(o.SsoMode) { + toSerialize["sso_mode"] = o.SsoMode + } + if !IsNil(o.SsoLoginMessage) { + toSerialize["sso_login_message"] = o.SsoLoginMessage + } + if !IsNil(o.SsoLoginIssuerUrl) { + toSerialize["sso_login_issuer_url"] = o.SsoLoginIssuerUrl + } + if !IsNil(o.SsoLoginLoginUrl) { + toSerialize["sso_login_login_url"] = o.SsoLoginLoginUrl + } + if !IsNil(o.SsoLoginLogoutUrl) { + toSerialize["sso_login_logout_url"] = o.SsoLoginLogoutUrl + } + if !IsNil(o.SsoDefaultRole) { + toSerialize["sso_default_role"] = o.SsoDefaultRole + } + if !IsNil(o.Partner) { + toSerialize["partner"] = o.Partner + } + return toSerialize, nil +} + +type NullableLicense struct { + value *License + isSet bool +} + +func (v NullableLicense) Get() *License { + return v.value +} + +func (v *NullableLicense) Set(val *License) { + v.value = val + v.isSet = true +} + +func (v NullableLicense) IsSet() bool { + return v.isSet +} + +func (v *NullableLicense) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLicense(val *License) *NullableLicense { + return &NullableLicense{value: val, isSet: true} +} + +func (v NullableLicense) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLicense) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_mecm_credential_fields.go b/go/model_mecm_credential_fields.go new file mode 100644 index 0000000..b7cf4e7 --- /dev/null +++ b/go/model_mecm_credential_fields.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MECMCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MECMCredentialFields{} + +// MECMCredentialFields struct for MECMCredentialFields +type MECMCredentialFields struct { + DbConnectionString string `json:"db_connection_string"` +} + +type _MECMCredentialFields MECMCredentialFields + +// NewMECMCredentialFields instantiates a new MECMCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMECMCredentialFields(dbConnectionString string) *MECMCredentialFields { + this := MECMCredentialFields{} + this.DbConnectionString = dbConnectionString + return &this +} + +// NewMECMCredentialFieldsWithDefaults instantiates a new MECMCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMECMCredentialFieldsWithDefaults() *MECMCredentialFields { + this := MECMCredentialFields{} + return &this +} + +// GetDbConnectionString returns the DbConnectionString field value +func (o *MECMCredentialFields) GetDbConnectionString() string { + if o == nil { + var ret string + return ret + } + + return o.DbConnectionString +} + +// GetDbConnectionStringOk returns a tuple with the DbConnectionString field value +// and a boolean to check if the value has been set. +func (o *MECMCredentialFields) GetDbConnectionStringOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DbConnectionString, true +} + +// SetDbConnectionString sets field value +func (o *MECMCredentialFields) SetDbConnectionString(v string) { + o.DbConnectionString = v +} + +func (o MECMCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MECMCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["db_connection_string"] = o.DbConnectionString + return toSerialize, nil +} + +func (o *MECMCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "db_connection_string", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMECMCredentialFields := _MECMCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMECMCredentialFields) + + if err != nil { + return err + } + + *o = MECMCredentialFields(varMECMCredentialFields) + + return err +} + +type NullableMECMCredentialFields struct { + value *MECMCredentialFields + isSet bool +} + +func (v NullableMECMCredentialFields) Get() *MECMCredentialFields { + return v.value +} + +func (v *NullableMECMCredentialFields) Set(val *MECMCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableMECMCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableMECMCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMECMCredentialFields(val *MECMCredentialFields) *NullableMECMCredentialFields { + return &NullableMECMCredentialFields{value: val, isSet: true} +} + +func (v NullableMECMCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMECMCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_miradore_credential_fields.go b/go/model_miradore_credential_fields.go new file mode 100644 index 0000000..947726d --- /dev/null +++ b/go/model_miradore_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MiradoreCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MiradoreCredentialFields{} + +// MiradoreCredentialFields struct for MiradoreCredentialFields +type MiradoreCredentialFields struct { + Hostname string `json:"hostname"` + ApiKey string `json:"api_key"` +} + +type _MiradoreCredentialFields MiradoreCredentialFields + +// NewMiradoreCredentialFields instantiates a new MiradoreCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMiradoreCredentialFields(hostname string, apiKey string) *MiradoreCredentialFields { + this := MiradoreCredentialFields{} + this.Hostname = hostname + this.ApiKey = apiKey + return &this +} + +// NewMiradoreCredentialFieldsWithDefaults instantiates a new MiradoreCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMiradoreCredentialFieldsWithDefaults() *MiradoreCredentialFields { + this := MiradoreCredentialFields{} + return &this +} + +// GetHostname returns the Hostname field value +func (o *MiradoreCredentialFields) GetHostname() string { + if o == nil { + var ret string + return ret + } + + return o.Hostname +} + +// GetHostnameOk returns a tuple with the Hostname field value +// and a boolean to check if the value has been set. +func (o *MiradoreCredentialFields) GetHostnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Hostname, true +} + +// SetHostname sets field value +func (o *MiradoreCredentialFields) SetHostname(v string) { + o.Hostname = v +} + +// GetApiKey returns the ApiKey field value +func (o *MiradoreCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *MiradoreCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *MiradoreCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o MiradoreCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MiradoreCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["hostname"] = o.Hostname + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *MiradoreCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "hostname", + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMiradoreCredentialFields := _MiradoreCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMiradoreCredentialFields) + + if err != nil { + return err + } + + *o = MiradoreCredentialFields(varMiradoreCredentialFields) + + return err +} + +type NullableMiradoreCredentialFields struct { + value *MiradoreCredentialFields + isSet bool +} + +func (v NullableMiradoreCredentialFields) Get() *MiradoreCredentialFields { + return v.value +} + +func (v *NullableMiradoreCredentialFields) Set(val *MiradoreCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableMiradoreCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableMiradoreCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMiradoreCredentialFields(val *MiradoreCredentialFields) *NullableMiradoreCredentialFields { + return &NullableMiradoreCredentialFields{value: val, isSet: true} +} + +func (v NullableMiradoreCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMiradoreCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_miraki_credential_fields.go b/go/model_miraki_credential_fields.go new file mode 100644 index 0000000..34a5e9f --- /dev/null +++ b/go/model_miraki_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MirakiCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MirakiCredentialFields{} + +// MirakiCredentialFields struct for MirakiCredentialFields +type MirakiCredentialFields struct { + ApiUrl string `json:"api_url"` + ApiKey string `json:"api_key"` +} + +type _MirakiCredentialFields MirakiCredentialFields + +// NewMirakiCredentialFields instantiates a new MirakiCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMirakiCredentialFields(apiUrl string, apiKey string) *MirakiCredentialFields { + this := MirakiCredentialFields{} + this.ApiUrl = apiUrl + this.ApiKey = apiKey + return &this +} + +// NewMirakiCredentialFieldsWithDefaults instantiates a new MirakiCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMirakiCredentialFieldsWithDefaults() *MirakiCredentialFields { + this := MirakiCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *MirakiCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *MirakiCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *MirakiCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetApiKey returns the ApiKey field value +func (o *MirakiCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *MirakiCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *MirakiCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o MirakiCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MirakiCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *MirakiCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMirakiCredentialFields := _MirakiCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMirakiCredentialFields) + + if err != nil { + return err + } + + *o = MirakiCredentialFields(varMirakiCredentialFields) + + return err +} + +type NullableMirakiCredentialFields struct { + value *MirakiCredentialFields + isSet bool +} + +func (v NullableMirakiCredentialFields) Get() *MirakiCredentialFields { + return v.value +} + +func (v *NullableMirakiCredentialFields) Set(val *MirakiCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableMirakiCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableMirakiCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMirakiCredentialFields(val *MirakiCredentialFields) *NullableMirakiCredentialFields { + return &NullableMirakiCredentialFields{value: val, isSet: true} +} + +func (v NullableMirakiCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMirakiCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_nessus_credential_fields.go b/go/model_nessus_credential_fields.go new file mode 100644 index 0000000..93ed5e4 --- /dev/null +++ b/go/model_nessus_credential_fields.go @@ -0,0 +1,287 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NessusCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NessusCredentialFields{} + +// NessusCredentialFields struct for NessusCredentialFields +type NessusCredentialFields struct { + ApiUrl string `json:"api_url"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + Insecure *string `json:"insecure,omitempty"` + Thumbprints *string `json:"thumbprints,omitempty"` +} + +type _NessusCredentialFields NessusCredentialFields + +// NewNessusCredentialFields instantiates a new NessusCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNessusCredentialFields(apiUrl string, accessKey string, secretKey string) *NessusCredentialFields { + this := NessusCredentialFields{} + this.ApiUrl = apiUrl + this.AccessKey = accessKey + this.SecretKey = secretKey + return &this +} + +// NewNessusCredentialFieldsWithDefaults instantiates a new NessusCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNessusCredentialFieldsWithDefaults() *NessusCredentialFields { + this := NessusCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *NessusCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *NessusCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *NessusCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetAccessKey returns the AccessKey field value +func (o *NessusCredentialFields) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *NessusCredentialFields) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *NessusCredentialFields) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *NessusCredentialFields) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *NessusCredentialFields) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *NessusCredentialFields) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetInsecure returns the Insecure field value if set, zero value otherwise. +func (o *NessusCredentialFields) GetInsecure() string { + if o == nil || IsNil(o.Insecure) { + var ret string + return ret + } + return *o.Insecure +} + +// GetInsecureOk returns a tuple with the Insecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NessusCredentialFields) GetInsecureOk() (*string, bool) { + if o == nil || IsNil(o.Insecure) { + return nil, false + } + return o.Insecure, true +} + +// HasInsecure returns a boolean if a field has been set. +func (o *NessusCredentialFields) HasInsecure() bool { + if o != nil && !IsNil(o.Insecure) { + return true + } + + return false +} + +// SetInsecure gets a reference to the given string and assigns it to the Insecure field. +func (o *NessusCredentialFields) SetInsecure(v string) { + o.Insecure = &v +} + +// GetThumbprints returns the Thumbprints field value if set, zero value otherwise. +func (o *NessusCredentialFields) GetThumbprints() string { + if o == nil || IsNil(o.Thumbprints) { + var ret string + return ret + } + return *o.Thumbprints +} + +// GetThumbprintsOk returns a tuple with the Thumbprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NessusCredentialFields) GetThumbprintsOk() (*string, bool) { + if o == nil || IsNil(o.Thumbprints) { + return nil, false + } + return o.Thumbprints, true +} + +// HasThumbprints returns a boolean if a field has been set. +func (o *NessusCredentialFields) HasThumbprints() bool { + if o != nil && !IsNil(o.Thumbprints) { + return true + } + + return false +} + +// SetThumbprints gets a reference to the given string and assigns it to the Thumbprints field. +func (o *NessusCredentialFields) SetThumbprints(v string) { + o.Thumbprints = &v +} + +func (o NessusCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NessusCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + if !IsNil(o.Insecure) { + toSerialize["insecure"] = o.Insecure + } + if !IsNil(o.Thumbprints) { + toSerialize["thumbprints"] = o.Thumbprints + } + return toSerialize, nil +} + +func (o *NessusCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "access_key", + "secret_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNessusCredentialFields := _NessusCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNessusCredentialFields) + + if err != nil { + return err + } + + *o = NessusCredentialFields(varNessusCredentialFields) + + return err +} + +type NullableNessusCredentialFields struct { + value *NessusCredentialFields + isSet bool +} + +func (v NullableNessusCredentialFields) Get() *NessusCredentialFields { + return v.value +} + +func (v *NullableNessusCredentialFields) Set(val *NessusCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableNessusCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableNessusCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNessusCredentialFields(val *NessusCredentialFields) *NullableNessusCredentialFields { + return &NullableNessusCredentialFields{value: val, isSet: true} +} + +func (v NullableNessusCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNessusCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_netbox_credential_fields.go b/go/model_netbox_credential_fields.go new file mode 100644 index 0000000..1f13b14 --- /dev/null +++ b/go/model_netbox_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NetboxCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetboxCredentialFields{} + +// NetboxCredentialFields struct for NetboxCredentialFields +type NetboxCredentialFields struct { + ApiUrl string `json:"api_url"` + ApiKey string `json:"api_key"` +} + +type _NetboxCredentialFields NetboxCredentialFields + +// NewNetboxCredentialFields instantiates a new NetboxCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetboxCredentialFields(apiUrl string, apiKey string) *NetboxCredentialFields { + this := NetboxCredentialFields{} + this.ApiUrl = apiUrl + this.ApiKey = apiKey + return &this +} + +// NewNetboxCredentialFieldsWithDefaults instantiates a new NetboxCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetboxCredentialFieldsWithDefaults() *NetboxCredentialFields { + this := NetboxCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *NetboxCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *NetboxCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *NetboxCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetApiKey returns the ApiKey field value +func (o *NetboxCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *NetboxCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *NetboxCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o NetboxCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetboxCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *NetboxCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNetboxCredentialFields := _NetboxCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNetboxCredentialFields) + + if err != nil { + return err + } + + *o = NetboxCredentialFields(varNetboxCredentialFields) + + return err +} + +type NullableNetboxCredentialFields struct { + value *NetboxCredentialFields + isSet bool +} + +func (v NullableNetboxCredentialFields) Get() *NetboxCredentialFields { + return v.value +} + +func (v *NullableNetboxCredentialFields) Set(val *NetboxCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableNetboxCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableNetboxCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetboxCredentialFields(val *NetboxCredentialFields) *NullableNetboxCredentialFields { + return &NullableNetboxCredentialFields{value: val, isSet: true} +} + +func (v NullableNetboxCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetboxCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_network_interface.go b/go/model_network_interface.go new file mode 100644 index 0000000..b6ecbc6 --- /dev/null +++ b/go/model_network_interface.go @@ -0,0 +1,202 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the NetworkInterface type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkInterface{} + +// NetworkInterface A network interface attached to a custom-integration asset. +type NetworkInterface struct { + // Represents IPV4 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. + Ipv4Addresses []string `json:"ipv4Addresses,omitempty"` + // Represents the IPV6 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. + Ipv6Addresses []string `json:"ipv6Addresses,omitempty"` + // Represents a MAC address in IEEE 802 MAC/EUI-48, or EUI-64 form in one of the following formats: 01:23:45:67:89:AB 01:23:45:67:89:ab:cd:ef 01-23-45-67-89-ab 01-23-45-67-89-ab-cd-ef 0123.4567.89ab 0123.4567.89ab.cdef 0123 4567 89ab cdEF + MacAddress *string `json:"macAddress,omitempty"` +} + +// NewNetworkInterface instantiates a new NetworkInterface object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkInterface() *NetworkInterface { + this := NetworkInterface{} + return &this +} + +// NewNetworkInterfaceWithDefaults instantiates a new NetworkInterface object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkInterfaceWithDefaults() *NetworkInterface { + this := NetworkInterface{} + return &this +} + +// GetIpv4Addresses returns the Ipv4Addresses field value if set, zero value otherwise. +func (o *NetworkInterface) GetIpv4Addresses() []string { + if o == nil || IsNil(o.Ipv4Addresses) { + var ret []string + return ret + } + return o.Ipv4Addresses +} + +// GetIpv4AddressesOk returns a tuple with the Ipv4Addresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkInterface) GetIpv4AddressesOk() ([]string, bool) { + if o == nil || IsNil(o.Ipv4Addresses) { + return nil, false + } + return o.Ipv4Addresses, true +} + +// HasIpv4Addresses returns a boolean if a field has been set. +func (o *NetworkInterface) HasIpv4Addresses() bool { + if o != nil && !IsNil(o.Ipv4Addresses) { + return true + } + + return false +} + +// SetIpv4Addresses gets a reference to the given []string and assigns it to the Ipv4Addresses field. +func (o *NetworkInterface) SetIpv4Addresses(v []string) { + o.Ipv4Addresses = v +} + +// GetIpv6Addresses returns the Ipv6Addresses field value if set, zero value otherwise. +func (o *NetworkInterface) GetIpv6Addresses() []string { + if o == nil || IsNil(o.Ipv6Addresses) { + var ret []string + return ret + } + return o.Ipv6Addresses +} + +// GetIpv6AddressesOk returns a tuple with the Ipv6Addresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkInterface) GetIpv6AddressesOk() ([]string, bool) { + if o == nil || IsNil(o.Ipv6Addresses) { + return nil, false + } + return o.Ipv6Addresses, true +} + +// HasIpv6Addresses returns a boolean if a field has been set. +func (o *NetworkInterface) HasIpv6Addresses() bool { + if o != nil && !IsNil(o.Ipv6Addresses) { + return true + } + + return false +} + +// SetIpv6Addresses gets a reference to the given []string and assigns it to the Ipv6Addresses field. +func (o *NetworkInterface) SetIpv6Addresses(v []string) { + o.Ipv6Addresses = v +} + +// GetMacAddress returns the MacAddress field value if set, zero value otherwise. +func (o *NetworkInterface) GetMacAddress() string { + if o == nil || IsNil(o.MacAddress) { + var ret string + return ret + } + return *o.MacAddress +} + +// GetMacAddressOk returns a tuple with the MacAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkInterface) GetMacAddressOk() (*string, bool) { + if o == nil || IsNil(o.MacAddress) { + return nil, false + } + return o.MacAddress, true +} + +// HasMacAddress returns a boolean if a field has been set. +func (o *NetworkInterface) HasMacAddress() bool { + if o != nil && !IsNil(o.MacAddress) { + return true + } + + return false +} + +// SetMacAddress gets a reference to the given string and assigns it to the MacAddress field. +func (o *NetworkInterface) SetMacAddress(v string) { + o.MacAddress = &v +} + +func (o NetworkInterface) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkInterface) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4Addresses) { + toSerialize["ipv4Addresses"] = o.Ipv4Addresses + } + if !IsNil(o.Ipv6Addresses) { + toSerialize["ipv6Addresses"] = o.Ipv6Addresses + } + if !IsNil(o.MacAddress) { + toSerialize["macAddress"] = o.MacAddress + } + return toSerialize, nil +} + +type NullableNetworkInterface struct { + value *NetworkInterface + isSet bool +} + +func (v NullableNetworkInterface) Get() *NetworkInterface { + return v.value +} + +func (v *NullableNetworkInterface) Set(val *NetworkInterface) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkInterface) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkInterface) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkInterface(val *NetworkInterface) *NullableNetworkInterface { + return &NullableNetworkInterface{value: val, isSet: true} +} + +func (v NullableNetworkInterface) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkInterface) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_org_options.go b/go/model_org_options.go index 049eef5..1d4b14d 100644 --- a/go/model_org_options.go +++ b/go/model_org_options.go @@ -1,12 +1,13 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi @@ -14,10 +15,26 @@ import ( "encoding/json" ) +// checks if the OrgOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgOptions{} + // OrgOptions struct for OrgOptions type OrgOptions struct { - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + // Number of days before stale assets are expired, as a decimal string. + ExpirationAssetsStale *string `json:"expiration_assets_stale,omitempty"` + // Number of days before offline assets are expired, as a decimal string. + ExpirationAssetsOffline *string `json:"expiration_assets_offline,omitempty"` + // Number of days before integration attributes are expired, as a decimal string. + ExpirationIntegrationAttributes *string `json:"expiration_integration_attributes,omitempty"` + // Number of days before scan data is expired, as a decimal string. + ExpirationScans *string `json:"expiration_scans,omitempty"` + // Number of days before vulnerabilities are expired, as a decimal string. + ExpirationVulnerabilities *string `json:"expiration_vulnerabilities,omitempty"` + // Whether to retain only the latest integration attribute values, as a boolean string (\"true\"/\"false\"). + KeepLatestIntegrationAttributes *string `json:"keep_latest_integration_attributes,omitempty"` } // NewOrgOptions instantiates a new OrgOptions object @@ -39,7 +56,7 @@ func NewOrgOptionsWithDefaults() *OrgOptions { // GetName returns the Name field value if set, zero value otherwise. func (o *OrgOptions) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -49,7 +66,7 @@ func (o *OrgOptions) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OrgOptions) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -57,7 +74,7 @@ func (o *OrgOptions) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *OrgOptions) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -71,7 +88,7 @@ func (o *OrgOptions) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *OrgOptions) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -81,7 +98,7 @@ func (o *OrgOptions) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OrgOptions) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -89,7 +106,7 @@ func (o *OrgOptions) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *OrgOptions) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -101,15 +118,268 @@ func (o *OrgOptions) SetDescription(v string) { o.Description = &v } +// GetParentId returns the ParentId field value if set, zero value otherwise. +func (o *OrgOptions) GetParentId() string { + if o == nil || IsNil(o.ParentId) { + var ret string + return ret + } + return *o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetParentIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentId) { + return nil, false + } + return o.ParentId, true +} + +// HasParentId returns a boolean if a field has been set. +func (o *OrgOptions) HasParentId() bool { + if o != nil && !IsNil(o.ParentId) { + return true + } + + return false +} + +// SetParentId gets a reference to the given string and assigns it to the ParentId field. +func (o *OrgOptions) SetParentId(v string) { + o.ParentId = &v +} + +// GetExpirationAssetsStale returns the ExpirationAssetsStale field value if set, zero value otherwise. +func (o *OrgOptions) GetExpirationAssetsStale() string { + if o == nil || IsNil(o.ExpirationAssetsStale) { + var ret string + return ret + } + return *o.ExpirationAssetsStale +} + +// GetExpirationAssetsStaleOk returns a tuple with the ExpirationAssetsStale field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetExpirationAssetsStaleOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationAssetsStale) { + return nil, false + } + return o.ExpirationAssetsStale, true +} + +// HasExpirationAssetsStale returns a boolean if a field has been set. +func (o *OrgOptions) HasExpirationAssetsStale() bool { + if o != nil && !IsNil(o.ExpirationAssetsStale) { + return true + } + + return false +} + +// SetExpirationAssetsStale gets a reference to the given string and assigns it to the ExpirationAssetsStale field. +func (o *OrgOptions) SetExpirationAssetsStale(v string) { + o.ExpirationAssetsStale = &v +} + +// GetExpirationAssetsOffline returns the ExpirationAssetsOffline field value if set, zero value otherwise. +func (o *OrgOptions) GetExpirationAssetsOffline() string { + if o == nil || IsNil(o.ExpirationAssetsOffline) { + var ret string + return ret + } + return *o.ExpirationAssetsOffline +} + +// GetExpirationAssetsOfflineOk returns a tuple with the ExpirationAssetsOffline field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetExpirationAssetsOfflineOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationAssetsOffline) { + return nil, false + } + return o.ExpirationAssetsOffline, true +} + +// HasExpirationAssetsOffline returns a boolean if a field has been set. +func (o *OrgOptions) HasExpirationAssetsOffline() bool { + if o != nil && !IsNil(o.ExpirationAssetsOffline) { + return true + } + + return false +} + +// SetExpirationAssetsOffline gets a reference to the given string and assigns it to the ExpirationAssetsOffline field. +func (o *OrgOptions) SetExpirationAssetsOffline(v string) { + o.ExpirationAssetsOffline = &v +} + +// GetExpirationIntegrationAttributes returns the ExpirationIntegrationAttributes field value if set, zero value otherwise. +func (o *OrgOptions) GetExpirationIntegrationAttributes() string { + if o == nil || IsNil(o.ExpirationIntegrationAttributes) { + var ret string + return ret + } + return *o.ExpirationIntegrationAttributes +} + +// GetExpirationIntegrationAttributesOk returns a tuple with the ExpirationIntegrationAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetExpirationIntegrationAttributesOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationIntegrationAttributes) { + return nil, false + } + return o.ExpirationIntegrationAttributes, true +} + +// HasExpirationIntegrationAttributes returns a boolean if a field has been set. +func (o *OrgOptions) HasExpirationIntegrationAttributes() bool { + if o != nil && !IsNil(o.ExpirationIntegrationAttributes) { + return true + } + + return false +} + +// SetExpirationIntegrationAttributes gets a reference to the given string and assigns it to the ExpirationIntegrationAttributes field. +func (o *OrgOptions) SetExpirationIntegrationAttributes(v string) { + o.ExpirationIntegrationAttributes = &v +} + +// GetExpirationScans returns the ExpirationScans field value if set, zero value otherwise. +func (o *OrgOptions) GetExpirationScans() string { + if o == nil || IsNil(o.ExpirationScans) { + var ret string + return ret + } + return *o.ExpirationScans +} + +// GetExpirationScansOk returns a tuple with the ExpirationScans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetExpirationScansOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationScans) { + return nil, false + } + return o.ExpirationScans, true +} + +// HasExpirationScans returns a boolean if a field has been set. +func (o *OrgOptions) HasExpirationScans() bool { + if o != nil && !IsNil(o.ExpirationScans) { + return true + } + + return false +} + +// SetExpirationScans gets a reference to the given string and assigns it to the ExpirationScans field. +func (o *OrgOptions) SetExpirationScans(v string) { + o.ExpirationScans = &v +} + +// GetExpirationVulnerabilities returns the ExpirationVulnerabilities field value if set, zero value otherwise. +func (o *OrgOptions) GetExpirationVulnerabilities() string { + if o == nil || IsNil(o.ExpirationVulnerabilities) { + var ret string + return ret + } + return *o.ExpirationVulnerabilities +} + +// GetExpirationVulnerabilitiesOk returns a tuple with the ExpirationVulnerabilities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetExpirationVulnerabilitiesOk() (*string, bool) { + if o == nil || IsNil(o.ExpirationVulnerabilities) { + return nil, false + } + return o.ExpirationVulnerabilities, true +} + +// HasExpirationVulnerabilities returns a boolean if a field has been set. +func (o *OrgOptions) HasExpirationVulnerabilities() bool { + if o != nil && !IsNil(o.ExpirationVulnerabilities) { + return true + } + + return false +} + +// SetExpirationVulnerabilities gets a reference to the given string and assigns it to the ExpirationVulnerabilities field. +func (o *OrgOptions) SetExpirationVulnerabilities(v string) { + o.ExpirationVulnerabilities = &v +} + +// GetKeepLatestIntegrationAttributes returns the KeepLatestIntegrationAttributes field value if set, zero value otherwise. +func (o *OrgOptions) GetKeepLatestIntegrationAttributes() string { + if o == nil || IsNil(o.KeepLatestIntegrationAttributes) { + var ret string + return ret + } + return *o.KeepLatestIntegrationAttributes +} + +// GetKeepLatestIntegrationAttributesOk returns a tuple with the KeepLatestIntegrationAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrgOptions) GetKeepLatestIntegrationAttributesOk() (*string, bool) { + if o == nil || IsNil(o.KeepLatestIntegrationAttributes) { + return nil, false + } + return o.KeepLatestIntegrationAttributes, true +} + +// HasKeepLatestIntegrationAttributes returns a boolean if a field has been set. +func (o *OrgOptions) HasKeepLatestIntegrationAttributes() bool { + if o != nil && !IsNil(o.KeepLatestIntegrationAttributes) { + return true + } + + return false +} + +// SetKeepLatestIntegrationAttributes gets a reference to the given string and assigns it to the KeepLatestIntegrationAttributes field. +func (o *OrgOptions) SetKeepLatestIntegrationAttributes(v string) { + o.KeepLatestIntegrationAttributes = &v +} + func (o OrgOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrgOptions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Description != nil { + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - return json.Marshal(toSerialize) + if !IsNil(o.ParentId) { + toSerialize["parent_id"] = o.ParentId + } + if !IsNil(o.ExpirationAssetsStale) { + toSerialize["expiration_assets_stale"] = o.ExpirationAssetsStale + } + if !IsNil(o.ExpirationAssetsOffline) { + toSerialize["expiration_assets_offline"] = o.ExpirationAssetsOffline + } + if !IsNil(o.ExpirationIntegrationAttributes) { + toSerialize["expiration_integration_attributes"] = o.ExpirationIntegrationAttributes + } + if !IsNil(o.ExpirationScans) { + toSerialize["expiration_scans"] = o.ExpirationScans + } + if !IsNil(o.ExpirationVulnerabilities) { + toSerialize["expiration_vulnerabilities"] = o.ExpirationVulnerabilities + } + if !IsNil(o.KeepLatestIntegrationAttributes) { + toSerialize["keep_latest_integration_attributes"] = o.KeepLatestIntegrationAttributes + } + return toSerialize, nil } type NullableOrgOptions struct { @@ -147,3 +417,5 @@ func (v *NullableOrgOptions) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_organization.go b/go/model_organization.go index 0051ea6..79f091b 100644 --- a/go/model_organization.go +++ b/go/model_organization.go @@ -1,44 +1,64 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the Organization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Organization{} + // Organization struct for Organization type Organization struct { - Id string `json:"id"` - CreatedAt *int64 `json:"created_at,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - ClientId *string `json:"client_id,omitempty"` - DownloadToken *string `json:"download_token,omitempty"` - DownloadTokenCreatedAt *int64 `json:"download_token_created_at,omitempty"` - Permanent *bool `json:"permanent,omitempty"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Inactive *bool `json:"inactive,omitempty"` - DeactivatedAt *int64 `json:"deactivated_at,omitempty"` - ServiceCount *int64 `json:"service_count,omitempty"` - ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` - ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` - ServiceCountArp *int64 `json:"service_count_arp,omitempty"` - ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` - AssetCount *int64 `json:"asset_count,omitempty"` - ExportToken *string `json:"export_token,omitempty"` - ExportTokenCreatedAt *int64 `json:"export_token_created_at,omitempty"` - ExportTokenLastUsedAt *int64 `json:"export_token_last_used_at,omitempty"` - ExportTokenLastUsedBy *string `json:"export_token_last_used_by,omitempty"` - ExportTokenCounter *int64 `json:"export_token_counter,omitempty"` -} + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + ClientId *string `json:"client_id,omitempty"` + DownloadToken *string `json:"download_token,omitempty"` + DownloadTokenCreatedAt *int64 `json:"download_token_created_at,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Inactive *bool `json:"inactive,omitempty"` + DeactivatedAt *int64 `json:"deactivated_at,omitempty"` + ServiceCount *int64 `json:"service_count,omitempty"` + ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` + ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` + ServiceCountArp *int64 `json:"service_count_arp,omitempty"` + ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` + AssetCount *int64 `json:"asset_count,omitempty"` + Project *bool `json:"project,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + ExpirationAssetsStale *int64 `json:"expiration_assets_stale,omitempty"` + ExpirationAssetsOffline *int64 `json:"expiration_assets_offline,omitempty"` + ExpirationIntegrationAttributes *int64 `json:"expiration_integration_attributes,omitempty"` + ExpirationScans *int64 `json:"expiration_scans,omitempty"` + ExpirationVulnerabilities *int64 `json:"expiration_vulnerabilities,omitempty"` + // Deprecated + ExportToken *string `json:"export_token,omitempty"` + // Deprecated + ExportTokenCreatedAt *int64 `json:"export_token_created_at,omitempty"` + // Deprecated + ExportTokenLastUsedAt *int64 `json:"export_token_last_used_at,omitempty"` + // Deprecated + ExportTokenLastUsedBy *string `json:"export_token_last_used_by,omitempty"` + // Deprecated + ExportTokenCounter *int64 `json:"export_token_counter,omitempty"` + KeepLatestIntegrationAttributes *bool `json:"keep_latest_integration_attributes,omitempty"` +} + +type _Organization Organization // NewOrganization instantiates a new Organization object // This constructor will assign default values to properties that have it defined, @@ -85,7 +105,7 @@ func (o *Organization) SetId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Organization) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -95,7 +115,7 @@ func (o *Organization) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -103,7 +123,7 @@ func (o *Organization) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Organization) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -117,7 +137,7 @@ func (o *Organization) SetCreatedAt(v int64) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Organization) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -127,7 +147,7 @@ func (o *Organization) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -135,7 +155,7 @@ func (o *Organization) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Organization) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -149,7 +169,7 @@ func (o *Organization) SetUpdatedAt(v int64) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *Organization) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -159,7 +179,7 @@ func (o *Organization) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -167,7 +187,7 @@ func (o *Organization) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *Organization) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -181,7 +201,7 @@ func (o *Organization) SetClientId(v string) { // GetDownloadToken returns the DownloadToken field value if set, zero value otherwise. func (o *Organization) GetDownloadToken() string { - if o == nil || o.DownloadToken == nil { + if o == nil || IsNil(o.DownloadToken) { var ret string return ret } @@ -191,7 +211,7 @@ func (o *Organization) GetDownloadToken() string { // GetDownloadTokenOk returns a tuple with the DownloadToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetDownloadTokenOk() (*string, bool) { - if o == nil || o.DownloadToken == nil { + if o == nil || IsNil(o.DownloadToken) { return nil, false } return o.DownloadToken, true @@ -199,7 +219,7 @@ func (o *Organization) GetDownloadTokenOk() (*string, bool) { // HasDownloadToken returns a boolean if a field has been set. func (o *Organization) HasDownloadToken() bool { - if o != nil && o.DownloadToken != nil { + if o != nil && !IsNil(o.DownloadToken) { return true } @@ -213,7 +233,7 @@ func (o *Organization) SetDownloadToken(v string) { // GetDownloadTokenCreatedAt returns the DownloadTokenCreatedAt field value if set, zero value otherwise. func (o *Organization) GetDownloadTokenCreatedAt() int64 { - if o == nil || o.DownloadTokenCreatedAt == nil { + if o == nil || IsNil(o.DownloadTokenCreatedAt) { var ret int64 return ret } @@ -223,7 +243,7 @@ func (o *Organization) GetDownloadTokenCreatedAt() int64 { // GetDownloadTokenCreatedAtOk returns a tuple with the DownloadTokenCreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetDownloadTokenCreatedAtOk() (*int64, bool) { - if o == nil || o.DownloadTokenCreatedAt == nil { + if o == nil || IsNil(o.DownloadTokenCreatedAt) { return nil, false } return o.DownloadTokenCreatedAt, true @@ -231,7 +251,7 @@ func (o *Organization) GetDownloadTokenCreatedAtOk() (*int64, bool) { // HasDownloadTokenCreatedAt returns a boolean if a field has been set. func (o *Organization) HasDownloadTokenCreatedAt() bool { - if o != nil && o.DownloadTokenCreatedAt != nil { + if o != nil && !IsNil(o.DownloadTokenCreatedAt) { return true } @@ -243,38 +263,6 @@ func (o *Organization) SetDownloadTokenCreatedAt(v int64) { o.DownloadTokenCreatedAt = &v } -// GetPermanent returns the Permanent field value if set, zero value otherwise. -func (o *Organization) GetPermanent() bool { - if o == nil || o.Permanent == nil { - var ret bool - return ret - } - return *o.Permanent -} - -// GetPermanentOk returns a tuple with the Permanent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Organization) GetPermanentOk() (*bool, bool) { - if o == nil || o.Permanent == nil { - return nil, false - } - return o.Permanent, true -} - -// HasPermanent returns a boolean if a field has been set. -func (o *Organization) HasPermanent() bool { - if o != nil && o.Permanent != nil { - return true - } - - return false -} - -// SetPermanent gets a reference to the given bool and assigns it to the Permanent field. -func (o *Organization) SetPermanent(v bool) { - o.Permanent = &v -} - // GetName returns the Name field value func (o *Organization) GetName() string { if o == nil { @@ -301,7 +289,7 @@ func (o *Organization) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *Organization) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -311,7 +299,7 @@ func (o *Organization) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -319,7 +307,7 @@ func (o *Organization) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *Organization) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -333,7 +321,7 @@ func (o *Organization) SetDescription(v string) { // GetInactive returns the Inactive field value if set, zero value otherwise. func (o *Organization) GetInactive() bool { - if o == nil || o.Inactive == nil { + if o == nil || IsNil(o.Inactive) { var ret bool return ret } @@ -343,7 +331,7 @@ func (o *Organization) GetInactive() bool { // GetInactiveOk returns a tuple with the Inactive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetInactiveOk() (*bool, bool) { - if o == nil || o.Inactive == nil { + if o == nil || IsNil(o.Inactive) { return nil, false } return o.Inactive, true @@ -351,7 +339,7 @@ func (o *Organization) GetInactiveOk() (*bool, bool) { // HasInactive returns a boolean if a field has been set. func (o *Organization) HasInactive() bool { - if o != nil && o.Inactive != nil { + if o != nil && !IsNil(o.Inactive) { return true } @@ -365,7 +353,7 @@ func (o *Organization) SetInactive(v bool) { // GetDeactivatedAt returns the DeactivatedAt field value if set, zero value otherwise. func (o *Organization) GetDeactivatedAt() int64 { - if o == nil || o.DeactivatedAt == nil { + if o == nil || IsNil(o.DeactivatedAt) { var ret int64 return ret } @@ -375,7 +363,7 @@ func (o *Organization) GetDeactivatedAt() int64 { // GetDeactivatedAtOk returns a tuple with the DeactivatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetDeactivatedAtOk() (*int64, bool) { - if o == nil || o.DeactivatedAt == nil { + if o == nil || IsNil(o.DeactivatedAt) { return nil, false } return o.DeactivatedAt, true @@ -383,7 +371,7 @@ func (o *Organization) GetDeactivatedAtOk() (*int64, bool) { // HasDeactivatedAt returns a boolean if a field has been set. func (o *Organization) HasDeactivatedAt() bool { - if o != nil && o.DeactivatedAt != nil { + if o != nil && !IsNil(o.DeactivatedAt) { return true } @@ -397,7 +385,7 @@ func (o *Organization) SetDeactivatedAt(v int64) { // GetServiceCount returns the ServiceCount field value if set, zero value otherwise. func (o *Organization) GetServiceCount() int64 { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { var ret int64 return ret } @@ -407,7 +395,7 @@ func (o *Organization) GetServiceCount() int64 { // GetServiceCountOk returns a tuple with the ServiceCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetServiceCountOk() (*int64, bool) { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { return nil, false } return o.ServiceCount, true @@ -415,7 +403,7 @@ func (o *Organization) GetServiceCountOk() (*int64, bool) { // HasServiceCount returns a boolean if a field has been set. func (o *Organization) HasServiceCount() bool { - if o != nil && o.ServiceCount != nil { + if o != nil && !IsNil(o.ServiceCount) { return true } @@ -429,7 +417,7 @@ func (o *Organization) SetServiceCount(v int64) { // GetServiceCountTcp returns the ServiceCountTcp field value if set, zero value otherwise. func (o *Organization) GetServiceCountTcp() int64 { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { var ret int64 return ret } @@ -439,7 +427,7 @@ func (o *Organization) GetServiceCountTcp() int64 { // GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetServiceCountTcpOk() (*int64, bool) { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { return nil, false } return o.ServiceCountTcp, true @@ -447,7 +435,7 @@ func (o *Organization) GetServiceCountTcpOk() (*int64, bool) { // HasServiceCountTcp returns a boolean if a field has been set. func (o *Organization) HasServiceCountTcp() bool { - if o != nil && o.ServiceCountTcp != nil { + if o != nil && !IsNil(o.ServiceCountTcp) { return true } @@ -461,7 +449,7 @@ func (o *Organization) SetServiceCountTcp(v int64) { // GetServiceCountUdp returns the ServiceCountUdp field value if set, zero value otherwise. func (o *Organization) GetServiceCountUdp() int64 { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { var ret int64 return ret } @@ -471,7 +459,7 @@ func (o *Organization) GetServiceCountUdp() int64 { // GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetServiceCountUdpOk() (*int64, bool) { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { return nil, false } return o.ServiceCountUdp, true @@ -479,7 +467,7 @@ func (o *Organization) GetServiceCountUdpOk() (*int64, bool) { // HasServiceCountUdp returns a boolean if a field has been set. func (o *Organization) HasServiceCountUdp() bool { - if o != nil && o.ServiceCountUdp != nil { + if o != nil && !IsNil(o.ServiceCountUdp) { return true } @@ -493,7 +481,7 @@ func (o *Organization) SetServiceCountUdp(v int64) { // GetServiceCountArp returns the ServiceCountArp field value if set, zero value otherwise. func (o *Organization) GetServiceCountArp() int64 { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { var ret int64 return ret } @@ -503,7 +491,7 @@ func (o *Organization) GetServiceCountArp() int64 { // GetServiceCountArpOk returns a tuple with the ServiceCountArp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetServiceCountArpOk() (*int64, bool) { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { return nil, false } return o.ServiceCountArp, true @@ -511,7 +499,7 @@ func (o *Organization) GetServiceCountArpOk() (*int64, bool) { // HasServiceCountArp returns a boolean if a field has been set. func (o *Organization) HasServiceCountArp() bool { - if o != nil && o.ServiceCountArp != nil { + if o != nil && !IsNil(o.ServiceCountArp) { return true } @@ -525,7 +513,7 @@ func (o *Organization) SetServiceCountArp(v int64) { // GetServiceCountIcmp returns the ServiceCountIcmp field value if set, zero value otherwise. func (o *Organization) GetServiceCountIcmp() int64 { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { var ret int64 return ret } @@ -535,7 +523,7 @@ func (o *Organization) GetServiceCountIcmp() int64 { // GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetServiceCountIcmpOk() (*int64, bool) { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { return nil, false } return o.ServiceCountIcmp, true @@ -543,7 +531,7 @@ func (o *Organization) GetServiceCountIcmpOk() (*int64, bool) { // HasServiceCountIcmp returns a boolean if a field has been set. func (o *Organization) HasServiceCountIcmp() bool { - if o != nil && o.ServiceCountIcmp != nil { + if o != nil && !IsNil(o.ServiceCountIcmp) { return true } @@ -557,7 +545,7 @@ func (o *Organization) SetServiceCountIcmp(v int64) { // GetAssetCount returns the AssetCount field value if set, zero value otherwise. func (o *Organization) GetAssetCount() int64 { - if o == nil || o.AssetCount == nil { + if o == nil || IsNil(o.AssetCount) { var ret int64 return ret } @@ -567,7 +555,7 @@ func (o *Organization) GetAssetCount() int64 { // GetAssetCountOk returns a tuple with the AssetCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Organization) GetAssetCountOk() (*int64, bool) { - if o == nil || o.AssetCount == nil { + if o == nil || IsNil(o.AssetCount) { return nil, false } return o.AssetCount, true @@ -575,7 +563,7 @@ func (o *Organization) GetAssetCountOk() (*int64, bool) { // HasAssetCount returns a boolean if a field has been set. func (o *Organization) HasAssetCount() bool { - if o != nil && o.AssetCount != nil { + if o != nil && !IsNil(o.AssetCount) { return true } @@ -587,9 +575,234 @@ func (o *Organization) SetAssetCount(v int64) { o.AssetCount = &v } +// GetProject returns the Project field value if set, zero value otherwise. +func (o *Organization) GetProject() bool { + if o == nil || IsNil(o.Project) { + var ret bool + return ret + } + return *o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetProjectOk() (*bool, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *Organization) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given bool and assigns it to the Project field. +func (o *Organization) SetProject(v bool) { + o.Project = &v +} + +// GetParentId returns the ParentId field value if set, zero value otherwise. +func (o *Organization) GetParentId() string { + if o == nil || IsNil(o.ParentId) { + var ret string + return ret + } + return *o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetParentIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentId) { + return nil, false + } + return o.ParentId, true +} + +// HasParentId returns a boolean if a field has been set. +func (o *Organization) HasParentId() bool { + if o != nil && !IsNil(o.ParentId) { + return true + } + + return false +} + +// SetParentId gets a reference to the given string and assigns it to the ParentId field. +func (o *Organization) SetParentId(v string) { + o.ParentId = &v +} + +// GetExpirationAssetsStale returns the ExpirationAssetsStale field value if set, zero value otherwise. +func (o *Organization) GetExpirationAssetsStale() int64 { + if o == nil || IsNil(o.ExpirationAssetsStale) { + var ret int64 + return ret + } + return *o.ExpirationAssetsStale +} + +// GetExpirationAssetsStaleOk returns a tuple with the ExpirationAssetsStale field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetExpirationAssetsStaleOk() (*int64, bool) { + if o == nil || IsNil(o.ExpirationAssetsStale) { + return nil, false + } + return o.ExpirationAssetsStale, true +} + +// HasExpirationAssetsStale returns a boolean if a field has been set. +func (o *Organization) HasExpirationAssetsStale() bool { + if o != nil && !IsNil(o.ExpirationAssetsStale) { + return true + } + + return false +} + +// SetExpirationAssetsStale gets a reference to the given int64 and assigns it to the ExpirationAssetsStale field. +func (o *Organization) SetExpirationAssetsStale(v int64) { + o.ExpirationAssetsStale = &v +} + +// GetExpirationAssetsOffline returns the ExpirationAssetsOffline field value if set, zero value otherwise. +func (o *Organization) GetExpirationAssetsOffline() int64 { + if o == nil || IsNil(o.ExpirationAssetsOffline) { + var ret int64 + return ret + } + return *o.ExpirationAssetsOffline +} + +// GetExpirationAssetsOfflineOk returns a tuple with the ExpirationAssetsOffline field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetExpirationAssetsOfflineOk() (*int64, bool) { + if o == nil || IsNil(o.ExpirationAssetsOffline) { + return nil, false + } + return o.ExpirationAssetsOffline, true +} + +// HasExpirationAssetsOffline returns a boolean if a field has been set. +func (o *Organization) HasExpirationAssetsOffline() bool { + if o != nil && !IsNil(o.ExpirationAssetsOffline) { + return true + } + + return false +} + +// SetExpirationAssetsOffline gets a reference to the given int64 and assigns it to the ExpirationAssetsOffline field. +func (o *Organization) SetExpirationAssetsOffline(v int64) { + o.ExpirationAssetsOffline = &v +} + +// GetExpirationIntegrationAttributes returns the ExpirationIntegrationAttributes field value if set, zero value otherwise. +func (o *Organization) GetExpirationIntegrationAttributes() int64 { + if o == nil || IsNil(o.ExpirationIntegrationAttributes) { + var ret int64 + return ret + } + return *o.ExpirationIntegrationAttributes +} + +// GetExpirationIntegrationAttributesOk returns a tuple with the ExpirationIntegrationAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetExpirationIntegrationAttributesOk() (*int64, bool) { + if o == nil || IsNil(o.ExpirationIntegrationAttributes) { + return nil, false + } + return o.ExpirationIntegrationAttributes, true +} + +// HasExpirationIntegrationAttributes returns a boolean if a field has been set. +func (o *Organization) HasExpirationIntegrationAttributes() bool { + if o != nil && !IsNil(o.ExpirationIntegrationAttributes) { + return true + } + + return false +} + +// SetExpirationIntegrationAttributes gets a reference to the given int64 and assigns it to the ExpirationIntegrationAttributes field. +func (o *Organization) SetExpirationIntegrationAttributes(v int64) { + o.ExpirationIntegrationAttributes = &v +} + +// GetExpirationScans returns the ExpirationScans field value if set, zero value otherwise. +func (o *Organization) GetExpirationScans() int64 { + if o == nil || IsNil(o.ExpirationScans) { + var ret int64 + return ret + } + return *o.ExpirationScans +} + +// GetExpirationScansOk returns a tuple with the ExpirationScans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetExpirationScansOk() (*int64, bool) { + if o == nil || IsNil(o.ExpirationScans) { + return nil, false + } + return o.ExpirationScans, true +} + +// HasExpirationScans returns a boolean if a field has been set. +func (o *Organization) HasExpirationScans() bool { + if o != nil && !IsNil(o.ExpirationScans) { + return true + } + + return false +} + +// SetExpirationScans gets a reference to the given int64 and assigns it to the ExpirationScans field. +func (o *Organization) SetExpirationScans(v int64) { + o.ExpirationScans = &v +} + +// GetExpirationVulnerabilities returns the ExpirationVulnerabilities field value if set, zero value otherwise. +func (o *Organization) GetExpirationVulnerabilities() int64 { + if o == nil || IsNil(o.ExpirationVulnerabilities) { + var ret int64 + return ret + } + return *o.ExpirationVulnerabilities +} + +// GetExpirationVulnerabilitiesOk returns a tuple with the ExpirationVulnerabilities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetExpirationVulnerabilitiesOk() (*int64, bool) { + if o == nil || IsNil(o.ExpirationVulnerabilities) { + return nil, false + } + return o.ExpirationVulnerabilities, true +} + +// HasExpirationVulnerabilities returns a boolean if a field has been set. +func (o *Organization) HasExpirationVulnerabilities() bool { + if o != nil && !IsNil(o.ExpirationVulnerabilities) { + return true + } + + return false +} + +// SetExpirationVulnerabilities gets a reference to the given int64 and assigns it to the ExpirationVulnerabilities field. +func (o *Organization) SetExpirationVulnerabilities(v int64) { + o.ExpirationVulnerabilities = &v +} + // GetExportToken returns the ExportToken field value if set, zero value otherwise. +// Deprecated func (o *Organization) GetExportToken() string { - if o == nil || o.ExportToken == nil { + if o == nil || IsNil(o.ExportToken) { var ret string return ret } @@ -598,8 +811,9 @@ func (o *Organization) GetExportToken() string { // GetExportTokenOk returns a tuple with the ExportToken field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Organization) GetExportTokenOk() (*string, bool) { - if o == nil || o.ExportToken == nil { + if o == nil || IsNil(o.ExportToken) { return nil, false } return o.ExportToken, true @@ -607,7 +821,7 @@ func (o *Organization) GetExportTokenOk() (*string, bool) { // HasExportToken returns a boolean if a field has been set. func (o *Organization) HasExportToken() bool { - if o != nil && o.ExportToken != nil { + if o != nil && !IsNil(o.ExportToken) { return true } @@ -615,13 +829,15 @@ func (o *Organization) HasExportToken() bool { } // SetExportToken gets a reference to the given string and assigns it to the ExportToken field. +// Deprecated func (o *Organization) SetExportToken(v string) { o.ExportToken = &v } // GetExportTokenCreatedAt returns the ExportTokenCreatedAt field value if set, zero value otherwise. +// Deprecated func (o *Organization) GetExportTokenCreatedAt() int64 { - if o == nil || o.ExportTokenCreatedAt == nil { + if o == nil || IsNil(o.ExportTokenCreatedAt) { var ret int64 return ret } @@ -630,8 +846,9 @@ func (o *Organization) GetExportTokenCreatedAt() int64 { // GetExportTokenCreatedAtOk returns a tuple with the ExportTokenCreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Organization) GetExportTokenCreatedAtOk() (*int64, bool) { - if o == nil || o.ExportTokenCreatedAt == nil { + if o == nil || IsNil(o.ExportTokenCreatedAt) { return nil, false } return o.ExportTokenCreatedAt, true @@ -639,7 +856,7 @@ func (o *Organization) GetExportTokenCreatedAtOk() (*int64, bool) { // HasExportTokenCreatedAt returns a boolean if a field has been set. func (o *Organization) HasExportTokenCreatedAt() bool { - if o != nil && o.ExportTokenCreatedAt != nil { + if o != nil && !IsNil(o.ExportTokenCreatedAt) { return true } @@ -647,13 +864,15 @@ func (o *Organization) HasExportTokenCreatedAt() bool { } // SetExportTokenCreatedAt gets a reference to the given int64 and assigns it to the ExportTokenCreatedAt field. +// Deprecated func (o *Organization) SetExportTokenCreatedAt(v int64) { o.ExportTokenCreatedAt = &v } // GetExportTokenLastUsedAt returns the ExportTokenLastUsedAt field value if set, zero value otherwise. +// Deprecated func (o *Organization) GetExportTokenLastUsedAt() int64 { - if o == nil || o.ExportTokenLastUsedAt == nil { + if o == nil || IsNil(o.ExportTokenLastUsedAt) { var ret int64 return ret } @@ -662,8 +881,9 @@ func (o *Organization) GetExportTokenLastUsedAt() int64 { // GetExportTokenLastUsedAtOk returns a tuple with the ExportTokenLastUsedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Organization) GetExportTokenLastUsedAtOk() (*int64, bool) { - if o == nil || o.ExportTokenLastUsedAt == nil { + if o == nil || IsNil(o.ExportTokenLastUsedAt) { return nil, false } return o.ExportTokenLastUsedAt, true @@ -671,7 +891,7 @@ func (o *Organization) GetExportTokenLastUsedAtOk() (*int64, bool) { // HasExportTokenLastUsedAt returns a boolean if a field has been set. func (o *Organization) HasExportTokenLastUsedAt() bool { - if o != nil && o.ExportTokenLastUsedAt != nil { + if o != nil && !IsNil(o.ExportTokenLastUsedAt) { return true } @@ -679,13 +899,15 @@ func (o *Organization) HasExportTokenLastUsedAt() bool { } // SetExportTokenLastUsedAt gets a reference to the given int64 and assigns it to the ExportTokenLastUsedAt field. +// Deprecated func (o *Organization) SetExportTokenLastUsedAt(v int64) { o.ExportTokenLastUsedAt = &v } // GetExportTokenLastUsedBy returns the ExportTokenLastUsedBy field value if set, zero value otherwise. +// Deprecated func (o *Organization) GetExportTokenLastUsedBy() string { - if o == nil || o.ExportTokenLastUsedBy == nil { + if o == nil || IsNil(o.ExportTokenLastUsedBy) { var ret string return ret } @@ -694,8 +916,9 @@ func (o *Organization) GetExportTokenLastUsedBy() string { // GetExportTokenLastUsedByOk returns a tuple with the ExportTokenLastUsedBy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Organization) GetExportTokenLastUsedByOk() (*string, bool) { - if o == nil || o.ExportTokenLastUsedBy == nil { + if o == nil || IsNil(o.ExportTokenLastUsedBy) { return nil, false } return o.ExportTokenLastUsedBy, true @@ -703,7 +926,7 @@ func (o *Organization) GetExportTokenLastUsedByOk() (*string, bool) { // HasExportTokenLastUsedBy returns a boolean if a field has been set. func (o *Organization) HasExportTokenLastUsedBy() bool { - if o != nil && o.ExportTokenLastUsedBy != nil { + if o != nil && !IsNil(o.ExportTokenLastUsedBy) { return true } @@ -711,13 +934,15 @@ func (o *Organization) HasExportTokenLastUsedBy() bool { } // SetExportTokenLastUsedBy gets a reference to the given string and assigns it to the ExportTokenLastUsedBy field. +// Deprecated func (o *Organization) SetExportTokenLastUsedBy(v string) { o.ExportTokenLastUsedBy = &v } // GetExportTokenCounter returns the ExportTokenCounter field value if set, zero value otherwise. +// Deprecated func (o *Organization) GetExportTokenCounter() int64 { - if o == nil || o.ExportTokenCounter == nil { + if o == nil || IsNil(o.ExportTokenCounter) { var ret int64 return ret } @@ -726,8 +951,9 @@ func (o *Organization) GetExportTokenCounter() int64 { // GetExportTokenCounterOk returns a tuple with the ExportTokenCounter field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Organization) GetExportTokenCounterOk() (*int64, bool) { - if o == nil || o.ExportTokenCounter == nil { + if o == nil || IsNil(o.ExportTokenCounter) { return nil, false } return o.ExportTokenCounter, true @@ -735,7 +961,7 @@ func (o *Organization) GetExportTokenCounterOk() (*int64, bool) { // HasExportTokenCounter returns a boolean if a field has been set. func (o *Organization) HasExportTokenCounter() bool { - if o != nil && o.ExportTokenCounter != nil { + if o != nil && !IsNil(o.ExportTokenCounter) { return true } @@ -743,79 +969,175 @@ func (o *Organization) HasExportTokenCounter() bool { } // SetExportTokenCounter gets a reference to the given int64 and assigns it to the ExportTokenCounter field. +// Deprecated func (o *Organization) SetExportTokenCounter(v int64) { o.ExportTokenCounter = &v } +// GetKeepLatestIntegrationAttributes returns the KeepLatestIntegrationAttributes field value if set, zero value otherwise. +func (o *Organization) GetKeepLatestIntegrationAttributes() bool { + if o == nil || IsNil(o.KeepLatestIntegrationAttributes) { + var ret bool + return ret + } + return *o.KeepLatestIntegrationAttributes +} + +// GetKeepLatestIntegrationAttributesOk returns a tuple with the KeepLatestIntegrationAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetKeepLatestIntegrationAttributesOk() (*bool, bool) { + if o == nil || IsNil(o.KeepLatestIntegrationAttributes) { + return nil, false + } + return o.KeepLatestIntegrationAttributes, true +} + +// HasKeepLatestIntegrationAttributes returns a boolean if a field has been set. +func (o *Organization) HasKeepLatestIntegrationAttributes() bool { + if o != nil && !IsNil(o.KeepLatestIntegrationAttributes) { + return true + } + + return false +} + +// SetKeepLatestIntegrationAttributes gets a reference to the given bool and assigns it to the KeepLatestIntegrationAttributes field. +func (o *Organization) SetKeepLatestIntegrationAttributes(v bool) { + o.KeepLatestIntegrationAttributes = &v +} + func (o Organization) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CreatedAt != nil { + return json.Marshal(toSerialize) +} + +func (o Organization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.DownloadToken != nil { + if !IsNil(o.DownloadToken) { toSerialize["download_token"] = o.DownloadToken } - if o.DownloadTokenCreatedAt != nil { + if !IsNil(o.DownloadTokenCreatedAt) { toSerialize["download_token_created_at"] = o.DownloadTokenCreatedAt } - if o.Permanent != nil { - toSerialize["permanent"] = o.Permanent - } - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { + toSerialize["name"] = o.Name + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Inactive != nil { + if !IsNil(o.Inactive) { toSerialize["inactive"] = o.Inactive } - if o.DeactivatedAt != nil { + if !IsNil(o.DeactivatedAt) { toSerialize["deactivated_at"] = o.DeactivatedAt } - if o.ServiceCount != nil { + if !IsNil(o.ServiceCount) { toSerialize["service_count"] = o.ServiceCount } - if o.ServiceCountTcp != nil { + if !IsNil(o.ServiceCountTcp) { toSerialize["service_count_tcp"] = o.ServiceCountTcp } - if o.ServiceCountUdp != nil { + if !IsNil(o.ServiceCountUdp) { toSerialize["service_count_udp"] = o.ServiceCountUdp } - if o.ServiceCountArp != nil { + if !IsNil(o.ServiceCountArp) { toSerialize["service_count_arp"] = o.ServiceCountArp } - if o.ServiceCountIcmp != nil { + if !IsNil(o.ServiceCountIcmp) { toSerialize["service_count_icmp"] = o.ServiceCountIcmp } - if o.AssetCount != nil { + if !IsNil(o.AssetCount) { toSerialize["asset_count"] = o.AssetCount } - if o.ExportToken != nil { + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if !IsNil(o.ParentId) { + toSerialize["parent_id"] = o.ParentId + } + if !IsNil(o.ExpirationAssetsStale) { + toSerialize["expiration_assets_stale"] = o.ExpirationAssetsStale + } + if !IsNil(o.ExpirationAssetsOffline) { + toSerialize["expiration_assets_offline"] = o.ExpirationAssetsOffline + } + if !IsNil(o.ExpirationIntegrationAttributes) { + toSerialize["expiration_integration_attributes"] = o.ExpirationIntegrationAttributes + } + if !IsNil(o.ExpirationScans) { + toSerialize["expiration_scans"] = o.ExpirationScans + } + if !IsNil(o.ExpirationVulnerabilities) { + toSerialize["expiration_vulnerabilities"] = o.ExpirationVulnerabilities + } + if !IsNil(o.ExportToken) { toSerialize["export_token"] = o.ExportToken } - if o.ExportTokenCreatedAt != nil { + if !IsNil(o.ExportTokenCreatedAt) { toSerialize["export_token_created_at"] = o.ExportTokenCreatedAt } - if o.ExportTokenLastUsedAt != nil { + if !IsNil(o.ExportTokenLastUsedAt) { toSerialize["export_token_last_used_at"] = o.ExportTokenLastUsedAt } - if o.ExportTokenLastUsedBy != nil { + if !IsNil(o.ExportTokenLastUsedBy) { toSerialize["export_token_last_used_by"] = o.ExportTokenLastUsedBy } - if o.ExportTokenCounter != nil { + if !IsNil(o.ExportTokenCounter) { toSerialize["export_token_counter"] = o.ExportTokenCounter } - return json.Marshal(toSerialize) + if !IsNil(o.KeepLatestIntegrationAttributes) { + toSerialize["keep_latest_integration_attributes"] = o.KeepLatestIntegrationAttributes + } + return toSerialize, nil +} + +func (o *Organization) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrganization := _Organization{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrganization) + + if err != nil { + return err + } + + *o = Organization(varOrganization) + + return err } type NullableOrganization struct { @@ -853,3 +1175,5 @@ func (v *NullableOrganization) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_organization_api_key.go b/go/model_organization_api_key.go new file mode 100644 index 0000000..0c857cd --- /dev/null +++ b/go/model_organization_api_key.go @@ -0,0 +1,663 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the OrganizationAPIKey type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationAPIKey{} + +// OrganizationAPIKey An API key issued for an organization. +type OrganizationAPIKey struct { + Id string `json:"id"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CreatedBy *string `json:"created_by,omitempty"` + Comment *string `json:"comment,omitempty"` + LastUsedAt *int64 `json:"last_used_at,omitempty"` + LastUsedIp *string `json:"last_used_ip,omitempty"` + LastUsedUa *string `json:"last_used_ua,omitempty"` + Counter *int64 `json:"counter,omitempty"` + UsageToday *int64 `json:"usage_today,omitempty"` + UsageLimit *int64 `json:"usage_limit,omitempty"` + Token *string `json:"token,omitempty"` + Inactive *bool `json:"inactive,omitempty"` + Type *string `json:"type,omitempty"` +} + +type _OrganizationAPIKey OrganizationAPIKey + +// NewOrganizationAPIKey instantiates a new OrganizationAPIKey object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganizationAPIKey(id string) *OrganizationAPIKey { + this := OrganizationAPIKey{} + this.Id = id + return &this +} + +// NewOrganizationAPIKeyWithDefaults instantiates a new OrganizationAPIKey object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganizationAPIKeyWithDefaults() *OrganizationAPIKey { + this := OrganizationAPIKey{} + return &this +} + +// GetId returns the Id field value +func (o *OrganizationAPIKey) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *OrganizationAPIKey) SetId(v string) { + o.Id = v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *OrganizationAPIKey) SetClientId(v string) { + o.ClientId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *OrganizationAPIKey) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *OrganizationAPIKey) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *OrganizationAPIKey) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *OrganizationAPIKey) SetComment(v string) { + o.Comment = &v +} + +// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetLastUsedAt() int64 { + if o == nil || IsNil(o.LastUsedAt) { + var ret int64 + return ret + } + return *o.LastUsedAt +} + +// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetLastUsedAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastUsedAt) { + return nil, false + } + return o.LastUsedAt, true +} + +// HasLastUsedAt returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasLastUsedAt() bool { + if o != nil && !IsNil(o.LastUsedAt) { + return true + } + + return false +} + +// SetLastUsedAt gets a reference to the given int64 and assigns it to the LastUsedAt field. +func (o *OrganizationAPIKey) SetLastUsedAt(v int64) { + o.LastUsedAt = &v +} + +// GetLastUsedIp returns the LastUsedIp field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetLastUsedIp() string { + if o == nil || IsNil(o.LastUsedIp) { + var ret string + return ret + } + return *o.LastUsedIp +} + +// GetLastUsedIpOk returns a tuple with the LastUsedIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetLastUsedIpOk() (*string, bool) { + if o == nil || IsNil(o.LastUsedIp) { + return nil, false + } + return o.LastUsedIp, true +} + +// HasLastUsedIp returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasLastUsedIp() bool { + if o != nil && !IsNil(o.LastUsedIp) { + return true + } + + return false +} + +// SetLastUsedIp gets a reference to the given string and assigns it to the LastUsedIp field. +func (o *OrganizationAPIKey) SetLastUsedIp(v string) { + o.LastUsedIp = &v +} + +// GetLastUsedUa returns the LastUsedUa field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetLastUsedUa() string { + if o == nil || IsNil(o.LastUsedUa) { + var ret string + return ret + } + return *o.LastUsedUa +} + +// GetLastUsedUaOk returns a tuple with the LastUsedUa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetLastUsedUaOk() (*string, bool) { + if o == nil || IsNil(o.LastUsedUa) { + return nil, false + } + return o.LastUsedUa, true +} + +// HasLastUsedUa returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasLastUsedUa() bool { + if o != nil && !IsNil(o.LastUsedUa) { + return true + } + + return false +} + +// SetLastUsedUa gets a reference to the given string and assigns it to the LastUsedUa field. +func (o *OrganizationAPIKey) SetLastUsedUa(v string) { + o.LastUsedUa = &v +} + +// GetCounter returns the Counter field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetCounter() int64 { + if o == nil || IsNil(o.Counter) { + var ret int64 + return ret + } + return *o.Counter +} + +// GetCounterOk returns a tuple with the Counter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetCounterOk() (*int64, bool) { + if o == nil || IsNil(o.Counter) { + return nil, false + } + return o.Counter, true +} + +// HasCounter returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasCounter() bool { + if o != nil && !IsNil(o.Counter) { + return true + } + + return false +} + +// SetCounter gets a reference to the given int64 and assigns it to the Counter field. +func (o *OrganizationAPIKey) SetCounter(v int64) { + o.Counter = &v +} + +// GetUsageToday returns the UsageToday field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetUsageToday() int64 { + if o == nil || IsNil(o.UsageToday) { + var ret int64 + return ret + } + return *o.UsageToday +} + +// GetUsageTodayOk returns a tuple with the UsageToday field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetUsageTodayOk() (*int64, bool) { + if o == nil || IsNil(o.UsageToday) { + return nil, false + } + return o.UsageToday, true +} + +// HasUsageToday returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasUsageToday() bool { + if o != nil && !IsNil(o.UsageToday) { + return true + } + + return false +} + +// SetUsageToday gets a reference to the given int64 and assigns it to the UsageToday field. +func (o *OrganizationAPIKey) SetUsageToday(v int64) { + o.UsageToday = &v +} + +// GetUsageLimit returns the UsageLimit field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetUsageLimit() int64 { + if o == nil || IsNil(o.UsageLimit) { + var ret int64 + return ret + } + return *o.UsageLimit +} + +// GetUsageLimitOk returns a tuple with the UsageLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetUsageLimitOk() (*int64, bool) { + if o == nil || IsNil(o.UsageLimit) { + return nil, false + } + return o.UsageLimit, true +} + +// HasUsageLimit returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasUsageLimit() bool { + if o != nil && !IsNil(o.UsageLimit) { + return true + } + + return false +} + +// SetUsageLimit gets a reference to the given int64 and assigns it to the UsageLimit field. +func (o *OrganizationAPIKey) SetUsageLimit(v int64) { + o.UsageLimit = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *OrganizationAPIKey) SetToken(v string) { + o.Token = &v +} + +// GetInactive returns the Inactive field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetInactive() bool { + if o == nil || IsNil(o.Inactive) { + var ret bool + return ret + } + return *o.Inactive +} + +// GetInactiveOk returns a tuple with the Inactive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetInactiveOk() (*bool, bool) { + if o == nil || IsNil(o.Inactive) { + return nil, false + } + return o.Inactive, true +} + +// HasInactive returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasInactive() bool { + if o != nil && !IsNil(o.Inactive) { + return true + } + + return false +} + +// SetInactive gets a reference to the given bool and assigns it to the Inactive field. +func (o *OrganizationAPIKey) SetInactive(v bool) { + o.Inactive = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *OrganizationAPIKey) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationAPIKey) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *OrganizationAPIKey) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *OrganizationAPIKey) SetType(v string) { + o.Type = &v +} + +func (o OrganizationAPIKey) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganizationAPIKey) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.LastUsedAt) { + toSerialize["last_used_at"] = o.LastUsedAt + } + if !IsNil(o.LastUsedIp) { + toSerialize["last_used_ip"] = o.LastUsedIp + } + if !IsNil(o.LastUsedUa) { + toSerialize["last_used_ua"] = o.LastUsedUa + } + if !IsNil(o.Counter) { + toSerialize["counter"] = o.Counter + } + if !IsNil(o.UsageToday) { + toSerialize["usage_today"] = o.UsageToday + } + if !IsNil(o.UsageLimit) { + toSerialize["usage_limit"] = o.UsageLimit + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Inactive) { + toSerialize["inactive"] = o.Inactive + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +func (o *OrganizationAPIKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrganizationAPIKey := _OrganizationAPIKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrganizationAPIKey) + + if err != nil { + return err + } + + *o = OrganizationAPIKey(varOrganizationAPIKey) + + return err +} + +type NullableOrganizationAPIKey struct { + value *OrganizationAPIKey + isSet bool +} + +func (v NullableOrganizationAPIKey) Get() *OrganizationAPIKey { + return v.value +} + +func (v *NullableOrganizationAPIKey) Set(val *OrganizationAPIKey) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationAPIKey) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationAPIKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationAPIKey(val *OrganizationAPIKey) *NullableOrganizationAPIKey { + return &NullableOrganizationAPIKey{value: val, isSet: true} +} + +func (v NullableOrganizationAPIKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationAPIKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_palo_alto_firewall_credential_fields.go b/go/model_palo_alto_firewall_credential_fields.go new file mode 100644 index 0000000..a2bbeb4 --- /dev/null +++ b/go/model_palo_alto_firewall_credential_fields.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PaloAltoFirewallCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaloAltoFirewallCredentialFields{} + +// PaloAltoFirewallCredentialFields struct for PaloAltoFirewallCredentialFields +type PaloAltoFirewallCredentialFields struct { + ApiKey string `json:"api_key"` +} + +type _PaloAltoFirewallCredentialFields PaloAltoFirewallCredentialFields + +// NewPaloAltoFirewallCredentialFields instantiates a new PaloAltoFirewallCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaloAltoFirewallCredentialFields(apiKey string) *PaloAltoFirewallCredentialFields { + this := PaloAltoFirewallCredentialFields{} + this.ApiKey = apiKey + return &this +} + +// NewPaloAltoFirewallCredentialFieldsWithDefaults instantiates a new PaloAltoFirewallCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaloAltoFirewallCredentialFieldsWithDefaults() *PaloAltoFirewallCredentialFields { + this := PaloAltoFirewallCredentialFields{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *PaloAltoFirewallCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *PaloAltoFirewallCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *PaloAltoFirewallCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o PaloAltoFirewallCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaloAltoFirewallCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *PaloAltoFirewallCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaloAltoFirewallCredentialFields := _PaloAltoFirewallCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPaloAltoFirewallCredentialFields) + + if err != nil { + return err + } + + *o = PaloAltoFirewallCredentialFields(varPaloAltoFirewallCredentialFields) + + return err +} + +type NullablePaloAltoFirewallCredentialFields struct { + value *PaloAltoFirewallCredentialFields + isSet bool +} + +func (v NullablePaloAltoFirewallCredentialFields) Get() *PaloAltoFirewallCredentialFields { + return v.value +} + +func (v *NullablePaloAltoFirewallCredentialFields) Set(val *PaloAltoFirewallCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullablePaloAltoFirewallCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullablePaloAltoFirewallCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaloAltoFirewallCredentialFields(val *PaloAltoFirewallCredentialFields) *NullablePaloAltoFirewallCredentialFields { + return &NullablePaloAltoFirewallCredentialFields{value: val, isSet: true} +} + +func (v NullablePaloAltoFirewallCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaloAltoFirewallCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_problem.go b/go/model_problem.go new file mode 100644 index 0000000..2ea1946 --- /dev/null +++ b/go/model_problem.go @@ -0,0 +1,202 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Problem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Problem{} + +// Problem RFC7807 Problem JSON object from https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml without the standard 'type' and 'instance' fields. +type Problem struct { + // A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + Title *string `json:"title,omitempty"` + // The HTTP status code generated by the origin server for this occurrence of the problem. + Status *int32 `json:"status,omitempty"` + // A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + Detail *string `json:"detail,omitempty"` +} + +// NewProblem instantiates a new Problem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProblem() *Problem { + this := Problem{} + return &this +} + +// NewProblemWithDefaults instantiates a new Problem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProblemWithDefaults() *Problem { + this := Problem{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *Problem) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Problem) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *Problem) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *Problem) SetTitle(v string) { + o.Title = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Problem) GetStatus() int32 { + if o == nil || IsNil(o.Status) { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Problem) GetStatusOk() (*int32, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Problem) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *Problem) SetStatus(v int32) { + o.Status = &v +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *Problem) GetDetail() string { + if o == nil || IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Problem) GetDetailOk() (*string, bool) { + if o == nil || IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *Problem) HasDetail() bool { + if o != nil && !IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *Problem) SetDetail(v string) { + o.Detail = &v +} + +func (o Problem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Problem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + return toSerialize, nil +} + +type NullableProblem struct { + value *Problem + isSet bool +} + +func (v NullableProblem) Get() *Problem { + return v.value +} + +func (v *NullableProblem) Set(val *Problem) { + v.value = val + v.isSet = true +} + +func (v NullableProblem) IsSet() bool { + return v.isSet +} + +func (v *NullableProblem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProblem(val *Problem) *NullableProblem { + return &NullableProblem{value: val, isSet: true} +} + +func (v NullableProblem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProblem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_qualys_credential_fields.go b/go/model_qualys_credential_fields.go new file mode 100644 index 0000000..8b89d04 --- /dev/null +++ b/go/model_qualys_credential_fields.go @@ -0,0 +1,215 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the QualysCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QualysCredentialFields{} + +// QualysCredentialFields struct for QualysCredentialFields +type QualysCredentialFields struct { + ApiUrl string `json:"api_url"` + Username string `json:"username"` + Password string `json:"password"` +} + +type _QualysCredentialFields QualysCredentialFields + +// NewQualysCredentialFields instantiates a new QualysCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQualysCredentialFields(apiUrl string, username string, password string) *QualysCredentialFields { + this := QualysCredentialFields{} + this.ApiUrl = apiUrl + this.Username = username + this.Password = password + return &this +} + +// NewQualysCredentialFieldsWithDefaults instantiates a new QualysCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQualysCredentialFieldsWithDefaults() *QualysCredentialFields { + this := QualysCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *QualysCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *QualysCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *QualysCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetUsername returns the Username field value +func (o *QualysCredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *QualysCredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *QualysCredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *QualysCredentialFields) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *QualysCredentialFields) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *QualysCredentialFields) SetPassword(v string) { + o.Password = v +} + +func (o QualysCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QualysCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + return toSerialize, nil +} + +func (o *QualysCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "username", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQualysCredentialFields := _QualysCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQualysCredentialFields) + + if err != nil { + return err + } + + *o = QualysCredentialFields(varQualysCredentialFields) + + return err +} + +type NullableQualysCredentialFields struct { + value *QualysCredentialFields + isSet bool +} + +func (v NullableQualysCredentialFields) Get() *QualysCredentialFields { + return v.value +} + +func (v *NullableQualysCredentialFields) Set(val *QualysCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableQualysCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableQualysCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQualysCredentialFields(val *QualysCredentialFields) *NullableQualysCredentialFields { + return &NullableQualysCredentialFields{value: val, isSet: true} +} + +func (v NullableQualysCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQualysCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_sample_options.go b/go/model_sample_options.go new file mode 100644 index 0000000..8c95448 --- /dev/null +++ b/go/model_sample_options.go @@ -0,0 +1,339 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SampleOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SampleOptions{} + +// SampleOptions Options which can be set to create or modify traffic sampling. +type SampleOptions struct { + Explorer *string `json:"explorer,omitempty"` + Agent *string `json:"agent,omitempty"` + Targets *string `json:"targets,omitempty"` + Excludes *string `json:"excludes,omitempty"` + Tags *string `json:"tags,omitempty"` + Interfaces string `json:"interfaces"` +} + +type _SampleOptions SampleOptions + +// NewSampleOptions instantiates a new SampleOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSampleOptions(interfaces string) *SampleOptions { + this := SampleOptions{} + this.Interfaces = interfaces + return &this +} + +// NewSampleOptionsWithDefaults instantiates a new SampleOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSampleOptionsWithDefaults() *SampleOptions { + this := SampleOptions{} + return &this +} + +// GetExplorer returns the Explorer field value if set, zero value otherwise. +func (o *SampleOptions) GetExplorer() string { + if o == nil || IsNil(o.Explorer) { + var ret string + return ret + } + return *o.Explorer +} + +// GetExplorerOk returns a tuple with the Explorer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetExplorerOk() (*string, bool) { + if o == nil || IsNil(o.Explorer) { + return nil, false + } + return o.Explorer, true +} + +// HasExplorer returns a boolean if a field has been set. +func (o *SampleOptions) HasExplorer() bool { + if o != nil && !IsNil(o.Explorer) { + return true + } + + return false +} + +// SetExplorer gets a reference to the given string and assigns it to the Explorer field. +func (o *SampleOptions) SetExplorer(v string) { + o.Explorer = &v +} + +// GetAgent returns the Agent field value if set, zero value otherwise. +func (o *SampleOptions) GetAgent() string { + if o == nil || IsNil(o.Agent) { + var ret string + return ret + } + return *o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetAgentOk() (*string, bool) { + if o == nil || IsNil(o.Agent) { + return nil, false + } + return o.Agent, true +} + +// HasAgent returns a boolean if a field has been set. +func (o *SampleOptions) HasAgent() bool { + if o != nil && !IsNil(o.Agent) { + return true + } + + return false +} + +// SetAgent gets a reference to the given string and assigns it to the Agent field. +func (o *SampleOptions) SetAgent(v string) { + o.Agent = &v +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *SampleOptions) GetTargets() string { + if o == nil || IsNil(o.Targets) { + var ret string + return ret + } + return *o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetTargetsOk() (*string, bool) { + if o == nil || IsNil(o.Targets) { + return nil, false + } + return o.Targets, true +} + +// HasTargets returns a boolean if a field has been set. +func (o *SampleOptions) HasTargets() bool { + if o != nil && !IsNil(o.Targets) { + return true + } + + return false +} + +// SetTargets gets a reference to the given string and assigns it to the Targets field. +func (o *SampleOptions) SetTargets(v string) { + o.Targets = &v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise. +func (o *SampleOptions) GetExcludes() string { + if o == nil || IsNil(o.Excludes) { + var ret string + return ret + } + return *o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetExcludesOk() (*string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *SampleOptions) HasExcludes() bool { + if o != nil && !IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given string and assigns it to the Excludes field. +func (o *SampleOptions) SetExcludes(v string) { + o.Excludes = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *SampleOptions) GetTags() string { + if o == nil || IsNil(o.Tags) { + var ret string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetTagsOk() (*string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *SampleOptions) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given string and assigns it to the Tags field. +func (o *SampleOptions) SetTags(v string) { + o.Tags = &v +} + +// GetInterfaces returns the Interfaces field value +func (o *SampleOptions) GetInterfaces() string { + if o == nil { + var ret string + return ret + } + + return o.Interfaces +} + +// GetInterfacesOk returns a tuple with the Interfaces field value +// and a boolean to check if the value has been set. +func (o *SampleOptions) GetInterfacesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Interfaces, true +} + +// SetInterfaces sets field value +func (o *SampleOptions) SetInterfaces(v string) { + o.Interfaces = v +} + +func (o SampleOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SampleOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Explorer) { + toSerialize["explorer"] = o.Explorer + } + if !IsNil(o.Agent) { + toSerialize["agent"] = o.Agent + } + if !IsNil(o.Targets) { + toSerialize["targets"] = o.Targets + } + if !IsNil(o.Excludes) { + toSerialize["excludes"] = o.Excludes + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["interfaces"] = o.Interfaces + return toSerialize, nil +} + +func (o *SampleOptions) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "interfaces", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSampleOptions := _SampleOptions{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSampleOptions) + + if err != nil { + return err + } + + *o = SampleOptions(varSampleOptions) + + return err +} + +type NullableSampleOptions struct { + value *SampleOptions + isSet bool +} + +func (v NullableSampleOptions) Get() *SampleOptions { + return v.value +} + +func (v *NullableSampleOptions) Set(val *SampleOptions) { + v.value = val + v.isSet = true +} + +func (v NullableSampleOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableSampleOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSampleOptions(val *SampleOptions) *NullableSampleOptions { + return &NullableSampleOptions{value: val, isSet: true} +} + +func (v NullableSampleOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSampleOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_scan_options.go b/go/model_scan_options.go index 180b82b..3429471 100644 --- a/go/model_scan_options.go +++ b/go/model_scan_options.go @@ -1,40 +1,72 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) -// ScanOptions struct for ScanOptions +// checks if the ScanOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScanOptions{} + +// ScanOptions Options which can be set to create or modify a scan. type ScanOptions struct { - Targets string `json:"targets"` - Excludes *string `json:"excludes,omitempty"` - ScanName *string `json:"scan-name,omitempty"` + Targets string `json:"targets"` + Excludes *string `json:"excludes,omitempty"` + ScanName *string `json:"scan-name,omitempty"` + // A description of the scan. ScanDescription *string `json:"scan-description,omitempty"` - ScanFrequency *string `json:"scan-frequency,omitempty"` - ScanStart *string `json:"scan-start,omitempty"` - Agent *string `json:"agent,omitempty"` - Rate *string `json:"rate,omitempty"` - MaxHostRate *string `json:"max-host-rate,omitempty"` - Passes *string `json:"passes,omitempty"` - MaxSockets *string `json:"max-sockets,omitempty"` - MaxGroupSize *string `json:"max-group-size,omitempty"` - TcpPorts *string `json:"tcp-ports,omitempty"` - Screenshots *string `json:"screenshots,omitempty"` - Nameservers *string `json:"nameservers,omitempty"` + ScanTemplate *string `json:"scan-template,omitempty"` + // A string time duration value representing execution frequency, if scheduled to repeat. + ScanFrequency *string `json:"scan-frequency,omitempty"` + // Unix timestamp value indicating when the template was created. + ScanStart *string `json:"scan-start,omitempty"` + ScanTags *string `json:"scan-tags,omitempty"` + ScanGracePeriod *string `json:"scan-grace-period,omitempty"` + Agent *string `json:"agent,omitempty"` + Explorer *string `json:"explorer,omitempty"` + ExplorerGroupId *string `json:"explorer-group-id,omitempty"` + // The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) or UUID (\"e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8\") of a hosted zone. + HostedZoneId *string `json:"hosted-zone-id,omitempty"` + // The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) of the hosted zone. + HostedZoneName *string `json:"hosted-zone-name,omitempty"` + Rate *string `json:"rate,omitempty"` + MaxHostRate *string `json:"max-host-rate,omitempty"` + Passes *string `json:"passes,omitempty"` + MaxAttempts *string `json:"max-attempts,omitempty"` + MaxSockets *string `json:"max-sockets,omitempty"` + MaxGroupSize *string `json:"max-group-size,omitempty"` + MaxTtl *string `json:"max-ttl,omitempty"` + Tos *string `json:"tos,omitempty"` + TcpPorts *string `json:"tcp-ports,omitempty"` + TcpExcludes *string `json:"tcp-excludes,omitempty"` + Screenshots *string `json:"screenshots,omitempty"` + Nameservers *string `json:"nameservers,omitempty"` + SubnetPing *string `json:"subnet-ping,omitempty"` + SubnetPingNetSize *string `json:"subnet-ping-net-size,omitempty"` + // Optional subnet ping probe list as comma separated strings. The example shows possibilities. + SubnetPingProbes *string `json:"subnet-ping-probes,omitempty"` + SubnetPingSampleRate *string `json:"subnet-ping-sample-rate,omitempty"` + HostPing *string `json:"host-ping,omitempty"` + // Optional host ping probe list as comma separated strings. The example shows possibilities. + HostPingProbes *string `json:"host-ping-probes,omitempty"` // Optional probe list, otherwise all probes are used Probes *string `json:"probes,omitempty"` } +type _ScanOptions ScanOptions + // NewScanOptions instantiates a new ScanOptions object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,7 +111,7 @@ func (o *ScanOptions) SetTargets(v string) { // GetExcludes returns the Excludes field value if set, zero value otherwise. func (o *ScanOptions) GetExcludes() string { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { var ret string return ret } @@ -89,7 +121,7 @@ func (o *ScanOptions) GetExcludes() string { // GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetExcludesOk() (*string, bool) { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { return nil, false } return o.Excludes, true @@ -97,7 +129,7 @@ func (o *ScanOptions) GetExcludesOk() (*string, bool) { // HasExcludes returns a boolean if a field has been set. func (o *ScanOptions) HasExcludes() bool { - if o != nil && o.Excludes != nil { + if o != nil && !IsNil(o.Excludes) { return true } @@ -111,7 +143,7 @@ func (o *ScanOptions) SetExcludes(v string) { // GetScanName returns the ScanName field value if set, zero value otherwise. func (o *ScanOptions) GetScanName() string { - if o == nil || o.ScanName == nil { + if o == nil || IsNil(o.ScanName) { var ret string return ret } @@ -121,7 +153,7 @@ func (o *ScanOptions) GetScanName() string { // GetScanNameOk returns a tuple with the ScanName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetScanNameOk() (*string, bool) { - if o == nil || o.ScanName == nil { + if o == nil || IsNil(o.ScanName) { return nil, false } return o.ScanName, true @@ -129,7 +161,7 @@ func (o *ScanOptions) GetScanNameOk() (*string, bool) { // HasScanName returns a boolean if a field has been set. func (o *ScanOptions) HasScanName() bool { - if o != nil && o.ScanName != nil { + if o != nil && !IsNil(o.ScanName) { return true } @@ -143,7 +175,7 @@ func (o *ScanOptions) SetScanName(v string) { // GetScanDescription returns the ScanDescription field value if set, zero value otherwise. func (o *ScanOptions) GetScanDescription() string { - if o == nil || o.ScanDescription == nil { + if o == nil || IsNil(o.ScanDescription) { var ret string return ret } @@ -153,7 +185,7 @@ func (o *ScanOptions) GetScanDescription() string { // GetScanDescriptionOk returns a tuple with the ScanDescription field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetScanDescriptionOk() (*string, bool) { - if o == nil || o.ScanDescription == nil { + if o == nil || IsNil(o.ScanDescription) { return nil, false } return o.ScanDescription, true @@ -161,7 +193,7 @@ func (o *ScanOptions) GetScanDescriptionOk() (*string, bool) { // HasScanDescription returns a boolean if a field has been set. func (o *ScanOptions) HasScanDescription() bool { - if o != nil && o.ScanDescription != nil { + if o != nil && !IsNil(o.ScanDescription) { return true } @@ -173,9 +205,41 @@ func (o *ScanOptions) SetScanDescription(v string) { o.ScanDescription = &v } +// GetScanTemplate returns the ScanTemplate field value if set, zero value otherwise. +func (o *ScanOptions) GetScanTemplate() string { + if o == nil || IsNil(o.ScanTemplate) { + var ret string + return ret + } + return *o.ScanTemplate +} + +// GetScanTemplateOk returns a tuple with the ScanTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetScanTemplateOk() (*string, bool) { + if o == nil || IsNil(o.ScanTemplate) { + return nil, false + } + return o.ScanTemplate, true +} + +// HasScanTemplate returns a boolean if a field has been set. +func (o *ScanOptions) HasScanTemplate() bool { + if o != nil && !IsNil(o.ScanTemplate) { + return true + } + + return false +} + +// SetScanTemplate gets a reference to the given string and assigns it to the ScanTemplate field. +func (o *ScanOptions) SetScanTemplate(v string) { + o.ScanTemplate = &v +} + // GetScanFrequency returns the ScanFrequency field value if set, zero value otherwise. func (o *ScanOptions) GetScanFrequency() string { - if o == nil || o.ScanFrequency == nil { + if o == nil || IsNil(o.ScanFrequency) { var ret string return ret } @@ -185,7 +249,7 @@ func (o *ScanOptions) GetScanFrequency() string { // GetScanFrequencyOk returns a tuple with the ScanFrequency field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetScanFrequencyOk() (*string, bool) { - if o == nil || o.ScanFrequency == nil { + if o == nil || IsNil(o.ScanFrequency) { return nil, false } return o.ScanFrequency, true @@ -193,7 +257,7 @@ func (o *ScanOptions) GetScanFrequencyOk() (*string, bool) { // HasScanFrequency returns a boolean if a field has been set. func (o *ScanOptions) HasScanFrequency() bool { - if o != nil && o.ScanFrequency != nil { + if o != nil && !IsNil(o.ScanFrequency) { return true } @@ -207,7 +271,7 @@ func (o *ScanOptions) SetScanFrequency(v string) { // GetScanStart returns the ScanStart field value if set, zero value otherwise. func (o *ScanOptions) GetScanStart() string { - if o == nil || o.ScanStart == nil { + if o == nil || IsNil(o.ScanStart) { var ret string return ret } @@ -217,7 +281,7 @@ func (o *ScanOptions) GetScanStart() string { // GetScanStartOk returns a tuple with the ScanStart field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetScanStartOk() (*string, bool) { - if o == nil || o.ScanStart == nil { + if o == nil || IsNil(o.ScanStart) { return nil, false } return o.ScanStart, true @@ -225,7 +289,7 @@ func (o *ScanOptions) GetScanStartOk() (*string, bool) { // HasScanStart returns a boolean if a field has been set. func (o *ScanOptions) HasScanStart() bool { - if o != nil && o.ScanStart != nil { + if o != nil && !IsNil(o.ScanStart) { return true } @@ -237,9 +301,73 @@ func (o *ScanOptions) SetScanStart(v string) { o.ScanStart = &v } +// GetScanTags returns the ScanTags field value if set, zero value otherwise. +func (o *ScanOptions) GetScanTags() string { + if o == nil || IsNil(o.ScanTags) { + var ret string + return ret + } + return *o.ScanTags +} + +// GetScanTagsOk returns a tuple with the ScanTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetScanTagsOk() (*string, bool) { + if o == nil || IsNil(o.ScanTags) { + return nil, false + } + return o.ScanTags, true +} + +// HasScanTags returns a boolean if a field has been set. +func (o *ScanOptions) HasScanTags() bool { + if o != nil && !IsNil(o.ScanTags) { + return true + } + + return false +} + +// SetScanTags gets a reference to the given string and assigns it to the ScanTags field. +func (o *ScanOptions) SetScanTags(v string) { + o.ScanTags = &v +} + +// GetScanGracePeriod returns the ScanGracePeriod field value if set, zero value otherwise. +func (o *ScanOptions) GetScanGracePeriod() string { + if o == nil || IsNil(o.ScanGracePeriod) { + var ret string + return ret + } + return *o.ScanGracePeriod +} + +// GetScanGracePeriodOk returns a tuple with the ScanGracePeriod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetScanGracePeriodOk() (*string, bool) { + if o == nil || IsNil(o.ScanGracePeriod) { + return nil, false + } + return o.ScanGracePeriod, true +} + +// HasScanGracePeriod returns a boolean if a field has been set. +func (o *ScanOptions) HasScanGracePeriod() bool { + if o != nil && !IsNil(o.ScanGracePeriod) { + return true + } + + return false +} + +// SetScanGracePeriod gets a reference to the given string and assigns it to the ScanGracePeriod field. +func (o *ScanOptions) SetScanGracePeriod(v string) { + o.ScanGracePeriod = &v +} + // GetAgent returns the Agent field value if set, zero value otherwise. func (o *ScanOptions) GetAgent() string { - if o == nil || o.Agent == nil { + if o == nil || IsNil(o.Agent) { var ret string return ret } @@ -249,7 +377,7 @@ func (o *ScanOptions) GetAgent() string { // GetAgentOk returns a tuple with the Agent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetAgentOk() (*string, bool) { - if o == nil || o.Agent == nil { + if o == nil || IsNil(o.Agent) { return nil, false } return o.Agent, true @@ -257,7 +385,7 @@ func (o *ScanOptions) GetAgentOk() (*string, bool) { // HasAgent returns a boolean if a field has been set. func (o *ScanOptions) HasAgent() bool { - if o != nil && o.Agent != nil { + if o != nil && !IsNil(o.Agent) { return true } @@ -269,9 +397,137 @@ func (o *ScanOptions) SetAgent(v string) { o.Agent = &v } +// GetExplorer returns the Explorer field value if set, zero value otherwise. +func (o *ScanOptions) GetExplorer() string { + if o == nil || IsNil(o.Explorer) { + var ret string + return ret + } + return *o.Explorer +} + +// GetExplorerOk returns a tuple with the Explorer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetExplorerOk() (*string, bool) { + if o == nil || IsNil(o.Explorer) { + return nil, false + } + return o.Explorer, true +} + +// HasExplorer returns a boolean if a field has been set. +func (o *ScanOptions) HasExplorer() bool { + if o != nil && !IsNil(o.Explorer) { + return true + } + + return false +} + +// SetExplorer gets a reference to the given string and assigns it to the Explorer field. +func (o *ScanOptions) SetExplorer(v string) { + o.Explorer = &v +} + +// GetExplorerGroupId returns the ExplorerGroupId field value if set, zero value otherwise. +func (o *ScanOptions) GetExplorerGroupId() string { + if o == nil || IsNil(o.ExplorerGroupId) { + var ret string + return ret + } + return *o.ExplorerGroupId +} + +// GetExplorerGroupIdOk returns a tuple with the ExplorerGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetExplorerGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.ExplorerGroupId) { + return nil, false + } + return o.ExplorerGroupId, true +} + +// HasExplorerGroupId returns a boolean if a field has been set. +func (o *ScanOptions) HasExplorerGroupId() bool { + if o != nil && !IsNil(o.ExplorerGroupId) { + return true + } + + return false +} + +// SetExplorerGroupId gets a reference to the given string and assigns it to the ExplorerGroupId field. +func (o *ScanOptions) SetExplorerGroupId(v string) { + o.ExplorerGroupId = &v +} + +// GetHostedZoneId returns the HostedZoneId field value if set, zero value otherwise. +func (o *ScanOptions) GetHostedZoneId() string { + if o == nil || IsNil(o.HostedZoneId) { + var ret string + return ret + } + return *o.HostedZoneId +} + +// GetHostedZoneIdOk returns a tuple with the HostedZoneId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetHostedZoneIdOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneId) { + return nil, false + } + return o.HostedZoneId, true +} + +// HasHostedZoneId returns a boolean if a field has been set. +func (o *ScanOptions) HasHostedZoneId() bool { + if o != nil && !IsNil(o.HostedZoneId) { + return true + } + + return false +} + +// SetHostedZoneId gets a reference to the given string and assigns it to the HostedZoneId field. +func (o *ScanOptions) SetHostedZoneId(v string) { + o.HostedZoneId = &v +} + +// GetHostedZoneName returns the HostedZoneName field value if set, zero value otherwise. +func (o *ScanOptions) GetHostedZoneName() string { + if o == nil || IsNil(o.HostedZoneName) { + var ret string + return ret + } + return *o.HostedZoneName +} + +// GetHostedZoneNameOk returns a tuple with the HostedZoneName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetHostedZoneNameOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneName) { + return nil, false + } + return o.HostedZoneName, true +} + +// HasHostedZoneName returns a boolean if a field has been set. +func (o *ScanOptions) HasHostedZoneName() bool { + if o != nil && !IsNil(o.HostedZoneName) { + return true + } + + return false +} + +// SetHostedZoneName gets a reference to the given string and assigns it to the HostedZoneName field. +func (o *ScanOptions) SetHostedZoneName(v string) { + o.HostedZoneName = &v +} + // GetRate returns the Rate field value if set, zero value otherwise. func (o *ScanOptions) GetRate() string { - if o == nil || o.Rate == nil { + if o == nil || IsNil(o.Rate) { var ret string return ret } @@ -281,7 +537,7 @@ func (o *ScanOptions) GetRate() string { // GetRateOk returns a tuple with the Rate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetRateOk() (*string, bool) { - if o == nil || o.Rate == nil { + if o == nil || IsNil(o.Rate) { return nil, false } return o.Rate, true @@ -289,7 +545,7 @@ func (o *ScanOptions) GetRateOk() (*string, bool) { // HasRate returns a boolean if a field has been set. func (o *ScanOptions) HasRate() bool { - if o != nil && o.Rate != nil { + if o != nil && !IsNil(o.Rate) { return true } @@ -303,7 +559,7 @@ func (o *ScanOptions) SetRate(v string) { // GetMaxHostRate returns the MaxHostRate field value if set, zero value otherwise. func (o *ScanOptions) GetMaxHostRate() string { - if o == nil || o.MaxHostRate == nil { + if o == nil || IsNil(o.MaxHostRate) { var ret string return ret } @@ -313,7 +569,7 @@ func (o *ScanOptions) GetMaxHostRate() string { // GetMaxHostRateOk returns a tuple with the MaxHostRate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetMaxHostRateOk() (*string, bool) { - if o == nil || o.MaxHostRate == nil { + if o == nil || IsNil(o.MaxHostRate) { return nil, false } return o.MaxHostRate, true @@ -321,7 +577,7 @@ func (o *ScanOptions) GetMaxHostRateOk() (*string, bool) { // HasMaxHostRate returns a boolean if a field has been set. func (o *ScanOptions) HasMaxHostRate() bool { - if o != nil && o.MaxHostRate != nil { + if o != nil && !IsNil(o.MaxHostRate) { return true } @@ -335,7 +591,7 @@ func (o *ScanOptions) SetMaxHostRate(v string) { // GetPasses returns the Passes field value if set, zero value otherwise. func (o *ScanOptions) GetPasses() string { - if o == nil || o.Passes == nil { + if o == nil || IsNil(o.Passes) { var ret string return ret } @@ -345,7 +601,7 @@ func (o *ScanOptions) GetPasses() string { // GetPassesOk returns a tuple with the Passes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetPassesOk() (*string, bool) { - if o == nil || o.Passes == nil { + if o == nil || IsNil(o.Passes) { return nil, false } return o.Passes, true @@ -353,7 +609,7 @@ func (o *ScanOptions) GetPassesOk() (*string, bool) { // HasPasses returns a boolean if a field has been set. func (o *ScanOptions) HasPasses() bool { - if o != nil && o.Passes != nil { + if o != nil && !IsNil(o.Passes) { return true } @@ -365,9 +621,41 @@ func (o *ScanOptions) SetPasses(v string) { o.Passes = &v } +// GetMaxAttempts returns the MaxAttempts field value if set, zero value otherwise. +func (o *ScanOptions) GetMaxAttempts() string { + if o == nil || IsNil(o.MaxAttempts) { + var ret string + return ret + } + return *o.MaxAttempts +} + +// GetMaxAttemptsOk returns a tuple with the MaxAttempts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetMaxAttemptsOk() (*string, bool) { + if o == nil || IsNil(o.MaxAttempts) { + return nil, false + } + return o.MaxAttempts, true +} + +// HasMaxAttempts returns a boolean if a field has been set. +func (o *ScanOptions) HasMaxAttempts() bool { + if o != nil && !IsNil(o.MaxAttempts) { + return true + } + + return false +} + +// SetMaxAttempts gets a reference to the given string and assigns it to the MaxAttempts field. +func (o *ScanOptions) SetMaxAttempts(v string) { + o.MaxAttempts = &v +} + // GetMaxSockets returns the MaxSockets field value if set, zero value otherwise. func (o *ScanOptions) GetMaxSockets() string { - if o == nil || o.MaxSockets == nil { + if o == nil || IsNil(o.MaxSockets) { var ret string return ret } @@ -377,7 +665,7 @@ func (o *ScanOptions) GetMaxSockets() string { // GetMaxSocketsOk returns a tuple with the MaxSockets field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetMaxSocketsOk() (*string, bool) { - if o == nil || o.MaxSockets == nil { + if o == nil || IsNil(o.MaxSockets) { return nil, false } return o.MaxSockets, true @@ -385,7 +673,7 @@ func (o *ScanOptions) GetMaxSocketsOk() (*string, bool) { // HasMaxSockets returns a boolean if a field has been set. func (o *ScanOptions) HasMaxSockets() bool { - if o != nil && o.MaxSockets != nil { + if o != nil && !IsNil(o.MaxSockets) { return true } @@ -399,7 +687,7 @@ func (o *ScanOptions) SetMaxSockets(v string) { // GetMaxGroupSize returns the MaxGroupSize field value if set, zero value otherwise. func (o *ScanOptions) GetMaxGroupSize() string { - if o == nil || o.MaxGroupSize == nil { + if o == nil || IsNil(o.MaxGroupSize) { var ret string return ret } @@ -409,7 +697,7 @@ func (o *ScanOptions) GetMaxGroupSize() string { // GetMaxGroupSizeOk returns a tuple with the MaxGroupSize field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetMaxGroupSizeOk() (*string, bool) { - if o == nil || o.MaxGroupSize == nil { + if o == nil || IsNil(o.MaxGroupSize) { return nil, false } return o.MaxGroupSize, true @@ -417,7 +705,7 @@ func (o *ScanOptions) GetMaxGroupSizeOk() (*string, bool) { // HasMaxGroupSize returns a boolean if a field has been set. func (o *ScanOptions) HasMaxGroupSize() bool { - if o != nil && o.MaxGroupSize != nil { + if o != nil && !IsNil(o.MaxGroupSize) { return true } @@ -429,9 +717,73 @@ func (o *ScanOptions) SetMaxGroupSize(v string) { o.MaxGroupSize = &v } +// GetMaxTtl returns the MaxTtl field value if set, zero value otherwise. +func (o *ScanOptions) GetMaxTtl() string { + if o == nil || IsNil(o.MaxTtl) { + var ret string + return ret + } + return *o.MaxTtl +} + +// GetMaxTtlOk returns a tuple with the MaxTtl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetMaxTtlOk() (*string, bool) { + if o == nil || IsNil(o.MaxTtl) { + return nil, false + } + return o.MaxTtl, true +} + +// HasMaxTtl returns a boolean if a field has been set. +func (o *ScanOptions) HasMaxTtl() bool { + if o != nil && !IsNil(o.MaxTtl) { + return true + } + + return false +} + +// SetMaxTtl gets a reference to the given string and assigns it to the MaxTtl field. +func (o *ScanOptions) SetMaxTtl(v string) { + o.MaxTtl = &v +} + +// GetTos returns the Tos field value if set, zero value otherwise. +func (o *ScanOptions) GetTos() string { + if o == nil || IsNil(o.Tos) { + var ret string + return ret + } + return *o.Tos +} + +// GetTosOk returns a tuple with the Tos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetTosOk() (*string, bool) { + if o == nil || IsNil(o.Tos) { + return nil, false + } + return o.Tos, true +} + +// HasTos returns a boolean if a field has been set. +func (o *ScanOptions) HasTos() bool { + if o != nil && !IsNil(o.Tos) { + return true + } + + return false +} + +// SetTos gets a reference to the given string and assigns it to the Tos field. +func (o *ScanOptions) SetTos(v string) { + o.Tos = &v +} + // GetTcpPorts returns the TcpPorts field value if set, zero value otherwise. func (o *ScanOptions) GetTcpPorts() string { - if o == nil || o.TcpPorts == nil { + if o == nil || IsNil(o.TcpPorts) { var ret string return ret } @@ -441,7 +793,7 @@ func (o *ScanOptions) GetTcpPorts() string { // GetTcpPortsOk returns a tuple with the TcpPorts field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetTcpPortsOk() (*string, bool) { - if o == nil || o.TcpPorts == nil { + if o == nil || IsNil(o.TcpPorts) { return nil, false } return o.TcpPorts, true @@ -449,7 +801,7 @@ func (o *ScanOptions) GetTcpPortsOk() (*string, bool) { // HasTcpPorts returns a boolean if a field has been set. func (o *ScanOptions) HasTcpPorts() bool { - if o != nil && o.TcpPorts != nil { + if o != nil && !IsNil(o.TcpPorts) { return true } @@ -461,9 +813,41 @@ func (o *ScanOptions) SetTcpPorts(v string) { o.TcpPorts = &v } +// GetTcpExcludes returns the TcpExcludes field value if set, zero value otherwise. +func (o *ScanOptions) GetTcpExcludes() string { + if o == nil || IsNil(o.TcpExcludes) { + var ret string + return ret + } + return *o.TcpExcludes +} + +// GetTcpExcludesOk returns a tuple with the TcpExcludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetTcpExcludesOk() (*string, bool) { + if o == nil || IsNil(o.TcpExcludes) { + return nil, false + } + return o.TcpExcludes, true +} + +// HasTcpExcludes returns a boolean if a field has been set. +func (o *ScanOptions) HasTcpExcludes() bool { + if o != nil && !IsNil(o.TcpExcludes) { + return true + } + + return false +} + +// SetTcpExcludes gets a reference to the given string and assigns it to the TcpExcludes field. +func (o *ScanOptions) SetTcpExcludes(v string) { + o.TcpExcludes = &v +} + // GetScreenshots returns the Screenshots field value if set, zero value otherwise. func (o *ScanOptions) GetScreenshots() string { - if o == nil || o.Screenshots == nil { + if o == nil || IsNil(o.Screenshots) { var ret string return ret } @@ -473,7 +857,7 @@ func (o *ScanOptions) GetScreenshots() string { // GetScreenshotsOk returns a tuple with the Screenshots field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetScreenshotsOk() (*string, bool) { - if o == nil || o.Screenshots == nil { + if o == nil || IsNil(o.Screenshots) { return nil, false } return o.Screenshots, true @@ -481,21 +865,21 @@ func (o *ScanOptions) GetScreenshotsOk() (*string, bool) { // HasScreenshots returns a boolean if a field has been set. func (o *ScanOptions) HasScreenshots() bool { - if o != nil && o.Screenshots != nil { + if o != nil && !IsNil(o.Screenshots) { return true } return false } -// SetScreenshots gets a reference to the given bool and assigns it to the Screenshots field. +// SetScreenshots gets a reference to the given string and assigns it to the Screenshots field. func (o *ScanOptions) SetScreenshots(v string) { o.Screenshots = &v } // GetNameservers returns the Nameservers field value if set, zero value otherwise. func (o *ScanOptions) GetNameservers() string { - if o == nil || o.Nameservers == nil { + if o == nil || IsNil(o.Nameservers) { var ret string return ret } @@ -505,7 +889,7 @@ func (o *ScanOptions) GetNameservers() string { // GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetNameserversOk() (*string, bool) { - if o == nil || o.Nameservers == nil { + if o == nil || IsNil(o.Nameservers) { return nil, false } return o.Nameservers, true @@ -513,7 +897,7 @@ func (o *ScanOptions) GetNameserversOk() (*string, bool) { // HasNameservers returns a boolean if a field has been set. func (o *ScanOptions) HasNameservers() bool { - if o != nil && o.Nameservers != nil { + if o != nil && !IsNil(o.Nameservers) { return true } @@ -525,9 +909,201 @@ func (o *ScanOptions) SetNameservers(v string) { o.Nameservers = &v } +// GetSubnetPing returns the SubnetPing field value if set, zero value otherwise. +func (o *ScanOptions) GetSubnetPing() string { + if o == nil || IsNil(o.SubnetPing) { + var ret string + return ret + } + return *o.SubnetPing +} + +// GetSubnetPingOk returns a tuple with the SubnetPing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetSubnetPingOk() (*string, bool) { + if o == nil || IsNil(o.SubnetPing) { + return nil, false + } + return o.SubnetPing, true +} + +// HasSubnetPing returns a boolean if a field has been set. +func (o *ScanOptions) HasSubnetPing() bool { + if o != nil && !IsNil(o.SubnetPing) { + return true + } + + return false +} + +// SetSubnetPing gets a reference to the given string and assigns it to the SubnetPing field. +func (o *ScanOptions) SetSubnetPing(v string) { + o.SubnetPing = &v +} + +// GetSubnetPingNetSize returns the SubnetPingNetSize field value if set, zero value otherwise. +func (o *ScanOptions) GetSubnetPingNetSize() string { + if o == nil || IsNil(o.SubnetPingNetSize) { + var ret string + return ret + } + return *o.SubnetPingNetSize +} + +// GetSubnetPingNetSizeOk returns a tuple with the SubnetPingNetSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetSubnetPingNetSizeOk() (*string, bool) { + if o == nil || IsNil(o.SubnetPingNetSize) { + return nil, false + } + return o.SubnetPingNetSize, true +} + +// HasSubnetPingNetSize returns a boolean if a field has been set. +func (o *ScanOptions) HasSubnetPingNetSize() bool { + if o != nil && !IsNil(o.SubnetPingNetSize) { + return true + } + + return false +} + +// SetSubnetPingNetSize gets a reference to the given string and assigns it to the SubnetPingNetSize field. +func (o *ScanOptions) SetSubnetPingNetSize(v string) { + o.SubnetPingNetSize = &v +} + +// GetSubnetPingProbes returns the SubnetPingProbes field value if set, zero value otherwise. +func (o *ScanOptions) GetSubnetPingProbes() string { + if o == nil || IsNil(o.SubnetPingProbes) { + var ret string + return ret + } + return *o.SubnetPingProbes +} + +// GetSubnetPingProbesOk returns a tuple with the SubnetPingProbes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetSubnetPingProbesOk() (*string, bool) { + if o == nil || IsNil(o.SubnetPingProbes) { + return nil, false + } + return o.SubnetPingProbes, true +} + +// HasSubnetPingProbes returns a boolean if a field has been set. +func (o *ScanOptions) HasSubnetPingProbes() bool { + if o != nil && !IsNil(o.SubnetPingProbes) { + return true + } + + return false +} + +// SetSubnetPingProbes gets a reference to the given string and assigns it to the SubnetPingProbes field. +func (o *ScanOptions) SetSubnetPingProbes(v string) { + o.SubnetPingProbes = &v +} + +// GetSubnetPingSampleRate returns the SubnetPingSampleRate field value if set, zero value otherwise. +func (o *ScanOptions) GetSubnetPingSampleRate() string { + if o == nil || IsNil(o.SubnetPingSampleRate) { + var ret string + return ret + } + return *o.SubnetPingSampleRate +} + +// GetSubnetPingSampleRateOk returns a tuple with the SubnetPingSampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetSubnetPingSampleRateOk() (*string, bool) { + if o == nil || IsNil(o.SubnetPingSampleRate) { + return nil, false + } + return o.SubnetPingSampleRate, true +} + +// HasSubnetPingSampleRate returns a boolean if a field has been set. +func (o *ScanOptions) HasSubnetPingSampleRate() bool { + if o != nil && !IsNil(o.SubnetPingSampleRate) { + return true + } + + return false +} + +// SetSubnetPingSampleRate gets a reference to the given string and assigns it to the SubnetPingSampleRate field. +func (o *ScanOptions) SetSubnetPingSampleRate(v string) { + o.SubnetPingSampleRate = &v +} + +// GetHostPing returns the HostPing field value if set, zero value otherwise. +func (o *ScanOptions) GetHostPing() string { + if o == nil || IsNil(o.HostPing) { + var ret string + return ret + } + return *o.HostPing +} + +// GetHostPingOk returns a tuple with the HostPing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetHostPingOk() (*string, bool) { + if o == nil || IsNil(o.HostPing) { + return nil, false + } + return o.HostPing, true +} + +// HasHostPing returns a boolean if a field has been set. +func (o *ScanOptions) HasHostPing() bool { + if o != nil && !IsNil(o.HostPing) { + return true + } + + return false +} + +// SetHostPing gets a reference to the given string and assigns it to the HostPing field. +func (o *ScanOptions) SetHostPing(v string) { + o.HostPing = &v +} + +// GetHostPingProbes returns the HostPingProbes field value if set, zero value otherwise. +func (o *ScanOptions) GetHostPingProbes() string { + if o == nil || IsNil(o.HostPingProbes) { + var ret string + return ret + } + return *o.HostPingProbes +} + +// GetHostPingProbesOk returns a tuple with the HostPingProbes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanOptions) GetHostPingProbesOk() (*string, bool) { + if o == nil || IsNil(o.HostPingProbes) { + return nil, false + } + return o.HostPingProbes, true +} + +// HasHostPingProbes returns a boolean if a field has been set. +func (o *ScanOptions) HasHostPingProbes() bool { + if o != nil && !IsNil(o.HostPingProbes) { + return true + } + + return false +} + +// SetHostPingProbes gets a reference to the given string and assigns it to the HostPingProbes field. +func (o *ScanOptions) SetHostPingProbes(v string) { + o.HostPingProbes = &v +} + // GetProbes returns the Probes field value if set, zero value otherwise. func (o *ScanOptions) GetProbes() string { - if o == nil || o.Probes == nil { + if o == nil || IsNil(o.Probes) { var ret string return ret } @@ -537,7 +1113,7 @@ func (o *ScanOptions) GetProbes() string { // GetProbesOk returns a tuple with the Probes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScanOptions) GetProbesOk() (*string, bool) { - if o == nil || o.Probes == nil { + if o == nil || IsNil(o.Probes) { return nil, false } return o.Probes, true @@ -545,7 +1121,7 @@ func (o *ScanOptions) GetProbesOk() (*string, bool) { // HasProbes returns a boolean if a field has been set. func (o *ScanOptions) HasProbes() bool { - if o != nil && o.Probes != nil { + if o != nil && !IsNil(o.Probes) { return true } @@ -558,56 +1134,150 @@ func (o *ScanOptions) SetProbes(v string) { } func (o ScanOptions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["targets"] = o.Targets + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Excludes != nil { + return json.Marshal(toSerialize) +} + +func (o ScanOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["targets"] = o.Targets + if !IsNil(o.Excludes) { toSerialize["excludes"] = o.Excludes } - if o.ScanName != nil { + if !IsNil(o.ScanName) { toSerialize["scan-name"] = o.ScanName } - if o.ScanDescription != nil { + if !IsNil(o.ScanDescription) { toSerialize["scan-description"] = o.ScanDescription } - if o.ScanFrequency != nil { + if !IsNil(o.ScanTemplate) { + toSerialize["scan-template"] = o.ScanTemplate + } + if !IsNil(o.ScanFrequency) { toSerialize["scan-frequency"] = o.ScanFrequency } - if o.ScanStart != nil { + if !IsNil(o.ScanStart) { toSerialize["scan-start"] = o.ScanStart } - if o.Agent != nil { + if !IsNil(o.ScanTags) { + toSerialize["scan-tags"] = o.ScanTags + } + if !IsNil(o.ScanGracePeriod) { + toSerialize["scan-grace-period"] = o.ScanGracePeriod + } + if !IsNil(o.Agent) { toSerialize["agent"] = o.Agent } - if o.Rate != nil { + if !IsNil(o.Explorer) { + toSerialize["explorer"] = o.Explorer + } + if !IsNil(o.ExplorerGroupId) { + toSerialize["explorer-group-id"] = o.ExplorerGroupId + } + if !IsNil(o.HostedZoneId) { + toSerialize["hosted-zone-id"] = o.HostedZoneId + } + if !IsNil(o.HostedZoneName) { + toSerialize["hosted-zone-name"] = o.HostedZoneName + } + if !IsNil(o.Rate) { toSerialize["rate"] = o.Rate } - if o.MaxHostRate != nil { + if !IsNil(o.MaxHostRate) { toSerialize["max-host-rate"] = o.MaxHostRate } - if o.Passes != nil { + if !IsNil(o.Passes) { toSerialize["passes"] = o.Passes } - if o.MaxSockets != nil { + if !IsNil(o.MaxAttempts) { + toSerialize["max-attempts"] = o.MaxAttempts + } + if !IsNil(o.MaxSockets) { toSerialize["max-sockets"] = o.MaxSockets } - if o.MaxGroupSize != nil { + if !IsNil(o.MaxGroupSize) { toSerialize["max-group-size"] = o.MaxGroupSize } - if o.TcpPorts != nil { + if !IsNil(o.MaxTtl) { + toSerialize["max-ttl"] = o.MaxTtl + } + if !IsNil(o.Tos) { + toSerialize["tos"] = o.Tos + } + if !IsNil(o.TcpPorts) { toSerialize["tcp-ports"] = o.TcpPorts } - if o.Screenshots != nil { + if !IsNil(o.TcpExcludes) { + toSerialize["tcp-excludes"] = o.TcpExcludes + } + if !IsNil(o.Screenshots) { toSerialize["screenshots"] = o.Screenshots } - if o.Nameservers != nil { + if !IsNil(o.Nameservers) { toSerialize["nameservers"] = o.Nameservers } - if o.Probes != nil { + if !IsNil(o.SubnetPing) { + toSerialize["subnet-ping"] = o.SubnetPing + } + if !IsNil(o.SubnetPingNetSize) { + toSerialize["subnet-ping-net-size"] = o.SubnetPingNetSize + } + if !IsNil(o.SubnetPingProbes) { + toSerialize["subnet-ping-probes"] = o.SubnetPingProbes + } + if !IsNil(o.SubnetPingSampleRate) { + toSerialize["subnet-ping-sample-rate"] = o.SubnetPingSampleRate + } + if !IsNil(o.HostPing) { + toSerialize["host-ping"] = o.HostPing + } + if !IsNil(o.HostPingProbes) { + toSerialize["host-ping-probes"] = o.HostPingProbes + } + if !IsNil(o.Probes) { toSerialize["probes"] = o.Probes } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *ScanOptions) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "targets", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScanOptions := _ScanOptions{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScanOptions) + + if err != nil { + return err + } + + *o = ScanOptions(varScanOptions) + + return err } type NullableScanOptions struct { @@ -645,3 +1315,5 @@ func (v *NullableScanOptions) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_scan_template.go b/go/model_scan_template.go new file mode 100644 index 0000000..67a5e74 --- /dev/null +++ b/go/model_scan_template.go @@ -0,0 +1,1431 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ScanTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScanTemplate{} + +// ScanTemplate A scan task template +type ScanTemplate struct { + // ID of the template. + Id string `json:"id"` + // The name of the template. + Name *string `json:"name,omitempty"` + // The description of the template. + Description *string `json:"description,omitempty"` + // ID of the account which owns the template. + ClientId *string `json:"client_id,omitempty"` + // ID of the organization the template is available in. + OrganizationId string `json:"organization_id"` + // ID of the explorer which may execute the template. + AgentId *string `json:"agent_id,omitempty"` + // ID of the site the template is being used in. + SiteId *string `json:"site_id,omitempty"` + // ID of the runZero cruncher the task is executing on. + CruncherId *string `json:"cruncher_id,omitempty"` + // Unix timestamp value indicating when the template was created. + CreatedAt *int64 `json:"created_at,omitempty"` + // The username of the account which created the template. + CreatedBy *string `json:"created_by,omitempty"` + // The ID of the account which created the template. + CreatedByUserId *string `json:"created_by_user_id,omitempty"` + // Unix timestamp value indicating when the template was last modified. + UpdatedAt *int64 `json:"updated_at,omitempty"` + // The type of task the template creates. + Type *string `json:"type,omitempty"` + // The status of the last task using the template. + Status *string `json:"status,omitempty"` + // The error message, if any, of the last task using the template. + Error *string `json:"error,omitempty"` + // A number of task parameter values. Currently there is no authoritative list of in-use values. See existing templates for examples. + Params *map[string]string `json:"params,omitempty"` + // A map of statistics about the last task executed with the template. Currently there is no authoritative list of in-use values. See existing templates for examples. + Stats map[string]interface{} `json:"stats,omitempty"` + // A flag indicating whether the item is hidden from common view. + Hidden *bool `json:"hidden,omitempty"` + // The ID of the parent entity of the task scheduled. + ParentId *string `json:"parent_id,omitempty"` + // A flag representing whether derived tasks are scheduled to repeat. + Recur *bool `json:"recur,omitempty"` + // A string time duration value representing execution frequency, if scheduled to repeat. You may use values including as once, hourly, daily, weekly, monthly, continuous + RecurFrequency *string `json:"recur_frequency,omitempty"` + // Unix timestamp representing the next execution time. + StartTime *int64 `json:"start_time,omitempty"` + // Unix timestamp representing the last execution if scheduled to repeat. + RecurLast *int64 `json:"recur_last,omitempty"` + // Unix timestamp representing the next execution if scheduled to repeat. + RecurNext *int64 `json:"recur_next,omitempty"` + // The ID of the task that last executed if scheduled to repeat. + RecurLastTaskId *string `json:"recur_last_task_id,omitempty"` + // Additional time beyond hard expiration deadline by which the task may still be allowed to execute. + GracePeriod *string `json:"grace_period,omitempty"` + // The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. + CustomIntegrationId *string `json:"custom_integration_id,omitempty"` + // The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. + SourceId *string `json:"source_id,omitempty"` + // The ID of the template. + TemplateId *string `json:"template_id,omitempty"` + // The size in assets of the site the last task the template was executed against. + SizeSite *int64 `json:"size_site,omitempty"` + // The total size of result data of the last task the template was used with. + SizeData *int64 `json:"size_data,omitempty"` + // The number of results in the last task the template was used with. + SizeResults *int64 `json:"size_results,omitempty"` + // The ID of the hosted zone that ran the last task the template was used with. + HostedZoneId *string `json:"hosted_zone_id,omitempty"` + // The number of tasks derived from the template. + LinkedTaskCount *int32 `json:"linked_task_count,omitempty"` + // Whether the template is globally available to all organizations. + Global bool `json:"global"` + // A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of in-use values. See existing templates for examples. + Acl map[string]interface{} `json:"acl"` +} + +type _ScanTemplate ScanTemplate + +// NewScanTemplate instantiates a new ScanTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScanTemplate(id string, organizationId string, global bool, acl map[string]interface{}) *ScanTemplate { + this := ScanTemplate{} + this.Id = id + this.OrganizationId = organizationId + this.Global = global + this.Acl = acl + return &this +} + +// NewScanTemplateWithDefaults instantiates a new ScanTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScanTemplateWithDefaults() *ScanTemplate { + this := ScanTemplate{} + return &this +} + +// GetId returns the Id field value +func (o *ScanTemplate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ScanTemplate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ScanTemplate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ScanTemplate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ScanTemplate) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ScanTemplate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScanTemplate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ScanTemplate) SetDescription(v string) { + o.Description = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *ScanTemplate) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *ScanTemplate) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *ScanTemplate) SetClientId(v string) { + o.ClientId = &v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *ScanTemplate) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *ScanTemplate) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetAgentId returns the AgentId field value if set, zero value otherwise. +func (o *ScanTemplate) GetAgentId() string { + if o == nil || IsNil(o.AgentId) { + var ret string + return ret + } + return *o.AgentId +} + +// GetAgentIdOk returns a tuple with the AgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentId) { + return nil, false + } + return o.AgentId, true +} + +// HasAgentId returns a boolean if a field has been set. +func (o *ScanTemplate) HasAgentId() bool { + if o != nil && !IsNil(o.AgentId) { + return true + } + + return false +} + +// SetAgentId gets a reference to the given string and assigns it to the AgentId field. +func (o *ScanTemplate) SetAgentId(v string) { + o.AgentId = &v +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *ScanTemplate) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *ScanTemplate) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *ScanTemplate) SetSiteId(v string) { + o.SiteId = &v +} + +// GetCruncherId returns the CruncherId field value if set, zero value otherwise. +func (o *ScanTemplate) GetCruncherId() string { + if o == nil || IsNil(o.CruncherId) { + var ret string + return ret + } + return *o.CruncherId +} + +// GetCruncherIdOk returns a tuple with the CruncherId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetCruncherIdOk() (*string, bool) { + if o == nil || IsNil(o.CruncherId) { + return nil, false + } + return o.CruncherId, true +} + +// HasCruncherId returns a boolean if a field has been set. +func (o *ScanTemplate) HasCruncherId() bool { + if o != nil && !IsNil(o.CruncherId) { + return true + } + + return false +} + +// SetCruncherId gets a reference to the given string and assigns it to the CruncherId field. +func (o *ScanTemplate) SetCruncherId(v string) { + o.CruncherId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ScanTemplate) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ScanTemplate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *ScanTemplate) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *ScanTemplate) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ScanTemplate) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *ScanTemplate) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *ScanTemplate) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *ScanTemplate) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *ScanTemplate) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ScanTemplate) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ScanTemplate) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *ScanTemplate) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ScanTemplate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ScanTemplate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ScanTemplate) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScanTemplate) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScanTemplate) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ScanTemplate) SetStatus(v string) { + o.Status = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ScanTemplate) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ScanTemplate) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *ScanTemplate) SetError(v string) { + o.Error = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *ScanTemplate) GetParams() map[string]string { + if o == nil || IsNil(o.Params) { + var ret map[string]string + return ret + } + return *o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetParamsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Params) { + return nil, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *ScanTemplate) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]string and assigns it to the Params field. +func (o *ScanTemplate) SetParams(v map[string]string) { + o.Params = &v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *ScanTemplate) GetStats() map[string]interface{} { + if o == nil || IsNil(o.Stats) { + var ret map[string]interface{} + return ret + } + return o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetStatsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Stats) { + return map[string]interface{}{}, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *ScanTemplate) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given map[string]interface{} and assigns it to the Stats field. +func (o *ScanTemplate) SetStats(v map[string]interface{}) { + o.Stats = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *ScanTemplate) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *ScanTemplate) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *ScanTemplate) SetHidden(v bool) { + o.Hidden = &v +} + +// GetParentId returns the ParentId field value if set, zero value otherwise. +func (o *ScanTemplate) GetParentId() string { + if o == nil || IsNil(o.ParentId) { + var ret string + return ret + } + return *o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetParentIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentId) { + return nil, false + } + return o.ParentId, true +} + +// HasParentId returns a boolean if a field has been set. +func (o *ScanTemplate) HasParentId() bool { + if o != nil && !IsNil(o.ParentId) { + return true + } + + return false +} + +// SetParentId gets a reference to the given string and assigns it to the ParentId field. +func (o *ScanTemplate) SetParentId(v string) { + o.ParentId = &v +} + +// GetRecur returns the Recur field value if set, zero value otherwise. +func (o *ScanTemplate) GetRecur() bool { + if o == nil || IsNil(o.Recur) { + var ret bool + return ret + } + return *o.Recur +} + +// GetRecurOk returns a tuple with the Recur field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetRecurOk() (*bool, bool) { + if o == nil || IsNil(o.Recur) { + return nil, false + } + return o.Recur, true +} + +// HasRecur returns a boolean if a field has been set. +func (o *ScanTemplate) HasRecur() bool { + if o != nil && !IsNil(o.Recur) { + return true + } + + return false +} + +// SetRecur gets a reference to the given bool and assigns it to the Recur field. +func (o *ScanTemplate) SetRecur(v bool) { + o.Recur = &v +} + +// GetRecurFrequency returns the RecurFrequency field value if set, zero value otherwise. +func (o *ScanTemplate) GetRecurFrequency() string { + if o == nil || IsNil(o.RecurFrequency) { + var ret string + return ret + } + return *o.RecurFrequency +} + +// GetRecurFrequencyOk returns a tuple with the RecurFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetRecurFrequencyOk() (*string, bool) { + if o == nil || IsNil(o.RecurFrequency) { + return nil, false + } + return o.RecurFrequency, true +} + +// HasRecurFrequency returns a boolean if a field has been set. +func (o *ScanTemplate) HasRecurFrequency() bool { + if o != nil && !IsNil(o.RecurFrequency) { + return true + } + + return false +} + +// SetRecurFrequency gets a reference to the given string and assigns it to the RecurFrequency field. +func (o *ScanTemplate) SetRecurFrequency(v string) { + o.RecurFrequency = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *ScanTemplate) GetStartTime() int64 { + if o == nil || IsNil(o.StartTime) { + var ret int64 + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetStartTimeOk() (*int64, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *ScanTemplate) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given int64 and assigns it to the StartTime field. +func (o *ScanTemplate) SetStartTime(v int64) { + o.StartTime = &v +} + +// GetRecurLast returns the RecurLast field value if set, zero value otherwise. +func (o *ScanTemplate) GetRecurLast() int64 { + if o == nil || IsNil(o.RecurLast) { + var ret int64 + return ret + } + return *o.RecurLast +} + +// GetRecurLastOk returns a tuple with the RecurLast field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetRecurLastOk() (*int64, bool) { + if o == nil || IsNil(o.RecurLast) { + return nil, false + } + return o.RecurLast, true +} + +// HasRecurLast returns a boolean if a field has been set. +func (o *ScanTemplate) HasRecurLast() bool { + if o != nil && !IsNil(o.RecurLast) { + return true + } + + return false +} + +// SetRecurLast gets a reference to the given int64 and assigns it to the RecurLast field. +func (o *ScanTemplate) SetRecurLast(v int64) { + o.RecurLast = &v +} + +// GetRecurNext returns the RecurNext field value if set, zero value otherwise. +func (o *ScanTemplate) GetRecurNext() int64 { + if o == nil || IsNil(o.RecurNext) { + var ret int64 + return ret + } + return *o.RecurNext +} + +// GetRecurNextOk returns a tuple with the RecurNext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetRecurNextOk() (*int64, bool) { + if o == nil || IsNil(o.RecurNext) { + return nil, false + } + return o.RecurNext, true +} + +// HasRecurNext returns a boolean if a field has been set. +func (o *ScanTemplate) HasRecurNext() bool { + if o != nil && !IsNil(o.RecurNext) { + return true + } + + return false +} + +// SetRecurNext gets a reference to the given int64 and assigns it to the RecurNext field. +func (o *ScanTemplate) SetRecurNext(v int64) { + o.RecurNext = &v +} + +// GetRecurLastTaskId returns the RecurLastTaskId field value if set, zero value otherwise. +func (o *ScanTemplate) GetRecurLastTaskId() string { + if o == nil || IsNil(o.RecurLastTaskId) { + var ret string + return ret + } + return *o.RecurLastTaskId +} + +// GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetRecurLastTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.RecurLastTaskId) { + return nil, false + } + return o.RecurLastTaskId, true +} + +// HasRecurLastTaskId returns a boolean if a field has been set. +func (o *ScanTemplate) HasRecurLastTaskId() bool { + if o != nil && !IsNil(o.RecurLastTaskId) { + return true + } + + return false +} + +// SetRecurLastTaskId gets a reference to the given string and assigns it to the RecurLastTaskId field. +func (o *ScanTemplate) SetRecurLastTaskId(v string) { + o.RecurLastTaskId = &v +} + +// GetGracePeriod returns the GracePeriod field value if set, zero value otherwise. +func (o *ScanTemplate) GetGracePeriod() string { + if o == nil || IsNil(o.GracePeriod) { + var ret string + return ret + } + return *o.GracePeriod +} + +// GetGracePeriodOk returns a tuple with the GracePeriod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetGracePeriodOk() (*string, bool) { + if o == nil || IsNil(o.GracePeriod) { + return nil, false + } + return o.GracePeriod, true +} + +// HasGracePeriod returns a boolean if a field has been set. +func (o *ScanTemplate) HasGracePeriod() bool { + if o != nil && !IsNil(o.GracePeriod) { + return true + } + + return false +} + +// SetGracePeriod gets a reference to the given string and assigns it to the GracePeriod field. +func (o *ScanTemplate) SetGracePeriod(v string) { + o.GracePeriod = &v +} + +// GetCustomIntegrationId returns the CustomIntegrationId field value if set, zero value otherwise. +func (o *ScanTemplate) GetCustomIntegrationId() string { + if o == nil || IsNil(o.CustomIntegrationId) { + var ret string + return ret + } + return *o.CustomIntegrationId +} + +// GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetCustomIntegrationIdOk() (*string, bool) { + if o == nil || IsNil(o.CustomIntegrationId) { + return nil, false + } + return o.CustomIntegrationId, true +} + +// HasCustomIntegrationId returns a boolean if a field has been set. +func (o *ScanTemplate) HasCustomIntegrationId() bool { + if o != nil && !IsNil(o.CustomIntegrationId) { + return true + } + + return false +} + +// SetCustomIntegrationId gets a reference to the given string and assigns it to the CustomIntegrationId field. +func (o *ScanTemplate) SetCustomIntegrationId(v string) { + o.CustomIntegrationId = &v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *ScanTemplate) GetSourceId() string { + if o == nil || IsNil(o.SourceId) { + var ret string + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *ScanTemplate) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given string and assigns it to the SourceId field. +func (o *ScanTemplate) SetSourceId(v string) { + o.SourceId = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *ScanTemplate) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *ScanTemplate) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *ScanTemplate) SetTemplateId(v string) { + o.TemplateId = &v +} + +// GetSizeSite returns the SizeSite field value if set, zero value otherwise. +func (o *ScanTemplate) GetSizeSite() int64 { + if o == nil || IsNil(o.SizeSite) { + var ret int64 + return ret + } + return *o.SizeSite +} + +// GetSizeSiteOk returns a tuple with the SizeSite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetSizeSiteOk() (*int64, bool) { + if o == nil || IsNil(o.SizeSite) { + return nil, false + } + return o.SizeSite, true +} + +// HasSizeSite returns a boolean if a field has been set. +func (o *ScanTemplate) HasSizeSite() bool { + if o != nil && !IsNil(o.SizeSite) { + return true + } + + return false +} + +// SetSizeSite gets a reference to the given int64 and assigns it to the SizeSite field. +func (o *ScanTemplate) SetSizeSite(v int64) { + o.SizeSite = &v +} + +// GetSizeData returns the SizeData field value if set, zero value otherwise. +func (o *ScanTemplate) GetSizeData() int64 { + if o == nil || IsNil(o.SizeData) { + var ret int64 + return ret + } + return *o.SizeData +} + +// GetSizeDataOk returns a tuple with the SizeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetSizeDataOk() (*int64, bool) { + if o == nil || IsNil(o.SizeData) { + return nil, false + } + return o.SizeData, true +} + +// HasSizeData returns a boolean if a field has been set. +func (o *ScanTemplate) HasSizeData() bool { + if o != nil && !IsNil(o.SizeData) { + return true + } + + return false +} + +// SetSizeData gets a reference to the given int64 and assigns it to the SizeData field. +func (o *ScanTemplate) SetSizeData(v int64) { + o.SizeData = &v +} + +// GetSizeResults returns the SizeResults field value if set, zero value otherwise. +func (o *ScanTemplate) GetSizeResults() int64 { + if o == nil || IsNil(o.SizeResults) { + var ret int64 + return ret + } + return *o.SizeResults +} + +// GetSizeResultsOk returns a tuple with the SizeResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetSizeResultsOk() (*int64, bool) { + if o == nil || IsNil(o.SizeResults) { + return nil, false + } + return o.SizeResults, true +} + +// HasSizeResults returns a boolean if a field has been set. +func (o *ScanTemplate) HasSizeResults() bool { + if o != nil && !IsNil(o.SizeResults) { + return true + } + + return false +} + +// SetSizeResults gets a reference to the given int64 and assigns it to the SizeResults field. +func (o *ScanTemplate) SetSizeResults(v int64) { + o.SizeResults = &v +} + +// GetHostedZoneId returns the HostedZoneId field value if set, zero value otherwise. +func (o *ScanTemplate) GetHostedZoneId() string { + if o == nil || IsNil(o.HostedZoneId) { + var ret string + return ret + } + return *o.HostedZoneId +} + +// GetHostedZoneIdOk returns a tuple with the HostedZoneId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetHostedZoneIdOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneId) { + return nil, false + } + return o.HostedZoneId, true +} + +// HasHostedZoneId returns a boolean if a field has been set. +func (o *ScanTemplate) HasHostedZoneId() bool { + if o != nil && !IsNil(o.HostedZoneId) { + return true + } + + return false +} + +// SetHostedZoneId gets a reference to the given string and assigns it to the HostedZoneId field. +func (o *ScanTemplate) SetHostedZoneId(v string) { + o.HostedZoneId = &v +} + +// GetLinkedTaskCount returns the LinkedTaskCount field value if set, zero value otherwise. +func (o *ScanTemplate) GetLinkedTaskCount() int32 { + if o == nil || IsNil(o.LinkedTaskCount) { + var ret int32 + return ret + } + return *o.LinkedTaskCount +} + +// GetLinkedTaskCountOk returns a tuple with the LinkedTaskCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetLinkedTaskCountOk() (*int32, bool) { + if o == nil || IsNil(o.LinkedTaskCount) { + return nil, false + } + return o.LinkedTaskCount, true +} + +// HasLinkedTaskCount returns a boolean if a field has been set. +func (o *ScanTemplate) HasLinkedTaskCount() bool { + if o != nil && !IsNil(o.LinkedTaskCount) { + return true + } + + return false +} + +// SetLinkedTaskCount gets a reference to the given int32 and assigns it to the LinkedTaskCount field. +func (o *ScanTemplate) SetLinkedTaskCount(v int32) { + o.LinkedTaskCount = &v +} + +// GetGlobal returns the Global field value +func (o *ScanTemplate) GetGlobal() bool { + if o == nil { + var ret bool + return ret + } + + return o.Global +} + +// GetGlobalOk returns a tuple with the Global field value +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetGlobalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Global, true +} + +// SetGlobal sets field value +func (o *ScanTemplate) SetGlobal(v bool) { + o.Global = v +} + +// GetAcl returns the Acl field value +func (o *ScanTemplate) GetAcl() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *ScanTemplate) GetAclOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *ScanTemplate) SetAcl(v map[string]interface{}) { + o.Acl = v +} + +func (o ScanTemplate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScanTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + toSerialize["organization_id"] = o.OrganizationId + if !IsNil(o.AgentId) { + toSerialize["agent_id"] = o.AgentId + } + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.CruncherId) { + toSerialize["cruncher_id"] = o.CruncherId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["created_by_user_id"] = o.CreatedByUserId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.ParentId) { + toSerialize["parent_id"] = o.ParentId + } + if !IsNil(o.Recur) { + toSerialize["recur"] = o.Recur + } + if !IsNil(o.RecurFrequency) { + toSerialize["recur_frequency"] = o.RecurFrequency + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.RecurLast) { + toSerialize["recur_last"] = o.RecurLast + } + if !IsNil(o.RecurNext) { + toSerialize["recur_next"] = o.RecurNext + } + if !IsNil(o.RecurLastTaskId) { + toSerialize["recur_last_task_id"] = o.RecurLastTaskId + } + if !IsNil(o.GracePeriod) { + toSerialize["grace_period"] = o.GracePeriod + } + if !IsNil(o.CustomIntegrationId) { + toSerialize["custom_integration_id"] = o.CustomIntegrationId + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + if !IsNil(o.SizeSite) { + toSerialize["size_site"] = o.SizeSite + } + if !IsNil(o.SizeData) { + toSerialize["size_data"] = o.SizeData + } + if !IsNil(o.SizeResults) { + toSerialize["size_results"] = o.SizeResults + } + if !IsNil(o.HostedZoneId) { + toSerialize["hosted_zone_id"] = o.HostedZoneId + } + if !IsNil(o.LinkedTaskCount) { + toSerialize["linked_task_count"] = o.LinkedTaskCount + } + toSerialize["global"] = o.Global + toSerialize["acl"] = o.Acl + return toSerialize, nil +} + +func (o *ScanTemplate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "organization_id", + "global", + "acl", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScanTemplate := _ScanTemplate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScanTemplate) + + if err != nil { + return err + } + + *o = ScanTemplate(varScanTemplate) + + return err +} + +type NullableScanTemplate struct { + value *ScanTemplate + isSet bool +} + +func (v NullableScanTemplate) Get() *ScanTemplate { + return v.value +} + +func (v *NullableScanTemplate) Set(val *ScanTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableScanTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableScanTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScanTemplate(val *ScanTemplate) *NullableScanTemplate { + return &NullableScanTemplate{value: val, isSet: true} +} + +func (v NullableScanTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScanTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_scan_template_options.go b/go/model_scan_template_options.go new file mode 100644 index 0000000..7381a12 --- /dev/null +++ b/go/model_scan_template_options.go @@ -0,0 +1,321 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ScanTemplateOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScanTemplateOptions{} + +// ScanTemplateOptions Options which can be set to create a scan template. +type ScanTemplateOptions struct { + // Name of the template. + Name string `json:"name"` + // Description of the template. + Description *string `json:"description,omitempty"` + // The ID of the organization the template will be created in + OrganizationId string `json:"organization_id"` + // A number of scan parameter values. Currently there is no authoritative list of acceptable values. See existing templates for examples. + Params *map[string]string `json:"params,omitempty"` + // Whether the template is globally available to all organizations. + Global bool `json:"global"` + // A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of acceptable values. See existing templates for examples. + Acl map[string]interface{} `json:"acl"` +} + +type _ScanTemplateOptions ScanTemplateOptions + +// NewScanTemplateOptions instantiates a new ScanTemplateOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScanTemplateOptions(name string, organizationId string, global bool, acl map[string]interface{}) *ScanTemplateOptions { + this := ScanTemplateOptions{} + this.Name = name + this.OrganizationId = organizationId + this.Global = global + this.Acl = acl + return &this +} + +// NewScanTemplateOptionsWithDefaults instantiates a new ScanTemplateOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScanTemplateOptionsWithDefaults() *ScanTemplateOptions { + this := ScanTemplateOptions{} + return &this +} + +// GetName returns the Name field value +func (o *ScanTemplateOptions) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ScanTemplateOptions) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ScanTemplateOptions) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScanTemplateOptions) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ScanTemplateOptions) SetDescription(v string) { + o.Description = &v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *ScanTemplateOptions) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *ScanTemplateOptions) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *ScanTemplateOptions) GetParams() map[string]string { + if o == nil || IsNil(o.Params) { + var ret map[string]string + return ret + } + return *o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetParamsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Params) { + return nil, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *ScanTemplateOptions) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]string and assigns it to the Params field. +func (o *ScanTemplateOptions) SetParams(v map[string]string) { + o.Params = &v +} + +// GetGlobal returns the Global field value +func (o *ScanTemplateOptions) GetGlobal() bool { + if o == nil { + var ret bool + return ret + } + + return o.Global +} + +// GetGlobalOk returns a tuple with the Global field value +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetGlobalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Global, true +} + +// SetGlobal sets field value +func (o *ScanTemplateOptions) SetGlobal(v bool) { + o.Global = v +} + +// GetAcl returns the Acl field value +func (o *ScanTemplateOptions) GetAcl() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *ScanTemplateOptions) GetAclOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *ScanTemplateOptions) SetAcl(v map[string]interface{}) { + o.Acl = v +} + +func (o ScanTemplateOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScanTemplateOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["organization_id"] = o.OrganizationId + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + toSerialize["global"] = o.Global + toSerialize["acl"] = o.Acl + return toSerialize, nil +} + +func (o *ScanTemplateOptions) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "organization_id", + "global", + "acl", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScanTemplateOptions := _ScanTemplateOptions{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScanTemplateOptions) + + if err != nil { + return err + } + + *o = ScanTemplateOptions(varScanTemplateOptions) + + return err +} + +type NullableScanTemplateOptions struct { + value *ScanTemplateOptions + isSet bool +} + +func (v NullableScanTemplateOptions) Get() *ScanTemplateOptions { + return v.value +} + +func (v *NullableScanTemplateOptions) Set(val *ScanTemplateOptions) { + v.value = val + v.isSet = true +} + +func (v NullableScanTemplateOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableScanTemplateOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScanTemplateOptions(val *ScanTemplateOptions) *NullableScanTemplateOptions { + return &NullableScanTemplateOptions{value: val, isSet: true} +} + +func (v NullableScanTemplateOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScanTemplateOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_search_query.go b/go/model_search_query.go new file mode 100644 index 0000000..eb5bb2c --- /dev/null +++ b/go/model_search_query.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SearchQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SearchQuery{} + +// SearchQuery A request body wrapping a runZero search query string. +type SearchQuery struct { + Search string `json:"search"` +} + +type _SearchQuery SearchQuery + +// NewSearchQuery instantiates a new SearchQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSearchQuery(search string) *SearchQuery { + this := SearchQuery{} + this.Search = search + return &this +} + +// NewSearchQueryWithDefaults instantiates a new SearchQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSearchQueryWithDefaults() *SearchQuery { + this := SearchQuery{} + return &this +} + +// GetSearch returns the Search field value +func (o *SearchQuery) GetSearch() string { + if o == nil { + var ret string + return ret + } + + return o.Search +} + +// GetSearchOk returns a tuple with the Search field value +// and a boolean to check if the value has been set. +func (o *SearchQuery) GetSearchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Search, true +} + +// SetSearch sets field value +func (o *SearchQuery) SetSearch(v string) { + o.Search = v +} + +func (o SearchQuery) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SearchQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["search"] = o.Search + return toSerialize, nil +} + +func (o *SearchQuery) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "search", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSearchQuery := _SearchQuery{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSearchQuery) + + if err != nil { + return err + } + + *o = SearchQuery(varSearchQuery) + + return err +} + +type NullableSearchQuery struct { + value *SearchQuery + isSet bool +} + +func (v NullableSearchQuery) Get() *SearchQuery { + return v.value +} + +func (v *NullableSearchQuery) Set(val *SearchQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSearchQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchQuery(val *SearchQuery) *NullableSearchQuery { + return &NullableSearchQuery{value: val, isSet: true} +} + +func (v NullableSearchQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_sentinel_one_credential_fields.go b/go/model_sentinel_one_credential_fields.go new file mode 100644 index 0000000..e571564 --- /dev/null +++ b/go/model_sentinel_one_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SentinelOneCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SentinelOneCredentialFields{} + +// SentinelOneCredentialFields struct for SentinelOneCredentialFields +type SentinelOneCredentialFields struct { + ApiUrl string `json:"api_url"` + ApiKey string `json:"api_key"` +} + +type _SentinelOneCredentialFields SentinelOneCredentialFields + +// NewSentinelOneCredentialFields instantiates a new SentinelOneCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSentinelOneCredentialFields(apiUrl string, apiKey string) *SentinelOneCredentialFields { + this := SentinelOneCredentialFields{} + this.ApiUrl = apiUrl + this.ApiKey = apiKey + return &this +} + +// NewSentinelOneCredentialFieldsWithDefaults instantiates a new SentinelOneCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSentinelOneCredentialFieldsWithDefaults() *SentinelOneCredentialFields { + this := SentinelOneCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *SentinelOneCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *SentinelOneCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *SentinelOneCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetApiKey returns the ApiKey field value +func (o *SentinelOneCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *SentinelOneCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *SentinelOneCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o SentinelOneCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SentinelOneCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *SentinelOneCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSentinelOneCredentialFields := _SentinelOneCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSentinelOneCredentialFields) + + if err != nil { + return err + } + + *o = SentinelOneCredentialFields(varSentinelOneCredentialFields) + + return err +} + +type NullableSentinelOneCredentialFields struct { + value *SentinelOneCredentialFields + isSet bool +} + +func (v NullableSentinelOneCredentialFields) Get() *SentinelOneCredentialFields { + return v.value +} + +func (v *NullableSentinelOneCredentialFields) Set(val *SentinelOneCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableSentinelOneCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableSentinelOneCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSentinelOneCredentialFields(val *SentinelOneCredentialFields) *NullableSentinelOneCredentialFields { + return &NullableSentinelOneCredentialFields{value: val, isSet: true} +} + +func (v NullableSentinelOneCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSentinelOneCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_service.go b/go/model_service.go index 7f16f2b..e2f02b2 100644 --- a/go/model_service.go +++ b/go/model_service.go @@ -1,79 +1,87 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the Service type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Service{} + // Service struct for Service type Service struct { - ServiceId string `json:"service_id"` - ServiceAssetId *string `json:"service_asset_id,omitempty"` - ServiceCreatedAt *int64 `json:"service_created_at,omitempty"` - ServiceUpdatedAt *int64 `json:"service_updated_at,omitempty"` - ServiceAddress *string `json:"service_address,omitempty"` - ServiceTransport *string `json:"service_transport,omitempty"` - ServiceVhost *string `json:"service_vhost,omitempty"` - ServicePort *string `json:"service_port,omitempty"` - ServiceData *map[string]string `json:"service_data,omitempty"` - ServiceProtocol *string `json:"service_protocol,omitempty"` - ServiceSummary *string `json:"service_summary,omitempty"` - ServiceScreenshotLink *string `json:"service_screenshot_link,omitempty"` - ServiceLink *string `json:"service_link,omitempty"` - Id string `json:"id"` - CreatedAt *int64 `json:"created_at,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - SiteId *string `json:"site_id,omitempty"` - Alive *bool `json:"alive,omitempty"` - FirstSeen *int64 `json:"first_seen,omitempty"` - LastSeen *int64 `json:"last_seen,omitempty"` - DetectedBy *string `json:"detected_by,omitempty"` - Type *string `json:"type,omitempty"` - Os *string `json:"os,omitempty"` - OsVersion *string `json:"os_version,omitempty"` - Hw *string `json:"hw,omitempty"` - Addresses *[]string `json:"addresses,omitempty"` - AddressesExtra *[]string `json:"addresses_extra,omitempty"` - Macs *[]string `json:"macs,omitempty"` - MacVendors *[]string `json:"mac_vendors,omitempty"` - Names *[]string `json:"names,omitempty"` - Domains *[]string `json:"domains,omitempty"` - ServiceCount *int64 `json:"service_count,omitempty"` - ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` - ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` - ServiceCountArp *int64 `json:"service_count_arp,omitempty"` - ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` - LowestTtl *int64 `json:"lowest_ttl,omitempty"` - LowestRtt *int64 `json:"lowest_rtt,omitempty"` - LastAgentId *string `json:"last_agent_id,omitempty"` - LastTaskId *string `json:"last_task_id,omitempty"` - NewestMac *string `json:"newest_mac,omitempty"` - NewestMacVendor *string `json:"newest_mac_vendor,omitempty"` - NewestMacAge *int64 `json:"newest_mac_age,omitempty"` - Comments *string `json:"comments,omitempty"` - ServicePortsTcp *[]string `json:"service_ports_tcp,omitempty"` - ServicePortsUdp *[]string `json:"service_ports_udp,omitempty"` - ServicePortsProtocols *[]string `json:"service_ports_protocols,omitempty"` - ServicePortsProducts *[]string `json:"service_ports_products,omitempty"` - OrgName *string `json:"org_name,omitempty"` - SiteName *string `json:"site_name,omitempty"` - AgentName *string `json:"agent_name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Services *map[string]map[string]string `json:"services,omitempty"` - Rtts *map[string]map[string]interface{} `json:"rtts,omitempty"` - Credentials *map[string]map[string]bool `json:"credentials,omitempty"` - Attributes *map[string]string `json:"attributes,omitempty"` -} + ServiceId string `json:"service_id"` + ServiceAssetId *string `json:"service_asset_id,omitempty"` + ServiceCreatedAt *int64 `json:"service_created_at,omitempty"` + ServiceUpdatedAt *int64 `json:"service_updated_at,omitempty"` + ServiceAddress NullableString `json:"service_address,omitempty"` + ServiceTransport *string `json:"service_transport,omitempty"` + ServiceVhost *string `json:"service_vhost,omitempty"` + ServicePort *string `json:"service_port,omitempty"` + ServiceData *map[string]string `json:"service_data,omitempty"` + ServiceProtocol *string `json:"service_protocol,omitempty"` + ServiceSummary *string `json:"service_summary,omitempty"` + ServiceScreenshotLink *string `json:"service_screenshot_link,omitempty"` + ServiceLink *string `json:"service_link,omitempty"` + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + Alive *bool `json:"alive,omitempty"` + FirstSeen *int64 `json:"first_seen,omitempty"` + LastSeen *int64 `json:"last_seen,omitempty"` + DetectedBy *string `json:"detected_by,omitempty"` + Type *string `json:"type,omitempty"` + Os *string `json:"os,omitempty"` + OsVersion *string `json:"os_version,omitempty"` + Hw *string `json:"hw,omitempty"` + Addresses []*string `json:"addresses,omitempty"` + AddressesExtra []*string `json:"addresses_extra,omitempty"` + Macs []string `json:"macs,omitempty"` + MacVendors []string `json:"mac_vendors,omitempty"` + Names []string `json:"names,omitempty"` + Domains []string `json:"domains,omitempty"` + ServiceCount *int64 `json:"service_count,omitempty"` + ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` + ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` + ServiceCountArp *int64 `json:"service_count_arp,omitempty"` + ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` + LowestTtl *int64 `json:"lowest_ttl,omitempty"` + LowestRtt *int64 `json:"lowest_rtt,omitempty"` + LastAgentId *string `json:"last_agent_id,omitempty"` + LastTaskId *string `json:"last_task_id,omitempty"` + NewestMac *string `json:"newest_mac,omitempty"` + NewestMacVendor *string `json:"newest_mac_vendor,omitempty"` + NewestMacAge *int64 `json:"newest_mac_age,omitempty"` + Comments *string `json:"comments,omitempty"` + ServicePortsTcp []string `json:"service_ports_tcp,omitempty"` + ServicePortsUdp []string `json:"service_ports_udp,omitempty"` + ServicePortsProtocols []string `json:"service_ports_protocols,omitempty"` + ServicePortsProducts []string `json:"service_ports_products,omitempty"` + OrgName *string `json:"org_name,omitempty"` + SiteName *string `json:"site_name,omitempty"` + AgentName *string `json:"agent_name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Services *map[string]map[string]string `json:"services,omitempty"` + Rtts map[string]interface{} `json:"rtts,omitempty"` + Credentials *map[string]map[string]bool `json:"credentials,omitempty"` + Attributes *map[string]string `json:"attributes,omitempty"` +} + +type _Service Service // NewService instantiates a new Service object // This constructor will assign default values to properties that have it defined, @@ -120,7 +128,7 @@ func (o *Service) SetServiceId(v string) { // GetServiceAssetId returns the ServiceAssetId field value if set, zero value otherwise. func (o *Service) GetServiceAssetId() string { - if o == nil || o.ServiceAssetId == nil { + if o == nil || IsNil(o.ServiceAssetId) { var ret string return ret } @@ -130,7 +138,7 @@ func (o *Service) GetServiceAssetId() string { // GetServiceAssetIdOk returns a tuple with the ServiceAssetId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceAssetIdOk() (*string, bool) { - if o == nil || o.ServiceAssetId == nil { + if o == nil || IsNil(o.ServiceAssetId) { return nil, false } return o.ServiceAssetId, true @@ -138,7 +146,7 @@ func (o *Service) GetServiceAssetIdOk() (*string, bool) { // HasServiceAssetId returns a boolean if a field has been set. func (o *Service) HasServiceAssetId() bool { - if o != nil && o.ServiceAssetId != nil { + if o != nil && !IsNil(o.ServiceAssetId) { return true } @@ -152,7 +160,7 @@ func (o *Service) SetServiceAssetId(v string) { // GetServiceCreatedAt returns the ServiceCreatedAt field value if set, zero value otherwise. func (o *Service) GetServiceCreatedAt() int64 { - if o == nil || o.ServiceCreatedAt == nil { + if o == nil || IsNil(o.ServiceCreatedAt) { var ret int64 return ret } @@ -162,7 +170,7 @@ func (o *Service) GetServiceCreatedAt() int64 { // GetServiceCreatedAtOk returns a tuple with the ServiceCreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCreatedAtOk() (*int64, bool) { - if o == nil || o.ServiceCreatedAt == nil { + if o == nil || IsNil(o.ServiceCreatedAt) { return nil, false } return o.ServiceCreatedAt, true @@ -170,7 +178,7 @@ func (o *Service) GetServiceCreatedAtOk() (*int64, bool) { // HasServiceCreatedAt returns a boolean if a field has been set. func (o *Service) HasServiceCreatedAt() bool { - if o != nil && o.ServiceCreatedAt != nil { + if o != nil && !IsNil(o.ServiceCreatedAt) { return true } @@ -184,7 +192,7 @@ func (o *Service) SetServiceCreatedAt(v int64) { // GetServiceUpdatedAt returns the ServiceUpdatedAt field value if set, zero value otherwise. func (o *Service) GetServiceUpdatedAt() int64 { - if o == nil || o.ServiceUpdatedAt == nil { + if o == nil || IsNil(o.ServiceUpdatedAt) { var ret int64 return ret } @@ -194,7 +202,7 @@ func (o *Service) GetServiceUpdatedAt() int64 { // GetServiceUpdatedAtOk returns a tuple with the ServiceUpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceUpdatedAtOk() (*int64, bool) { - if o == nil || o.ServiceUpdatedAt == nil { + if o == nil || IsNil(o.ServiceUpdatedAt) { return nil, false } return o.ServiceUpdatedAt, true @@ -202,7 +210,7 @@ func (o *Service) GetServiceUpdatedAtOk() (*int64, bool) { // HasServiceUpdatedAt returns a boolean if a field has been set. func (o *Service) HasServiceUpdatedAt() bool { - if o != nil && o.ServiceUpdatedAt != nil { + if o != nil && !IsNil(o.ServiceUpdatedAt) { return true } @@ -214,41 +222,51 @@ func (o *Service) SetServiceUpdatedAt(v int64) { o.ServiceUpdatedAt = &v } -// GetServiceAddress returns the ServiceAddress field value if set, zero value otherwise. +// GetServiceAddress returns the ServiceAddress field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Service) GetServiceAddress() string { - if o == nil || o.ServiceAddress == nil { + if o == nil || IsNil(o.ServiceAddress.Get()) { var ret string return ret } - return *o.ServiceAddress + return *o.ServiceAddress.Get() } // GetServiceAddressOk returns a tuple with the ServiceAddress field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Service) GetServiceAddressOk() (*string, bool) { - if o == nil || o.ServiceAddress == nil { + if o == nil { return nil, false } - return o.ServiceAddress, true + return o.ServiceAddress.Get(), o.ServiceAddress.IsSet() } // HasServiceAddress returns a boolean if a field has been set. func (o *Service) HasServiceAddress() bool { - if o != nil && o.ServiceAddress != nil { + if o != nil && o.ServiceAddress.IsSet() { return true } return false } -// SetServiceAddress gets a reference to the given string and assigns it to the ServiceAddress field. +// SetServiceAddress gets a reference to the given NullableString and assigns it to the ServiceAddress field. func (o *Service) SetServiceAddress(v string) { - o.ServiceAddress = &v + o.ServiceAddress.Set(&v) +} +// SetServiceAddressNil sets the value for ServiceAddress to be an explicit nil +func (o *Service) SetServiceAddressNil() { + o.ServiceAddress.Set(nil) +} + +// UnsetServiceAddress ensures that no value is present for ServiceAddress, not even an explicit nil +func (o *Service) UnsetServiceAddress() { + o.ServiceAddress.Unset() } // GetServiceTransport returns the ServiceTransport field value if set, zero value otherwise. func (o *Service) GetServiceTransport() string { - if o == nil || o.ServiceTransport == nil { + if o == nil || IsNil(o.ServiceTransport) { var ret string return ret } @@ -258,7 +276,7 @@ func (o *Service) GetServiceTransport() string { // GetServiceTransportOk returns a tuple with the ServiceTransport field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceTransportOk() (*string, bool) { - if o == nil || o.ServiceTransport == nil { + if o == nil || IsNil(o.ServiceTransport) { return nil, false } return o.ServiceTransport, true @@ -266,7 +284,7 @@ func (o *Service) GetServiceTransportOk() (*string, bool) { // HasServiceTransport returns a boolean if a field has been set. func (o *Service) HasServiceTransport() bool { - if o != nil && o.ServiceTransport != nil { + if o != nil && !IsNil(o.ServiceTransport) { return true } @@ -280,7 +298,7 @@ func (o *Service) SetServiceTransport(v string) { // GetServiceVhost returns the ServiceVhost field value if set, zero value otherwise. func (o *Service) GetServiceVhost() string { - if o == nil || o.ServiceVhost == nil { + if o == nil || IsNil(o.ServiceVhost) { var ret string return ret } @@ -290,7 +308,7 @@ func (o *Service) GetServiceVhost() string { // GetServiceVhostOk returns a tuple with the ServiceVhost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceVhostOk() (*string, bool) { - if o == nil || o.ServiceVhost == nil { + if o == nil || IsNil(o.ServiceVhost) { return nil, false } return o.ServiceVhost, true @@ -298,7 +316,7 @@ func (o *Service) GetServiceVhostOk() (*string, bool) { // HasServiceVhost returns a boolean if a field has been set. func (o *Service) HasServiceVhost() bool { - if o != nil && o.ServiceVhost != nil { + if o != nil && !IsNil(o.ServiceVhost) { return true } @@ -312,7 +330,7 @@ func (o *Service) SetServiceVhost(v string) { // GetServicePort returns the ServicePort field value if set, zero value otherwise. func (o *Service) GetServicePort() string { - if o == nil || o.ServicePort == nil { + if o == nil || IsNil(o.ServicePort) { var ret string return ret } @@ -322,7 +340,7 @@ func (o *Service) GetServicePort() string { // GetServicePortOk returns a tuple with the ServicePort field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServicePortOk() (*string, bool) { - if o == nil || o.ServicePort == nil { + if o == nil || IsNil(o.ServicePort) { return nil, false } return o.ServicePort, true @@ -330,7 +348,7 @@ func (o *Service) GetServicePortOk() (*string, bool) { // HasServicePort returns a boolean if a field has been set. func (o *Service) HasServicePort() bool { - if o != nil && o.ServicePort != nil { + if o != nil && !IsNil(o.ServicePort) { return true } @@ -344,7 +362,7 @@ func (o *Service) SetServicePort(v string) { // GetServiceData returns the ServiceData field value if set, zero value otherwise. func (o *Service) GetServiceData() map[string]string { - if o == nil || o.ServiceData == nil { + if o == nil || IsNil(o.ServiceData) { var ret map[string]string return ret } @@ -354,7 +372,7 @@ func (o *Service) GetServiceData() map[string]string { // GetServiceDataOk returns a tuple with the ServiceData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceDataOk() (*map[string]string, bool) { - if o == nil || o.ServiceData == nil { + if o == nil || IsNil(o.ServiceData) { return nil, false } return o.ServiceData, true @@ -362,7 +380,7 @@ func (o *Service) GetServiceDataOk() (*map[string]string, bool) { // HasServiceData returns a boolean if a field has been set. func (o *Service) HasServiceData() bool { - if o != nil && o.ServiceData != nil { + if o != nil && !IsNil(o.ServiceData) { return true } @@ -376,7 +394,7 @@ func (o *Service) SetServiceData(v map[string]string) { // GetServiceProtocol returns the ServiceProtocol field value if set, zero value otherwise. func (o *Service) GetServiceProtocol() string { - if o == nil || o.ServiceProtocol == nil { + if o == nil || IsNil(o.ServiceProtocol) { var ret string return ret } @@ -386,7 +404,7 @@ func (o *Service) GetServiceProtocol() string { // GetServiceProtocolOk returns a tuple with the ServiceProtocol field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceProtocolOk() (*string, bool) { - if o == nil || o.ServiceProtocol == nil { + if o == nil || IsNil(o.ServiceProtocol) { return nil, false } return o.ServiceProtocol, true @@ -394,7 +412,7 @@ func (o *Service) GetServiceProtocolOk() (*string, bool) { // HasServiceProtocol returns a boolean if a field has been set. func (o *Service) HasServiceProtocol() bool { - if o != nil && o.ServiceProtocol != nil { + if o != nil && !IsNil(o.ServiceProtocol) { return true } @@ -408,7 +426,7 @@ func (o *Service) SetServiceProtocol(v string) { // GetServiceSummary returns the ServiceSummary field value if set, zero value otherwise. func (o *Service) GetServiceSummary() string { - if o == nil || o.ServiceSummary == nil { + if o == nil || IsNil(o.ServiceSummary) { var ret string return ret } @@ -418,7 +436,7 @@ func (o *Service) GetServiceSummary() string { // GetServiceSummaryOk returns a tuple with the ServiceSummary field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceSummaryOk() (*string, bool) { - if o == nil || o.ServiceSummary == nil { + if o == nil || IsNil(o.ServiceSummary) { return nil, false } return o.ServiceSummary, true @@ -426,7 +444,7 @@ func (o *Service) GetServiceSummaryOk() (*string, bool) { // HasServiceSummary returns a boolean if a field has been set. func (o *Service) HasServiceSummary() bool { - if o != nil && o.ServiceSummary != nil { + if o != nil && !IsNil(o.ServiceSummary) { return true } @@ -440,7 +458,7 @@ func (o *Service) SetServiceSummary(v string) { // GetServiceScreenshotLink returns the ServiceScreenshotLink field value if set, zero value otherwise. func (o *Service) GetServiceScreenshotLink() string { - if o == nil || o.ServiceScreenshotLink == nil { + if o == nil || IsNil(o.ServiceScreenshotLink) { var ret string return ret } @@ -450,7 +468,7 @@ func (o *Service) GetServiceScreenshotLink() string { // GetServiceScreenshotLinkOk returns a tuple with the ServiceScreenshotLink field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceScreenshotLinkOk() (*string, bool) { - if o == nil || o.ServiceScreenshotLink == nil { + if o == nil || IsNil(o.ServiceScreenshotLink) { return nil, false } return o.ServiceScreenshotLink, true @@ -458,7 +476,7 @@ func (o *Service) GetServiceScreenshotLinkOk() (*string, bool) { // HasServiceScreenshotLink returns a boolean if a field has been set. func (o *Service) HasServiceScreenshotLink() bool { - if o != nil && o.ServiceScreenshotLink != nil { + if o != nil && !IsNil(o.ServiceScreenshotLink) { return true } @@ -472,7 +490,7 @@ func (o *Service) SetServiceScreenshotLink(v string) { // GetServiceLink returns the ServiceLink field value if set, zero value otherwise. func (o *Service) GetServiceLink() string { - if o == nil || o.ServiceLink == nil { + if o == nil || IsNil(o.ServiceLink) { var ret string return ret } @@ -482,7 +500,7 @@ func (o *Service) GetServiceLink() string { // GetServiceLinkOk returns a tuple with the ServiceLink field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceLinkOk() (*string, bool) { - if o == nil || o.ServiceLink == nil { + if o == nil || IsNil(o.ServiceLink) { return nil, false } return o.ServiceLink, true @@ -490,7 +508,7 @@ func (o *Service) GetServiceLinkOk() (*string, bool) { // HasServiceLink returns a boolean if a field has been set. func (o *Service) HasServiceLink() bool { - if o != nil && o.ServiceLink != nil { + if o != nil && !IsNil(o.ServiceLink) { return true } @@ -528,7 +546,7 @@ func (o *Service) SetId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Service) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -538,7 +556,7 @@ func (o *Service) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -546,7 +564,7 @@ func (o *Service) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Service) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -560,7 +578,7 @@ func (o *Service) SetCreatedAt(v int64) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Service) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -570,7 +588,7 @@ func (o *Service) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -578,7 +596,7 @@ func (o *Service) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Service) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -592,7 +610,7 @@ func (o *Service) SetUpdatedAt(v int64) { // GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. func (o *Service) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { var ret string return ret } @@ -602,7 +620,7 @@ func (o *Service) GetOrganizationId() string { // GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { return nil, false } return o.OrganizationId, true @@ -610,7 +628,7 @@ func (o *Service) GetOrganizationIdOk() (*string, bool) { // HasOrganizationId returns a boolean if a field has been set. func (o *Service) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { + if o != nil && !IsNil(o.OrganizationId) { return true } @@ -624,7 +642,7 @@ func (o *Service) SetOrganizationId(v string) { // GetSiteId returns the SiteId field value if set, zero value otherwise. func (o *Service) GetSiteId() string { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { var ret string return ret } @@ -634,7 +652,7 @@ func (o *Service) GetSiteId() string { // GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetSiteIdOk() (*string, bool) { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { return nil, false } return o.SiteId, true @@ -642,7 +660,7 @@ func (o *Service) GetSiteIdOk() (*string, bool) { // HasSiteId returns a boolean if a field has been set. func (o *Service) HasSiteId() bool { - if o != nil && o.SiteId != nil { + if o != nil && !IsNil(o.SiteId) { return true } @@ -656,7 +674,7 @@ func (o *Service) SetSiteId(v string) { // GetAlive returns the Alive field value if set, zero value otherwise. func (o *Service) GetAlive() bool { - if o == nil || o.Alive == nil { + if o == nil || IsNil(o.Alive) { var ret bool return ret } @@ -666,7 +684,7 @@ func (o *Service) GetAlive() bool { // GetAliveOk returns a tuple with the Alive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetAliveOk() (*bool, bool) { - if o == nil || o.Alive == nil { + if o == nil || IsNil(o.Alive) { return nil, false } return o.Alive, true @@ -674,7 +692,7 @@ func (o *Service) GetAliveOk() (*bool, bool) { // HasAlive returns a boolean if a field has been set. func (o *Service) HasAlive() bool { - if o != nil && o.Alive != nil { + if o != nil && !IsNil(o.Alive) { return true } @@ -688,7 +706,7 @@ func (o *Service) SetAlive(v bool) { // GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. func (o *Service) GetFirstSeen() int64 { - if o == nil || o.FirstSeen == nil { + if o == nil || IsNil(o.FirstSeen) { var ret int64 return ret } @@ -698,7 +716,7 @@ func (o *Service) GetFirstSeen() int64 { // GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetFirstSeenOk() (*int64, bool) { - if o == nil || o.FirstSeen == nil { + if o == nil || IsNil(o.FirstSeen) { return nil, false } return o.FirstSeen, true @@ -706,7 +724,7 @@ func (o *Service) GetFirstSeenOk() (*int64, bool) { // HasFirstSeen returns a boolean if a field has been set. func (o *Service) HasFirstSeen() bool { - if o != nil && o.FirstSeen != nil { + if o != nil && !IsNil(o.FirstSeen) { return true } @@ -720,7 +738,7 @@ func (o *Service) SetFirstSeen(v int64) { // GetLastSeen returns the LastSeen field value if set, zero value otherwise. func (o *Service) GetLastSeen() int64 { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { var ret int64 return ret } @@ -730,7 +748,7 @@ func (o *Service) GetLastSeen() int64 { // GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetLastSeenOk() (*int64, bool) { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { return nil, false } return o.LastSeen, true @@ -738,7 +756,7 @@ func (o *Service) GetLastSeenOk() (*int64, bool) { // HasLastSeen returns a boolean if a field has been set. func (o *Service) HasLastSeen() bool { - if o != nil && o.LastSeen != nil { + if o != nil && !IsNil(o.LastSeen) { return true } @@ -752,7 +770,7 @@ func (o *Service) SetLastSeen(v int64) { // GetDetectedBy returns the DetectedBy field value if set, zero value otherwise. func (o *Service) GetDetectedBy() string { - if o == nil || o.DetectedBy == nil { + if o == nil || IsNil(o.DetectedBy) { var ret string return ret } @@ -762,7 +780,7 @@ func (o *Service) GetDetectedBy() string { // GetDetectedByOk returns a tuple with the DetectedBy field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetDetectedByOk() (*string, bool) { - if o == nil || o.DetectedBy == nil { + if o == nil || IsNil(o.DetectedBy) { return nil, false } return o.DetectedBy, true @@ -770,7 +788,7 @@ func (o *Service) GetDetectedByOk() (*string, bool) { // HasDetectedBy returns a boolean if a field has been set. func (o *Service) HasDetectedBy() bool { - if o != nil && o.DetectedBy != nil { + if o != nil && !IsNil(o.DetectedBy) { return true } @@ -784,7 +802,7 @@ func (o *Service) SetDetectedBy(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *Service) GetType() string { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret string return ret } @@ -794,7 +812,7 @@ func (o *Service) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -802,7 +820,7 @@ func (o *Service) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *Service) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -816,7 +834,7 @@ func (o *Service) SetType(v string) { // GetOs returns the Os field value if set, zero value otherwise. func (o *Service) GetOs() string { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { var ret string return ret } @@ -826,7 +844,7 @@ func (o *Service) GetOs() string { // GetOsOk returns a tuple with the Os field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetOsOk() (*string, bool) { - if o == nil || o.Os == nil { + if o == nil || IsNil(o.Os) { return nil, false } return o.Os, true @@ -834,7 +852,7 @@ func (o *Service) GetOsOk() (*string, bool) { // HasOs returns a boolean if a field has been set. func (o *Service) HasOs() bool { - if o != nil && o.Os != nil { + if o != nil && !IsNil(o.Os) { return true } @@ -848,7 +866,7 @@ func (o *Service) SetOs(v string) { // GetOsVersion returns the OsVersion field value if set, zero value otherwise. func (o *Service) GetOsVersion() string { - if o == nil || o.OsVersion == nil { + if o == nil || IsNil(o.OsVersion) { var ret string return ret } @@ -858,7 +876,7 @@ func (o *Service) GetOsVersion() string { // GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetOsVersionOk() (*string, bool) { - if o == nil || o.OsVersion == nil { + if o == nil || IsNil(o.OsVersion) { return nil, false } return o.OsVersion, true @@ -866,7 +884,7 @@ func (o *Service) GetOsVersionOk() (*string, bool) { // HasOsVersion returns a boolean if a field has been set. func (o *Service) HasOsVersion() bool { - if o != nil && o.OsVersion != nil { + if o != nil && !IsNil(o.OsVersion) { return true } @@ -880,7 +898,7 @@ func (o *Service) SetOsVersion(v string) { // GetHw returns the Hw field value if set, zero value otherwise. func (o *Service) GetHw() string { - if o == nil || o.Hw == nil { + if o == nil || IsNil(o.Hw) { var ret string return ret } @@ -890,7 +908,7 @@ func (o *Service) GetHw() string { // GetHwOk returns a tuple with the Hw field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetHwOk() (*string, bool) { - if o == nil || o.Hw == nil { + if o == nil || IsNil(o.Hw) { return nil, false } return o.Hw, true @@ -898,7 +916,7 @@ func (o *Service) GetHwOk() (*string, bool) { // HasHw returns a boolean if a field has been set. func (o *Service) HasHw() bool { - if o != nil && o.Hw != nil { + if o != nil && !IsNil(o.Hw) { return true } @@ -911,18 +929,18 @@ func (o *Service) SetHw(v string) { } // GetAddresses returns the Addresses field value if set, zero value otherwise. -func (o *Service) GetAddresses() []string { - if o == nil || o.Addresses == nil { - var ret []string +func (o *Service) GetAddresses() []*string { + if o == nil || IsNil(o.Addresses) { + var ret []*string return ret } - return *o.Addresses + return o.Addresses } // GetAddressesOk returns a tuple with the Addresses field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetAddressesOk() (*[]string, bool) { - if o == nil || o.Addresses == nil { +func (o *Service) GetAddressesOk() ([]*string, bool) { + if o == nil || IsNil(o.Addresses) { return nil, false } return o.Addresses, true @@ -930,31 +948,31 @@ func (o *Service) GetAddressesOk() (*[]string, bool) { // HasAddresses returns a boolean if a field has been set. func (o *Service) HasAddresses() bool { - if o != nil && o.Addresses != nil { + if o != nil && !IsNil(o.Addresses) { return true } return false } -// SetAddresses gets a reference to the given []string and assigns it to the Addresses field. -func (o *Service) SetAddresses(v []string) { - o.Addresses = &v +// SetAddresses gets a reference to the given []*string and assigns it to the Addresses field. +func (o *Service) SetAddresses(v []*string) { + o.Addresses = v } // GetAddressesExtra returns the AddressesExtra field value if set, zero value otherwise. -func (o *Service) GetAddressesExtra() []string { - if o == nil || o.AddressesExtra == nil { - var ret []string +func (o *Service) GetAddressesExtra() []*string { + if o == nil || IsNil(o.AddressesExtra) { + var ret []*string return ret } - return *o.AddressesExtra + return o.AddressesExtra } // GetAddressesExtraOk returns a tuple with the AddressesExtra field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetAddressesExtraOk() (*[]string, bool) { - if o == nil || o.AddressesExtra == nil { +func (o *Service) GetAddressesExtraOk() ([]*string, bool) { + if o == nil || IsNil(o.AddressesExtra) { return nil, false } return o.AddressesExtra, true @@ -962,31 +980,31 @@ func (o *Service) GetAddressesExtraOk() (*[]string, bool) { // HasAddressesExtra returns a boolean if a field has been set. func (o *Service) HasAddressesExtra() bool { - if o != nil && o.AddressesExtra != nil { + if o != nil && !IsNil(o.AddressesExtra) { return true } return false } -// SetAddressesExtra gets a reference to the given []string and assigns it to the AddressesExtra field. -func (o *Service) SetAddressesExtra(v []string) { - o.AddressesExtra = &v +// SetAddressesExtra gets a reference to the given []*string and assigns it to the AddressesExtra field. +func (o *Service) SetAddressesExtra(v []*string) { + o.AddressesExtra = v } // GetMacs returns the Macs field value if set, zero value otherwise. func (o *Service) GetMacs() []string { - if o == nil || o.Macs == nil { + if o == nil || IsNil(o.Macs) { var ret []string return ret } - return *o.Macs + return o.Macs } // GetMacsOk returns a tuple with the Macs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetMacsOk() (*[]string, bool) { - if o == nil || o.Macs == nil { +func (o *Service) GetMacsOk() ([]string, bool) { + if o == nil || IsNil(o.Macs) { return nil, false } return o.Macs, true @@ -994,7 +1012,7 @@ func (o *Service) GetMacsOk() (*[]string, bool) { // HasMacs returns a boolean if a field has been set. func (o *Service) HasMacs() bool { - if o != nil && o.Macs != nil { + if o != nil && !IsNil(o.Macs) { return true } @@ -1003,22 +1021,22 @@ func (o *Service) HasMacs() bool { // SetMacs gets a reference to the given []string and assigns it to the Macs field. func (o *Service) SetMacs(v []string) { - o.Macs = &v + o.Macs = v } // GetMacVendors returns the MacVendors field value if set, zero value otherwise. func (o *Service) GetMacVendors() []string { - if o == nil || o.MacVendors == nil { + if o == nil || IsNil(o.MacVendors) { var ret []string return ret } - return *o.MacVendors + return o.MacVendors } // GetMacVendorsOk returns a tuple with the MacVendors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetMacVendorsOk() (*[]string, bool) { - if o == nil || o.MacVendors == nil { +func (o *Service) GetMacVendorsOk() ([]string, bool) { + if o == nil || IsNil(o.MacVendors) { return nil, false } return o.MacVendors, true @@ -1026,7 +1044,7 @@ func (o *Service) GetMacVendorsOk() (*[]string, bool) { // HasMacVendors returns a boolean if a field has been set. func (o *Service) HasMacVendors() bool { - if o != nil && o.MacVendors != nil { + if o != nil && !IsNil(o.MacVendors) { return true } @@ -1035,22 +1053,22 @@ func (o *Service) HasMacVendors() bool { // SetMacVendors gets a reference to the given []string and assigns it to the MacVendors field. func (o *Service) SetMacVendors(v []string) { - o.MacVendors = &v + o.MacVendors = v } // GetNames returns the Names field value if set, zero value otherwise. func (o *Service) GetNames() []string { - if o == nil || o.Names == nil { + if o == nil || IsNil(o.Names) { var ret []string return ret } - return *o.Names + return o.Names } // GetNamesOk returns a tuple with the Names field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetNamesOk() (*[]string, bool) { - if o == nil || o.Names == nil { +func (o *Service) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { return nil, false } return o.Names, true @@ -1058,7 +1076,7 @@ func (o *Service) GetNamesOk() (*[]string, bool) { // HasNames returns a boolean if a field has been set. func (o *Service) HasNames() bool { - if o != nil && o.Names != nil { + if o != nil && !IsNil(o.Names) { return true } @@ -1067,22 +1085,22 @@ func (o *Service) HasNames() bool { // SetNames gets a reference to the given []string and assigns it to the Names field. func (o *Service) SetNames(v []string) { - o.Names = &v + o.Names = v } // GetDomains returns the Domains field value if set, zero value otherwise. func (o *Service) GetDomains() []string { - if o == nil || o.Domains == nil { + if o == nil || IsNil(o.Domains) { var ret []string return ret } - return *o.Domains + return o.Domains } // GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetDomainsOk() (*[]string, bool) { - if o == nil || o.Domains == nil { +func (o *Service) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { return nil, false } return o.Domains, true @@ -1090,7 +1108,7 @@ func (o *Service) GetDomainsOk() (*[]string, bool) { // HasDomains returns a boolean if a field has been set. func (o *Service) HasDomains() bool { - if o != nil && o.Domains != nil { + if o != nil && !IsNil(o.Domains) { return true } @@ -1099,12 +1117,12 @@ func (o *Service) HasDomains() bool { // SetDomains gets a reference to the given []string and assigns it to the Domains field. func (o *Service) SetDomains(v []string) { - o.Domains = &v + o.Domains = v } // GetServiceCount returns the ServiceCount field value if set, zero value otherwise. func (o *Service) GetServiceCount() int64 { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { var ret int64 return ret } @@ -1114,7 +1132,7 @@ func (o *Service) GetServiceCount() int64 { // GetServiceCountOk returns a tuple with the ServiceCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCountOk() (*int64, bool) { - if o == nil || o.ServiceCount == nil { + if o == nil || IsNil(o.ServiceCount) { return nil, false } return o.ServiceCount, true @@ -1122,7 +1140,7 @@ func (o *Service) GetServiceCountOk() (*int64, bool) { // HasServiceCount returns a boolean if a field has been set. func (o *Service) HasServiceCount() bool { - if o != nil && o.ServiceCount != nil { + if o != nil && !IsNil(o.ServiceCount) { return true } @@ -1136,7 +1154,7 @@ func (o *Service) SetServiceCount(v int64) { // GetServiceCountTcp returns the ServiceCountTcp field value if set, zero value otherwise. func (o *Service) GetServiceCountTcp() int64 { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { var ret int64 return ret } @@ -1146,7 +1164,7 @@ func (o *Service) GetServiceCountTcp() int64 { // GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCountTcpOk() (*int64, bool) { - if o == nil || o.ServiceCountTcp == nil { + if o == nil || IsNil(o.ServiceCountTcp) { return nil, false } return o.ServiceCountTcp, true @@ -1154,7 +1172,7 @@ func (o *Service) GetServiceCountTcpOk() (*int64, bool) { // HasServiceCountTcp returns a boolean if a field has been set. func (o *Service) HasServiceCountTcp() bool { - if o != nil && o.ServiceCountTcp != nil { + if o != nil && !IsNil(o.ServiceCountTcp) { return true } @@ -1168,7 +1186,7 @@ func (o *Service) SetServiceCountTcp(v int64) { // GetServiceCountUdp returns the ServiceCountUdp field value if set, zero value otherwise. func (o *Service) GetServiceCountUdp() int64 { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { var ret int64 return ret } @@ -1178,7 +1196,7 @@ func (o *Service) GetServiceCountUdp() int64 { // GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCountUdpOk() (*int64, bool) { - if o == nil || o.ServiceCountUdp == nil { + if o == nil || IsNil(o.ServiceCountUdp) { return nil, false } return o.ServiceCountUdp, true @@ -1186,7 +1204,7 @@ func (o *Service) GetServiceCountUdpOk() (*int64, bool) { // HasServiceCountUdp returns a boolean if a field has been set. func (o *Service) HasServiceCountUdp() bool { - if o != nil && o.ServiceCountUdp != nil { + if o != nil && !IsNil(o.ServiceCountUdp) { return true } @@ -1200,7 +1218,7 @@ func (o *Service) SetServiceCountUdp(v int64) { // GetServiceCountArp returns the ServiceCountArp field value if set, zero value otherwise. func (o *Service) GetServiceCountArp() int64 { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { var ret int64 return ret } @@ -1210,7 +1228,7 @@ func (o *Service) GetServiceCountArp() int64 { // GetServiceCountArpOk returns a tuple with the ServiceCountArp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCountArpOk() (*int64, bool) { - if o == nil || o.ServiceCountArp == nil { + if o == nil || IsNil(o.ServiceCountArp) { return nil, false } return o.ServiceCountArp, true @@ -1218,7 +1236,7 @@ func (o *Service) GetServiceCountArpOk() (*int64, bool) { // HasServiceCountArp returns a boolean if a field has been set. func (o *Service) HasServiceCountArp() bool { - if o != nil && o.ServiceCountArp != nil { + if o != nil && !IsNil(o.ServiceCountArp) { return true } @@ -1232,7 +1250,7 @@ func (o *Service) SetServiceCountArp(v int64) { // GetServiceCountIcmp returns the ServiceCountIcmp field value if set, zero value otherwise. func (o *Service) GetServiceCountIcmp() int64 { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { var ret int64 return ret } @@ -1242,7 +1260,7 @@ func (o *Service) GetServiceCountIcmp() int64 { // GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServiceCountIcmpOk() (*int64, bool) { - if o == nil || o.ServiceCountIcmp == nil { + if o == nil || IsNil(o.ServiceCountIcmp) { return nil, false } return o.ServiceCountIcmp, true @@ -1250,7 +1268,7 @@ func (o *Service) GetServiceCountIcmpOk() (*int64, bool) { // HasServiceCountIcmp returns a boolean if a field has been set. func (o *Service) HasServiceCountIcmp() bool { - if o != nil && o.ServiceCountIcmp != nil { + if o != nil && !IsNil(o.ServiceCountIcmp) { return true } @@ -1264,7 +1282,7 @@ func (o *Service) SetServiceCountIcmp(v int64) { // GetLowestTtl returns the LowestTtl field value if set, zero value otherwise. func (o *Service) GetLowestTtl() int64 { - if o == nil || o.LowestTtl == nil { + if o == nil || IsNil(o.LowestTtl) { var ret int64 return ret } @@ -1274,7 +1292,7 @@ func (o *Service) GetLowestTtl() int64 { // GetLowestTtlOk returns a tuple with the LowestTtl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetLowestTtlOk() (*int64, bool) { - if o == nil || o.LowestTtl == nil { + if o == nil || IsNil(o.LowestTtl) { return nil, false } return o.LowestTtl, true @@ -1282,7 +1300,7 @@ func (o *Service) GetLowestTtlOk() (*int64, bool) { // HasLowestTtl returns a boolean if a field has been set. func (o *Service) HasLowestTtl() bool { - if o != nil && o.LowestTtl != nil { + if o != nil && !IsNil(o.LowestTtl) { return true } @@ -1296,7 +1314,7 @@ func (o *Service) SetLowestTtl(v int64) { // GetLowestRtt returns the LowestRtt field value if set, zero value otherwise. func (o *Service) GetLowestRtt() int64 { - if o == nil || o.LowestRtt == nil { + if o == nil || IsNil(o.LowestRtt) { var ret int64 return ret } @@ -1306,7 +1324,7 @@ func (o *Service) GetLowestRtt() int64 { // GetLowestRttOk returns a tuple with the LowestRtt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetLowestRttOk() (*int64, bool) { - if o == nil || o.LowestRtt == nil { + if o == nil || IsNil(o.LowestRtt) { return nil, false } return o.LowestRtt, true @@ -1314,7 +1332,7 @@ func (o *Service) GetLowestRttOk() (*int64, bool) { // HasLowestRtt returns a boolean if a field has been set. func (o *Service) HasLowestRtt() bool { - if o != nil && o.LowestRtt != nil { + if o != nil && !IsNil(o.LowestRtt) { return true } @@ -1328,7 +1346,7 @@ func (o *Service) SetLowestRtt(v int64) { // GetLastAgentId returns the LastAgentId field value if set, zero value otherwise. func (o *Service) GetLastAgentId() string { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { var ret string return ret } @@ -1338,7 +1356,7 @@ func (o *Service) GetLastAgentId() string { // GetLastAgentIdOk returns a tuple with the LastAgentId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetLastAgentIdOk() (*string, bool) { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { return nil, false } return o.LastAgentId, true @@ -1346,7 +1364,7 @@ func (o *Service) GetLastAgentIdOk() (*string, bool) { // HasLastAgentId returns a boolean if a field has been set. func (o *Service) HasLastAgentId() bool { - if o != nil && o.LastAgentId != nil { + if o != nil && !IsNil(o.LastAgentId) { return true } @@ -1360,7 +1378,7 @@ func (o *Service) SetLastAgentId(v string) { // GetLastTaskId returns the LastTaskId field value if set, zero value otherwise. func (o *Service) GetLastTaskId() string { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { var ret string return ret } @@ -1370,7 +1388,7 @@ func (o *Service) GetLastTaskId() string { // GetLastTaskIdOk returns a tuple with the LastTaskId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetLastTaskIdOk() (*string, bool) { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { return nil, false } return o.LastTaskId, true @@ -1378,7 +1396,7 @@ func (o *Service) GetLastTaskIdOk() (*string, bool) { // HasLastTaskId returns a boolean if a field has been set. func (o *Service) HasLastTaskId() bool { - if o != nil && o.LastTaskId != nil { + if o != nil && !IsNil(o.LastTaskId) { return true } @@ -1392,7 +1410,7 @@ func (o *Service) SetLastTaskId(v string) { // GetNewestMac returns the NewestMac field value if set, zero value otherwise. func (o *Service) GetNewestMac() string { - if o == nil || o.NewestMac == nil { + if o == nil || IsNil(o.NewestMac) { var ret string return ret } @@ -1402,7 +1420,7 @@ func (o *Service) GetNewestMac() string { // GetNewestMacOk returns a tuple with the NewestMac field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetNewestMacOk() (*string, bool) { - if o == nil || o.NewestMac == nil { + if o == nil || IsNil(o.NewestMac) { return nil, false } return o.NewestMac, true @@ -1410,7 +1428,7 @@ func (o *Service) GetNewestMacOk() (*string, bool) { // HasNewestMac returns a boolean if a field has been set. func (o *Service) HasNewestMac() bool { - if o != nil && o.NewestMac != nil { + if o != nil && !IsNil(o.NewestMac) { return true } @@ -1424,7 +1442,7 @@ func (o *Service) SetNewestMac(v string) { // GetNewestMacVendor returns the NewestMacVendor field value if set, zero value otherwise. func (o *Service) GetNewestMacVendor() string { - if o == nil || o.NewestMacVendor == nil { + if o == nil || IsNil(o.NewestMacVendor) { var ret string return ret } @@ -1434,7 +1452,7 @@ func (o *Service) GetNewestMacVendor() string { // GetNewestMacVendorOk returns a tuple with the NewestMacVendor field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetNewestMacVendorOk() (*string, bool) { - if o == nil || o.NewestMacVendor == nil { + if o == nil || IsNil(o.NewestMacVendor) { return nil, false } return o.NewestMacVendor, true @@ -1442,7 +1460,7 @@ func (o *Service) GetNewestMacVendorOk() (*string, bool) { // HasNewestMacVendor returns a boolean if a field has been set. func (o *Service) HasNewestMacVendor() bool { - if o != nil && o.NewestMacVendor != nil { + if o != nil && !IsNil(o.NewestMacVendor) { return true } @@ -1456,7 +1474,7 @@ func (o *Service) SetNewestMacVendor(v string) { // GetNewestMacAge returns the NewestMacAge field value if set, zero value otherwise. func (o *Service) GetNewestMacAge() int64 { - if o == nil || o.NewestMacAge == nil { + if o == nil || IsNil(o.NewestMacAge) { var ret int64 return ret } @@ -1466,7 +1484,7 @@ func (o *Service) GetNewestMacAge() int64 { // GetNewestMacAgeOk returns a tuple with the NewestMacAge field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetNewestMacAgeOk() (*int64, bool) { - if o == nil || o.NewestMacAge == nil { + if o == nil || IsNil(o.NewestMacAge) { return nil, false } return o.NewestMacAge, true @@ -1474,7 +1492,7 @@ func (o *Service) GetNewestMacAgeOk() (*int64, bool) { // HasNewestMacAge returns a boolean if a field has been set. func (o *Service) HasNewestMacAge() bool { - if o != nil && o.NewestMacAge != nil { + if o != nil && !IsNil(o.NewestMacAge) { return true } @@ -1488,7 +1506,7 @@ func (o *Service) SetNewestMacAge(v int64) { // GetComments returns the Comments field value if set, zero value otherwise. func (o *Service) GetComments() string { - if o == nil || o.Comments == nil { + if o == nil || IsNil(o.Comments) { var ret string return ret } @@ -1498,7 +1516,7 @@ func (o *Service) GetComments() string { // GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetCommentsOk() (*string, bool) { - if o == nil || o.Comments == nil { + if o == nil || IsNil(o.Comments) { return nil, false } return o.Comments, true @@ -1506,7 +1524,7 @@ func (o *Service) GetCommentsOk() (*string, bool) { // HasComments returns a boolean if a field has been set. func (o *Service) HasComments() bool { - if o != nil && o.Comments != nil { + if o != nil && !IsNil(o.Comments) { return true } @@ -1520,17 +1538,17 @@ func (o *Service) SetComments(v string) { // GetServicePortsTcp returns the ServicePortsTcp field value if set, zero value otherwise. func (o *Service) GetServicePortsTcp() []string { - if o == nil || o.ServicePortsTcp == nil { + if o == nil || IsNil(o.ServicePortsTcp) { var ret []string return ret } - return *o.ServicePortsTcp + return o.ServicePortsTcp } // GetServicePortsTcpOk returns a tuple with the ServicePortsTcp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetServicePortsTcpOk() (*[]string, bool) { - if o == nil || o.ServicePortsTcp == nil { +func (o *Service) GetServicePortsTcpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsTcp) { return nil, false } return o.ServicePortsTcp, true @@ -1538,7 +1556,7 @@ func (o *Service) GetServicePortsTcpOk() (*[]string, bool) { // HasServicePortsTcp returns a boolean if a field has been set. func (o *Service) HasServicePortsTcp() bool { - if o != nil && o.ServicePortsTcp != nil { + if o != nil && !IsNil(o.ServicePortsTcp) { return true } @@ -1547,22 +1565,22 @@ func (o *Service) HasServicePortsTcp() bool { // SetServicePortsTcp gets a reference to the given []string and assigns it to the ServicePortsTcp field. func (o *Service) SetServicePortsTcp(v []string) { - o.ServicePortsTcp = &v + o.ServicePortsTcp = v } // GetServicePortsUdp returns the ServicePortsUdp field value if set, zero value otherwise. func (o *Service) GetServicePortsUdp() []string { - if o == nil || o.ServicePortsUdp == nil { + if o == nil || IsNil(o.ServicePortsUdp) { var ret []string return ret } - return *o.ServicePortsUdp + return o.ServicePortsUdp } // GetServicePortsUdpOk returns a tuple with the ServicePortsUdp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetServicePortsUdpOk() (*[]string, bool) { - if o == nil || o.ServicePortsUdp == nil { +func (o *Service) GetServicePortsUdpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsUdp) { return nil, false } return o.ServicePortsUdp, true @@ -1570,7 +1588,7 @@ func (o *Service) GetServicePortsUdpOk() (*[]string, bool) { // HasServicePortsUdp returns a boolean if a field has been set. func (o *Service) HasServicePortsUdp() bool { - if o != nil && o.ServicePortsUdp != nil { + if o != nil && !IsNil(o.ServicePortsUdp) { return true } @@ -1579,22 +1597,22 @@ func (o *Service) HasServicePortsUdp() bool { // SetServicePortsUdp gets a reference to the given []string and assigns it to the ServicePortsUdp field. func (o *Service) SetServicePortsUdp(v []string) { - o.ServicePortsUdp = &v + o.ServicePortsUdp = v } // GetServicePortsProtocols returns the ServicePortsProtocols field value if set, zero value otherwise. func (o *Service) GetServicePortsProtocols() []string { - if o == nil || o.ServicePortsProtocols == nil { + if o == nil || IsNil(o.ServicePortsProtocols) { var ret []string return ret } - return *o.ServicePortsProtocols + return o.ServicePortsProtocols } // GetServicePortsProtocolsOk returns a tuple with the ServicePortsProtocols field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetServicePortsProtocolsOk() (*[]string, bool) { - if o == nil || o.ServicePortsProtocols == nil { +func (o *Service) GetServicePortsProtocolsOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsProtocols) { return nil, false } return o.ServicePortsProtocols, true @@ -1602,7 +1620,7 @@ func (o *Service) GetServicePortsProtocolsOk() (*[]string, bool) { // HasServicePortsProtocols returns a boolean if a field has been set. func (o *Service) HasServicePortsProtocols() bool { - if o != nil && o.ServicePortsProtocols != nil { + if o != nil && !IsNil(o.ServicePortsProtocols) { return true } @@ -1611,22 +1629,22 @@ func (o *Service) HasServicePortsProtocols() bool { // SetServicePortsProtocols gets a reference to the given []string and assigns it to the ServicePortsProtocols field. func (o *Service) SetServicePortsProtocols(v []string) { - o.ServicePortsProtocols = &v + o.ServicePortsProtocols = v } // GetServicePortsProducts returns the ServicePortsProducts field value if set, zero value otherwise. func (o *Service) GetServicePortsProducts() []string { - if o == nil || o.ServicePortsProducts == nil { + if o == nil || IsNil(o.ServicePortsProducts) { var ret []string return ret } - return *o.ServicePortsProducts + return o.ServicePortsProducts } // GetServicePortsProductsOk returns a tuple with the ServicePortsProducts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetServicePortsProductsOk() (*[]string, bool) { - if o == nil || o.ServicePortsProducts == nil { +func (o *Service) GetServicePortsProductsOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsProducts) { return nil, false } return o.ServicePortsProducts, true @@ -1634,7 +1652,7 @@ func (o *Service) GetServicePortsProductsOk() (*[]string, bool) { // HasServicePortsProducts returns a boolean if a field has been set. func (o *Service) HasServicePortsProducts() bool { - if o != nil && o.ServicePortsProducts != nil { + if o != nil && !IsNil(o.ServicePortsProducts) { return true } @@ -1643,12 +1661,12 @@ func (o *Service) HasServicePortsProducts() bool { // SetServicePortsProducts gets a reference to the given []string and assigns it to the ServicePortsProducts field. func (o *Service) SetServicePortsProducts(v []string) { - o.ServicePortsProducts = &v + o.ServicePortsProducts = v } // GetOrgName returns the OrgName field value if set, zero value otherwise. func (o *Service) GetOrgName() string { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { var ret string return ret } @@ -1658,7 +1676,7 @@ func (o *Service) GetOrgName() string { // GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetOrgNameOk() (*string, bool) { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { return nil, false } return o.OrgName, true @@ -1666,7 +1684,7 @@ func (o *Service) GetOrgNameOk() (*string, bool) { // HasOrgName returns a boolean if a field has been set. func (o *Service) HasOrgName() bool { - if o != nil && o.OrgName != nil { + if o != nil && !IsNil(o.OrgName) { return true } @@ -1680,7 +1698,7 @@ func (o *Service) SetOrgName(v string) { // GetSiteName returns the SiteName field value if set, zero value otherwise. func (o *Service) GetSiteName() string { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { var ret string return ret } @@ -1690,7 +1708,7 @@ func (o *Service) GetSiteName() string { // GetSiteNameOk returns a tuple with the SiteName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetSiteNameOk() (*string, bool) { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { return nil, false } return o.SiteName, true @@ -1698,7 +1716,7 @@ func (o *Service) GetSiteNameOk() (*string, bool) { // HasSiteName returns a boolean if a field has been set. func (o *Service) HasSiteName() bool { - if o != nil && o.SiteName != nil { + if o != nil && !IsNil(o.SiteName) { return true } @@ -1712,7 +1730,7 @@ func (o *Service) SetSiteName(v string) { // GetAgentName returns the AgentName field value if set, zero value otherwise. func (o *Service) GetAgentName() string { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { var ret string return ret } @@ -1722,7 +1740,7 @@ func (o *Service) GetAgentName() string { // GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetAgentNameOk() (*string, bool) { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { return nil, false } return o.AgentName, true @@ -1730,7 +1748,7 @@ func (o *Service) GetAgentNameOk() (*string, bool) { // HasAgentName returns a boolean if a field has been set. func (o *Service) HasAgentName() bool { - if o != nil && o.AgentName != nil { + if o != nil && !IsNil(o.AgentName) { return true } @@ -1744,7 +1762,7 @@ func (o *Service) SetAgentName(v string) { // GetTags returns the Tags field value if set, zero value otherwise. func (o *Service) GetTags() map[string]string { - if o == nil || o.Tags == nil { + if o == nil || IsNil(o.Tags) { var ret map[string]string return ret } @@ -1754,7 +1772,7 @@ func (o *Service) GetTags() map[string]string { // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetTagsOk() (*map[string]string, bool) { - if o == nil || o.Tags == nil { + if o == nil || IsNil(o.Tags) { return nil, false } return o.Tags, true @@ -1762,7 +1780,7 @@ func (o *Service) GetTagsOk() (*map[string]string, bool) { // HasTags returns a boolean if a field has been set. func (o *Service) HasTags() bool { - if o != nil && o.Tags != nil { + if o != nil && !IsNil(o.Tags) { return true } @@ -1776,7 +1794,7 @@ func (o *Service) SetTags(v map[string]string) { // GetServices returns the Services field value if set, zero value otherwise. func (o *Service) GetServices() map[string]map[string]string { - if o == nil || o.Services == nil { + if o == nil || IsNil(o.Services) { var ret map[string]map[string]string return ret } @@ -1786,7 +1804,7 @@ func (o *Service) GetServices() map[string]map[string]string { // GetServicesOk returns a tuple with the Services field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetServicesOk() (*map[string]map[string]string, bool) { - if o == nil || o.Services == nil { + if o == nil || IsNil(o.Services) { return nil, false } return o.Services, true @@ -1794,7 +1812,7 @@ func (o *Service) GetServicesOk() (*map[string]map[string]string, bool) { // HasServices returns a boolean if a field has been set. func (o *Service) HasServices() bool { - if o != nil && o.Services != nil { + if o != nil && !IsNil(o.Services) { return true } @@ -1807,40 +1825,40 @@ func (o *Service) SetServices(v map[string]map[string]string) { } // GetRtts returns the Rtts field value if set, zero value otherwise. -func (o *Service) GetRtts() map[string]map[string]interface{} { - if o == nil || o.Rtts == nil { - var ret map[string]map[string]interface{} +func (o *Service) GetRtts() map[string]interface{} { + if o == nil || IsNil(o.Rtts) { + var ret map[string]interface{} return ret } - return *o.Rtts + return o.Rtts } // GetRttsOk returns a tuple with the Rtts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Service) GetRttsOk() (*map[string]map[string]interface{}, bool) { - if o == nil || o.Rtts == nil { - return nil, false +func (o *Service) GetRttsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Rtts) { + return map[string]interface{}{}, false } return o.Rtts, true } // HasRtts returns a boolean if a field has been set. func (o *Service) HasRtts() bool { - if o != nil && o.Rtts != nil { + if o != nil && !IsNil(o.Rtts) { return true } return false } -// SetRtts gets a reference to the given map[string]map[string]interface{} and assigns it to the Rtts field. -func (o *Service) SetRtts(v map[string]map[string]interface{}) { - o.Rtts = &v +// SetRtts gets a reference to the given map[string]interface{} and assigns it to the Rtts field. +func (o *Service) SetRtts(v map[string]interface{}) { + o.Rtts = v } // GetCredentials returns the Credentials field value if set, zero value otherwise. func (o *Service) GetCredentials() map[string]map[string]bool { - if o == nil || o.Credentials == nil { + if o == nil || IsNil(o.Credentials) { var ret map[string]map[string]bool return ret } @@ -1850,7 +1868,7 @@ func (o *Service) GetCredentials() map[string]map[string]bool { // GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetCredentialsOk() (*map[string]map[string]bool, bool) { - if o == nil || o.Credentials == nil { + if o == nil || IsNil(o.Credentials) { return nil, false } return o.Credentials, true @@ -1858,7 +1876,7 @@ func (o *Service) GetCredentialsOk() (*map[string]map[string]bool, bool) { // HasCredentials returns a boolean if a field has been set. func (o *Service) HasCredentials() bool { - if o != nil && o.Credentials != nil { + if o != nil && !IsNil(o.Credentials) { return true } @@ -1872,7 +1890,7 @@ func (o *Service) SetCredentials(v map[string]map[string]bool) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *Service) GetAttributes() map[string]string { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]string return ret } @@ -1882,7 +1900,7 @@ func (o *Service) GetAttributes() map[string]string { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Service) GetAttributesOk() (*map[string]string, bool) { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { return nil, false } return o.Attributes, true @@ -1890,7 +1908,7 @@ func (o *Service) GetAttributesOk() (*map[string]string, bool) { // HasAttributes returns a boolean if a field has been set. func (o *Service) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -1903,179 +1921,221 @@ func (o *Service) SetAttributes(v map[string]string) { } func (o Service) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["service_id"] = o.ServiceId + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ServiceAssetId != nil { + return json.Marshal(toSerialize) +} + +func (o Service) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["service_id"] = o.ServiceId + if !IsNil(o.ServiceAssetId) { toSerialize["service_asset_id"] = o.ServiceAssetId } - if o.ServiceCreatedAt != nil { + if !IsNil(o.ServiceCreatedAt) { toSerialize["service_created_at"] = o.ServiceCreatedAt } - if o.ServiceUpdatedAt != nil { + if !IsNil(o.ServiceUpdatedAt) { toSerialize["service_updated_at"] = o.ServiceUpdatedAt } - if o.ServiceAddress != nil { - toSerialize["service_address"] = o.ServiceAddress + if o.ServiceAddress.IsSet() { + toSerialize["service_address"] = o.ServiceAddress.Get() } - if o.ServiceTransport != nil { + if !IsNil(o.ServiceTransport) { toSerialize["service_transport"] = o.ServiceTransport } - if o.ServiceVhost != nil { + if !IsNil(o.ServiceVhost) { toSerialize["service_vhost"] = o.ServiceVhost } - if o.ServicePort != nil { + if !IsNil(o.ServicePort) { toSerialize["service_port"] = o.ServicePort } - if o.ServiceData != nil { + if !IsNil(o.ServiceData) { toSerialize["service_data"] = o.ServiceData } - if o.ServiceProtocol != nil { + if !IsNil(o.ServiceProtocol) { toSerialize["service_protocol"] = o.ServiceProtocol } - if o.ServiceSummary != nil { + if !IsNil(o.ServiceSummary) { toSerialize["service_summary"] = o.ServiceSummary } - if o.ServiceScreenshotLink != nil { + if !IsNil(o.ServiceScreenshotLink) { toSerialize["service_screenshot_link"] = o.ServiceScreenshotLink } - if o.ServiceLink != nil { + if !IsNil(o.ServiceLink) { toSerialize["service_link"] = o.ServiceLink } - if true { - toSerialize["id"] = o.Id - } - if o.CreatedAt != nil { + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.OrganizationId != nil { + if !IsNil(o.OrganizationId) { toSerialize["organization_id"] = o.OrganizationId } - if o.SiteId != nil { + if !IsNil(o.SiteId) { toSerialize["site_id"] = o.SiteId } - if o.Alive != nil { + if !IsNil(o.Alive) { toSerialize["alive"] = o.Alive } - if o.FirstSeen != nil { + if !IsNil(o.FirstSeen) { toSerialize["first_seen"] = o.FirstSeen } - if o.LastSeen != nil { + if !IsNil(o.LastSeen) { toSerialize["last_seen"] = o.LastSeen } - if o.DetectedBy != nil { + if !IsNil(o.DetectedBy) { toSerialize["detected_by"] = o.DetectedBy } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Os != nil { + if !IsNil(o.Os) { toSerialize["os"] = o.Os } - if o.OsVersion != nil { + if !IsNil(o.OsVersion) { toSerialize["os_version"] = o.OsVersion } - if o.Hw != nil { + if !IsNil(o.Hw) { toSerialize["hw"] = o.Hw } - if o.Addresses != nil { + if !IsNil(o.Addresses) { toSerialize["addresses"] = o.Addresses } - if o.AddressesExtra != nil { + if !IsNil(o.AddressesExtra) { toSerialize["addresses_extra"] = o.AddressesExtra } - if o.Macs != nil { + if !IsNil(o.Macs) { toSerialize["macs"] = o.Macs } - if o.MacVendors != nil { + if !IsNil(o.MacVendors) { toSerialize["mac_vendors"] = o.MacVendors } - if o.Names != nil { + if !IsNil(o.Names) { toSerialize["names"] = o.Names } - if o.Domains != nil { + if !IsNil(o.Domains) { toSerialize["domains"] = o.Domains } - if o.ServiceCount != nil { + if !IsNil(o.ServiceCount) { toSerialize["service_count"] = o.ServiceCount } - if o.ServiceCountTcp != nil { + if !IsNil(o.ServiceCountTcp) { toSerialize["service_count_tcp"] = o.ServiceCountTcp } - if o.ServiceCountUdp != nil { + if !IsNil(o.ServiceCountUdp) { toSerialize["service_count_udp"] = o.ServiceCountUdp } - if o.ServiceCountArp != nil { + if !IsNil(o.ServiceCountArp) { toSerialize["service_count_arp"] = o.ServiceCountArp } - if o.ServiceCountIcmp != nil { + if !IsNil(o.ServiceCountIcmp) { toSerialize["service_count_icmp"] = o.ServiceCountIcmp } - if o.LowestTtl != nil { + if !IsNil(o.LowestTtl) { toSerialize["lowest_ttl"] = o.LowestTtl } - if o.LowestRtt != nil { + if !IsNil(o.LowestRtt) { toSerialize["lowest_rtt"] = o.LowestRtt } - if o.LastAgentId != nil { + if !IsNil(o.LastAgentId) { toSerialize["last_agent_id"] = o.LastAgentId } - if o.LastTaskId != nil { + if !IsNil(o.LastTaskId) { toSerialize["last_task_id"] = o.LastTaskId } - if o.NewestMac != nil { + if !IsNil(o.NewestMac) { toSerialize["newest_mac"] = o.NewestMac } - if o.NewestMacVendor != nil { + if !IsNil(o.NewestMacVendor) { toSerialize["newest_mac_vendor"] = o.NewestMacVendor } - if o.NewestMacAge != nil { + if !IsNil(o.NewestMacAge) { toSerialize["newest_mac_age"] = o.NewestMacAge } - if o.Comments != nil { + if !IsNil(o.Comments) { toSerialize["comments"] = o.Comments } - if o.ServicePortsTcp != nil { + if !IsNil(o.ServicePortsTcp) { toSerialize["service_ports_tcp"] = o.ServicePortsTcp } - if o.ServicePortsUdp != nil { + if !IsNil(o.ServicePortsUdp) { toSerialize["service_ports_udp"] = o.ServicePortsUdp } - if o.ServicePortsProtocols != nil { + if !IsNil(o.ServicePortsProtocols) { toSerialize["service_ports_protocols"] = o.ServicePortsProtocols } - if o.ServicePortsProducts != nil { + if !IsNil(o.ServicePortsProducts) { toSerialize["service_ports_products"] = o.ServicePortsProducts } - if o.OrgName != nil { + if !IsNil(o.OrgName) { toSerialize["org_name"] = o.OrgName } - if o.SiteName != nil { + if !IsNil(o.SiteName) { toSerialize["site_name"] = o.SiteName } - if o.AgentName != nil { + if !IsNil(o.AgentName) { toSerialize["agent_name"] = o.AgentName } - if o.Tags != nil { + if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } - if o.Services != nil { + if !IsNil(o.Services) { toSerialize["services"] = o.Services } - if o.Rtts != nil { + if !IsNil(o.Rtts) { toSerialize["rtts"] = o.Rtts } - if o.Credentials != nil { + if !IsNil(o.Credentials) { toSerialize["credentials"] = o.Credentials } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *Service) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "service_id", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varService := _Service{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varService) + + if err != nil { + return err + } + + *o = Service(varService) + + return err } type NullableService struct { @@ -2113,3 +2173,5 @@ func (v *NullableService) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_service_export_response.go b/go/model_service_export_response.go new file mode 100644 index 0000000..45385b0 --- /dev/null +++ b/go/model_service_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ServiceExportResponse - Response body for the service export endpoint. Bare array unless `page_size` is provided. +type ServiceExportResponse struct { + ServicePage *ServicePage + ArrayOfService *[]Service +} + +// ServicePageAsServiceExportResponse is a convenience function that returns ServicePage wrapped in ServiceExportResponse +func ServicePageAsServiceExportResponse(v *ServicePage) ServiceExportResponse { + return ServiceExportResponse{ + ServicePage: v, + } +} + +// []ServiceAsServiceExportResponse is a convenience function that returns []Service wrapped in ServiceExportResponse +func ArrayOfServiceAsServiceExportResponse(v *[]Service) ServiceExportResponse { + return ServiceExportResponse{ + ArrayOfService: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ServiceExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ServicePage + err = newStrictDecoder(data).Decode(&dst.ServicePage) + if err == nil { + jsonServicePage, _ := json.Marshal(dst.ServicePage) + if string(jsonServicePage) == "{}" { // empty struct + dst.ServicePage = nil + } else { + if err = validator.Validate(dst.ServicePage); err != nil { + dst.ServicePage = nil + } else { + match++ + } + } + } else { + dst.ServicePage = nil + } + + // try to unmarshal data into ArrayOfService + err = newStrictDecoder(data).Decode(&dst.ArrayOfService) + if err == nil { + jsonArrayOfService, _ := json.Marshal(dst.ArrayOfService) + if string(jsonArrayOfService) == "{}" { // empty struct + dst.ArrayOfService = nil + } else { + if err = validator.Validate(dst.ArrayOfService); err != nil { + dst.ArrayOfService = nil + } else { + match++ + } + } + } else { + dst.ArrayOfService = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ServicePage = nil + dst.ArrayOfService = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ServiceExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ServiceExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ServiceExportResponse) MarshalJSON() ([]byte, error) { + if src.ServicePage != nil { + return json.Marshal(&src.ServicePage) + } + + if src.ArrayOfService != nil { + return json.Marshal(&src.ArrayOfService) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ServiceExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.ServicePage != nil { + return obj.ServicePage + } + + if obj.ArrayOfService != nil { + return obj.ArrayOfService + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ServiceExportResponse) GetActualInstanceValue() (interface{}) { + if obj.ServicePage != nil { + return *obj.ServicePage + } + + if obj.ArrayOfService != nil { + return *obj.ArrayOfService + } + + // all schemas are nil + return nil +} + +type NullableServiceExportResponse struct { + value *ServiceExportResponse + isSet bool +} + +func (v NullableServiceExportResponse) Get() *ServiceExportResponse { + return v.value +} + +func (v *NullableServiceExportResponse) Set(val *ServiceExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServiceExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceExportResponse(val *ServiceExportResponse) *NullableServiceExportResponse { + return &NullableServiceExportResponse{value: val, isSet: true} +} + +func (v NullableServiceExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_service_page.go b/go/model_service_page.go new file mode 100644 index 0000000..7cc5e68 --- /dev/null +++ b/go/model_service_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the ServicePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServicePage{} + +// ServicePage A page of services returned from a paginated export. +type ServicePage struct { + Services []Service `json:"services,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewServicePage instantiates a new ServicePage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServicePage() *ServicePage { + this := ServicePage{} + return &this +} + +// NewServicePageWithDefaults instantiates a new ServicePage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServicePageWithDefaults() *ServicePage { + this := ServicePage{} + return &this +} + +// GetServices returns the Services field value if set, zero value otherwise. +func (o *ServicePage) GetServices() []Service { + if o == nil || IsNil(o.Services) { + var ret []Service + return ret + } + return o.Services +} + +// GetServicesOk returns a tuple with the Services field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePage) GetServicesOk() ([]Service, bool) { + if o == nil || IsNil(o.Services) { + return nil, false + } + return o.Services, true +} + +// HasServices returns a boolean if a field has been set. +func (o *ServicePage) HasServices() bool { + if o != nil && !IsNil(o.Services) { + return true + } + + return false +} + +// SetServices gets a reference to the given []Service and assigns it to the Services field. +func (o *ServicePage) SetServices(v []Service) { + o.Services = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *ServicePage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *ServicePage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *ServicePage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o ServicePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServicePage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Services) { + toSerialize["services"] = o.Services + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableServicePage struct { + value *ServicePage + isSet bool +} + +func (v NullableServicePage) Get() *ServicePage { + return v.value +} + +func (v *NullableServicePage) Set(val *ServicePage) { + v.value = val + v.isSet = true +} + +func (v NullableServicePage) IsSet() bool { + return v.isSet +} + +func (v *NullableServicePage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServicePage(val *ServicePage) *NullableServicePage { + return &NullableServicePage{value: val, isSet: true} +} + +func (v NullableServicePage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServicePage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_shodan_credential_fields.go b/go/model_shodan_credential_fields.go new file mode 100644 index 0000000..5eb347d --- /dev/null +++ b/go/model_shodan_credential_fields.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ShodanCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShodanCredentialFields{} + +// ShodanCredentialFields struct for ShodanCredentialFields +type ShodanCredentialFields struct { + ApiKey string `json:"api_key"` +} + +type _ShodanCredentialFields ShodanCredentialFields + +// NewShodanCredentialFields instantiates a new ShodanCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewShodanCredentialFields(apiKey string) *ShodanCredentialFields { + this := ShodanCredentialFields{} + this.ApiKey = apiKey + return &this +} + +// NewShodanCredentialFieldsWithDefaults instantiates a new ShodanCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewShodanCredentialFieldsWithDefaults() *ShodanCredentialFields { + this := ShodanCredentialFields{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *ShodanCredentialFields) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *ShodanCredentialFields) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *ShodanCredentialFields) SetApiKey(v string) { + o.ApiKey = v +} + +func (o ShodanCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShodanCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + return toSerialize, nil +} + +func (o *ShodanCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varShodanCredentialFields := _ShodanCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varShodanCredentialFields) + + if err != nil { + return err + } + + *o = ShodanCredentialFields(varShodanCredentialFields) + + return err +} + +type NullableShodanCredentialFields struct { + value *ShodanCredentialFields + isSet bool +} + +func (v NullableShodanCredentialFields) Get() *ShodanCredentialFields { + return v.value +} + +func (v *NullableShodanCredentialFields) Set(val *ShodanCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableShodanCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableShodanCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShodanCredentialFields(val *ShodanCredentialFields) *NullableShodanCredentialFields { + return &NullableShodanCredentialFields{value: val, isSet: true} +} + +func (v NullableShodanCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShodanCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_site.go b/go/model_site.go index e3e6bcc..2d06ae5 100644 --- a/go/model_site.go +++ b/go/model_site.go @@ -1,31 +1,39 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the Site type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Site{} + // Site struct for Site type Site struct { - Id string `json:"id"` - CreatedAt *int64 `json:"created_at,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - Permanent *bool `json:"permanent,omitempty"` - Name string `json:"name"` + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Name string `json:"name"` Description *string `json:"description,omitempty"` - Scope *string `json:"scope,omitempty"` - Excludes *string `json:"excludes,omitempty"` + Scope *string `json:"scope,omitempty"` + Excludes *string `json:"excludes,omitempty"` + Subnets map[string]interface{} `json:"subnets,omitempty"` } +type _Site Site + // NewSite instantiates a new Site object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -71,7 +79,7 @@ func (o *Site) SetId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Site) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -81,7 +89,7 @@ func (o *Site) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Site) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -89,7 +97,7 @@ func (o *Site) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Site) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -103,7 +111,7 @@ func (o *Site) SetCreatedAt(v int64) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Site) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -113,7 +121,7 @@ func (o *Site) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Site) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -121,7 +129,7 @@ func (o *Site) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Site) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -133,38 +141,6 @@ func (o *Site) SetUpdatedAt(v int64) { o.UpdatedAt = &v } -// GetPermanent returns the Permanent field value if set, zero value otherwise. -func (o *Site) GetPermanent() bool { - if o == nil || o.Permanent == nil { - var ret bool - return ret - } - return *o.Permanent -} - -// GetPermanentOk returns a tuple with the Permanent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Site) GetPermanentOk() (*bool, bool) { - if o == nil || o.Permanent == nil { - return nil, false - } - return o.Permanent, true -} - -// HasPermanent returns a boolean if a field has been set. -func (o *Site) HasPermanent() bool { - if o != nil && o.Permanent != nil { - return true - } - - return false -} - -// SetPermanent gets a reference to the given bool and assigns it to the Permanent field. -func (o *Site) SetPermanent(v bool) { - o.Permanent = &v -} - // GetName returns the Name field value func (o *Site) GetName() string { if o == nil { @@ -191,7 +167,7 @@ func (o *Site) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *Site) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -201,7 +177,7 @@ func (o *Site) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Site) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -209,7 +185,7 @@ func (o *Site) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *Site) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -223,7 +199,7 @@ func (o *Site) SetDescription(v string) { // GetScope returns the Scope field value if set, zero value otherwise. func (o *Site) GetScope() string { - if o == nil || o.Scope == nil { + if o == nil || IsNil(o.Scope) { var ret string return ret } @@ -233,7 +209,7 @@ func (o *Site) GetScope() string { // GetScopeOk returns a tuple with the Scope field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Site) GetScopeOk() (*string, bool) { - if o == nil || o.Scope == nil { + if o == nil || IsNil(o.Scope) { return nil, false } return o.Scope, true @@ -241,7 +217,7 @@ func (o *Site) GetScopeOk() (*string, bool) { // HasScope returns a boolean if a field has been set. func (o *Site) HasScope() bool { - if o != nil && o.Scope != nil { + if o != nil && !IsNil(o.Scope) { return true } @@ -255,7 +231,7 @@ func (o *Site) SetScope(v string) { // GetExcludes returns the Excludes field value if set, zero value otherwise. func (o *Site) GetExcludes() string { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { var ret string return ret } @@ -265,7 +241,7 @@ func (o *Site) GetExcludes() string { // GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Site) GetExcludesOk() (*string, bool) { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { return nil, false } return o.Excludes, true @@ -273,7 +249,7 @@ func (o *Site) GetExcludesOk() (*string, bool) { // HasExcludes returns a boolean if a field has been set. func (o *Site) HasExcludes() bool { - if o != nil && o.Excludes != nil { + if o != nil && !IsNil(o.Excludes) { return true } @@ -285,33 +261,107 @@ func (o *Site) SetExcludes(v string) { o.Excludes = &v } +// GetSubnets returns the Subnets field value if set, zero value otherwise. +func (o *Site) GetSubnets() map[string]interface{} { + if o == nil || IsNil(o.Subnets) { + var ret map[string]interface{} + return ret + } + return o.Subnets +} + +// GetSubnetsOk returns a tuple with the Subnets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Site) GetSubnetsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Subnets) { + return map[string]interface{}{}, false + } + return o.Subnets, true +} + +// HasSubnets returns a boolean if a field has been set. +func (o *Site) HasSubnets() bool { + if o != nil && !IsNil(o.Subnets) { + return true + } + + return false +} + +// SetSubnets gets a reference to the given map[string]interface{} and assigns it to the Subnets field. +func (o *Site) SetSubnets(v map[string]interface{}) { + o.Subnets = v +} + func (o Site) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CreatedAt != nil { + return json.Marshal(toSerialize) +} + +func (o Site) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.Permanent != nil { - toSerialize["permanent"] = o.Permanent - } - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { + toSerialize["name"] = o.Name + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Scope != nil { + if !IsNil(o.Scope) { toSerialize["scope"] = o.Scope } - if o.Excludes != nil { + if !IsNil(o.Excludes) { toSerialize["excludes"] = o.Excludes } - return json.Marshal(toSerialize) + if !IsNil(o.Subnets) { + toSerialize["subnets"] = o.Subnets + } + return toSerialize, nil +} + +func (o *Site) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSite := _Site{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSite) + + if err != nil { + return err + } + + *o = Site(varSite) + + return err } type NullableSite struct { @@ -349,3 +399,5 @@ func (v *NullableSite) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_site_options.go b/go/model_site_options.go index 71dec2b..24ac867 100644 --- a/go/model_site_options.go +++ b/go/model_site_options.go @@ -1,27 +1,36 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the SiteOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SiteOptions{} + // SiteOptions struct for SiteOptions type SiteOptions struct { - Name string `json:"name"` + Name string `json:"name"` Description *string `json:"description,omitempty"` - Scope *string `json:"scope,omitempty"` - Excludes *string `json:"excludes,omitempty"` + Scope *string `json:"scope,omitempty"` + Excludes *string `json:"excludes,omitempty"` + Subnets map[string]interface{} `json:"subnets,omitempty"` } +type _SiteOptions SiteOptions + // NewSiteOptions instantiates a new SiteOptions object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -66,7 +75,7 @@ func (o *SiteOptions) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *SiteOptions) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -76,7 +85,7 @@ func (o *SiteOptions) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SiteOptions) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -84,7 +93,7 @@ func (o *SiteOptions) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *SiteOptions) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -98,7 +107,7 @@ func (o *SiteOptions) SetDescription(v string) { // GetScope returns the Scope field value if set, zero value otherwise. func (o *SiteOptions) GetScope() string { - if o == nil || o.Scope == nil { + if o == nil || IsNil(o.Scope) { var ret string return ret } @@ -108,7 +117,7 @@ func (o *SiteOptions) GetScope() string { // GetScopeOk returns a tuple with the Scope field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SiteOptions) GetScopeOk() (*string, bool) { - if o == nil || o.Scope == nil { + if o == nil || IsNil(o.Scope) { return nil, false } return o.Scope, true @@ -116,7 +125,7 @@ func (o *SiteOptions) GetScopeOk() (*string, bool) { // HasScope returns a boolean if a field has been set. func (o *SiteOptions) HasScope() bool { - if o != nil && o.Scope != nil { + if o != nil && !IsNil(o.Scope) { return true } @@ -130,7 +139,7 @@ func (o *SiteOptions) SetScope(v string) { // GetExcludes returns the Excludes field value if set, zero value otherwise. func (o *SiteOptions) GetExcludes() string { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { var ret string return ret } @@ -140,7 +149,7 @@ func (o *SiteOptions) GetExcludes() string { // GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SiteOptions) GetExcludesOk() (*string, bool) { - if o == nil || o.Excludes == nil { + if o == nil || IsNil(o.Excludes) { return nil, false } return o.Excludes, true @@ -148,7 +157,7 @@ func (o *SiteOptions) GetExcludesOk() (*string, bool) { // HasExcludes returns a boolean if a field has been set. func (o *SiteOptions) HasExcludes() bool { - if o != nil && o.Excludes != nil { + if o != nil && !IsNil(o.Excludes) { return true } @@ -160,21 +169,99 @@ func (o *SiteOptions) SetExcludes(v string) { o.Excludes = &v } +// GetSubnets returns the Subnets field value if set, zero value otherwise. +func (o *SiteOptions) GetSubnets() map[string]interface{} { + if o == nil || IsNil(o.Subnets) { + var ret map[string]interface{} + return ret + } + return o.Subnets +} + +// GetSubnetsOk returns a tuple with the Subnets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SiteOptions) GetSubnetsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Subnets) { + return map[string]interface{}{}, false + } + return o.Subnets, true +} + +// HasSubnets returns a boolean if a field has been set. +func (o *SiteOptions) HasSubnets() bool { + if o != nil && !IsNil(o.Subnets) { + return true + } + + return false +} + +// SetSubnets gets a reference to the given map[string]interface{} and assigns it to the Subnets field. +func (o *SiteOptions) SetSubnets(v map[string]interface{}) { + o.Subnets = v +} + func (o SiteOptions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Description != nil { + return json.Marshal(toSerialize) +} + +func (o SiteOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Scope != nil { + if !IsNil(o.Scope) { toSerialize["scope"] = o.Scope } - if o.Excludes != nil { + if !IsNil(o.Excludes) { toSerialize["excludes"] = o.Excludes } - return json.Marshal(toSerialize) + if !IsNil(o.Subnets) { + toSerialize["subnets"] = o.Subnets + } + return toSerialize, nil +} + +func (o *SiteOptions) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSiteOptions := _SiteOptions{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSiteOptions) + + if err != nil { + return err + } + + *o = SiteOptions(varSiteOptions) + + return err } type NullableSiteOptions struct { @@ -212,3 +299,5 @@ func (v *NullableSiteOptions) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_snmpv2_communities_credential_fields.go b/go/model_snmpv2_communities_credential_fields.go new file mode 100644 index 0000000..2dbf23f --- /dev/null +++ b/go/model_snmpv2_communities_credential_fields.go @@ -0,0 +1,159 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SNMPv2CommunitiesCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SNMPv2CommunitiesCredentialFields{} + +// SNMPv2CommunitiesCredentialFields struct for SNMPv2CommunitiesCredentialFields +type SNMPv2CommunitiesCredentialFields struct { + Community string `json:"community"` +} + +type _SNMPv2CommunitiesCredentialFields SNMPv2CommunitiesCredentialFields + +// NewSNMPv2CommunitiesCredentialFields instantiates a new SNMPv2CommunitiesCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSNMPv2CommunitiesCredentialFields(community string) *SNMPv2CommunitiesCredentialFields { + this := SNMPv2CommunitiesCredentialFields{} + this.Community = community + return &this +} + +// NewSNMPv2CommunitiesCredentialFieldsWithDefaults instantiates a new SNMPv2CommunitiesCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSNMPv2CommunitiesCredentialFieldsWithDefaults() *SNMPv2CommunitiesCredentialFields { + this := SNMPv2CommunitiesCredentialFields{} + return &this +} + +// GetCommunity returns the Community field value +func (o *SNMPv2CommunitiesCredentialFields) GetCommunity() string { + if o == nil { + var ret string + return ret + } + + return o.Community +} + +// GetCommunityOk returns a tuple with the Community field value +// and a boolean to check if the value has been set. +func (o *SNMPv2CommunitiesCredentialFields) GetCommunityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Community, true +} + +// SetCommunity sets field value +func (o *SNMPv2CommunitiesCredentialFields) SetCommunity(v string) { + o.Community = v +} + +func (o SNMPv2CommunitiesCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SNMPv2CommunitiesCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["community"] = o.Community + return toSerialize, nil +} + +func (o *SNMPv2CommunitiesCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "community", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSNMPv2CommunitiesCredentialFields := _SNMPv2CommunitiesCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSNMPv2CommunitiesCredentialFields) + + if err != nil { + return err + } + + *o = SNMPv2CommunitiesCredentialFields(varSNMPv2CommunitiesCredentialFields) + + return err +} + +type NullableSNMPv2CommunitiesCredentialFields struct { + value *SNMPv2CommunitiesCredentialFields + isSet bool +} + +func (v NullableSNMPv2CommunitiesCredentialFields) Get() *SNMPv2CommunitiesCredentialFields { + return v.value +} + +func (v *NullableSNMPv2CommunitiesCredentialFields) Set(val *SNMPv2CommunitiesCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableSNMPv2CommunitiesCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableSNMPv2CommunitiesCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSNMPv2CommunitiesCredentialFields(val *SNMPv2CommunitiesCredentialFields) *NullableSNMPv2CommunitiesCredentialFields { + return &NullableSNMPv2CommunitiesCredentialFields{value: val, isSet: true} +} + +func (v NullableSNMPv2CommunitiesCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSNMPv2CommunitiesCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_snmpv3_credential_fields.go b/go/model_snmpv3_credential_fields.go new file mode 100644 index 0000000..22a299e --- /dev/null +++ b/go/model_snmpv3_credential_fields.go @@ -0,0 +1,339 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SNMPv3CredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SNMPv3CredentialFields{} + +// SNMPv3CredentialFields struct for SNMPv3CredentialFields +type SNMPv3CredentialFields struct { + Username string `json:"username"` + Context *string `json:"context,omitempty"` + AuthProtocol *string `json:"auth-protocol,omitempty"` + AuthPassphrase *string `json:"auth-passphrase,omitempty"` + PrivacyProtocol *string `json:"privacy-protocol,omitempty"` + PrivacyPassphrase *string `json:"privacy-passphrase,omitempty"` +} + +type _SNMPv3CredentialFields SNMPv3CredentialFields + +// NewSNMPv3CredentialFields instantiates a new SNMPv3CredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSNMPv3CredentialFields(username string) *SNMPv3CredentialFields { + this := SNMPv3CredentialFields{} + this.Username = username + return &this +} + +// NewSNMPv3CredentialFieldsWithDefaults instantiates a new SNMPv3CredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSNMPv3CredentialFieldsWithDefaults() *SNMPv3CredentialFields { + this := SNMPv3CredentialFields{} + return &this +} + +// GetUsername returns the Username field value +func (o *SNMPv3CredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *SNMPv3CredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *SNMPv3CredentialFields) GetContext() string { + if o == nil || IsNil(o.Context) { + var ret string + return ret + } + return *o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetContextOk() (*string, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *SNMPv3CredentialFields) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given string and assigns it to the Context field. +func (o *SNMPv3CredentialFields) SetContext(v string) { + o.Context = &v +} + +// GetAuthProtocol returns the AuthProtocol field value if set, zero value otherwise. +func (o *SNMPv3CredentialFields) GetAuthProtocol() string { + if o == nil || IsNil(o.AuthProtocol) { + var ret string + return ret + } + return *o.AuthProtocol +} + +// GetAuthProtocolOk returns a tuple with the AuthProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetAuthProtocolOk() (*string, bool) { + if o == nil || IsNil(o.AuthProtocol) { + return nil, false + } + return o.AuthProtocol, true +} + +// HasAuthProtocol returns a boolean if a field has been set. +func (o *SNMPv3CredentialFields) HasAuthProtocol() bool { + if o != nil && !IsNil(o.AuthProtocol) { + return true + } + + return false +} + +// SetAuthProtocol gets a reference to the given string and assigns it to the AuthProtocol field. +func (o *SNMPv3CredentialFields) SetAuthProtocol(v string) { + o.AuthProtocol = &v +} + +// GetAuthPassphrase returns the AuthPassphrase field value if set, zero value otherwise. +func (o *SNMPv3CredentialFields) GetAuthPassphrase() string { + if o == nil || IsNil(o.AuthPassphrase) { + var ret string + return ret + } + return *o.AuthPassphrase +} + +// GetAuthPassphraseOk returns a tuple with the AuthPassphrase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetAuthPassphraseOk() (*string, bool) { + if o == nil || IsNil(o.AuthPassphrase) { + return nil, false + } + return o.AuthPassphrase, true +} + +// HasAuthPassphrase returns a boolean if a field has been set. +func (o *SNMPv3CredentialFields) HasAuthPassphrase() bool { + if o != nil && !IsNil(o.AuthPassphrase) { + return true + } + + return false +} + +// SetAuthPassphrase gets a reference to the given string and assigns it to the AuthPassphrase field. +func (o *SNMPv3CredentialFields) SetAuthPassphrase(v string) { + o.AuthPassphrase = &v +} + +// GetPrivacyProtocol returns the PrivacyProtocol field value if set, zero value otherwise. +func (o *SNMPv3CredentialFields) GetPrivacyProtocol() string { + if o == nil || IsNil(o.PrivacyProtocol) { + var ret string + return ret + } + return *o.PrivacyProtocol +} + +// GetPrivacyProtocolOk returns a tuple with the PrivacyProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetPrivacyProtocolOk() (*string, bool) { + if o == nil || IsNil(o.PrivacyProtocol) { + return nil, false + } + return o.PrivacyProtocol, true +} + +// HasPrivacyProtocol returns a boolean if a field has been set. +func (o *SNMPv3CredentialFields) HasPrivacyProtocol() bool { + if o != nil && !IsNil(o.PrivacyProtocol) { + return true + } + + return false +} + +// SetPrivacyProtocol gets a reference to the given string and assigns it to the PrivacyProtocol field. +func (o *SNMPv3CredentialFields) SetPrivacyProtocol(v string) { + o.PrivacyProtocol = &v +} + +// GetPrivacyPassphrase returns the PrivacyPassphrase field value if set, zero value otherwise. +func (o *SNMPv3CredentialFields) GetPrivacyPassphrase() string { + if o == nil || IsNil(o.PrivacyPassphrase) { + var ret string + return ret + } + return *o.PrivacyPassphrase +} + +// GetPrivacyPassphraseOk returns a tuple with the PrivacyPassphrase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SNMPv3CredentialFields) GetPrivacyPassphraseOk() (*string, bool) { + if o == nil || IsNil(o.PrivacyPassphrase) { + return nil, false + } + return o.PrivacyPassphrase, true +} + +// HasPrivacyPassphrase returns a boolean if a field has been set. +func (o *SNMPv3CredentialFields) HasPrivacyPassphrase() bool { + if o != nil && !IsNil(o.PrivacyPassphrase) { + return true + } + + return false +} + +// SetPrivacyPassphrase gets a reference to the given string and assigns it to the PrivacyPassphrase field. +func (o *SNMPv3CredentialFields) SetPrivacyPassphrase(v string) { + o.PrivacyPassphrase = &v +} + +func (o SNMPv3CredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SNMPv3CredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.AuthProtocol) { + toSerialize["auth-protocol"] = o.AuthProtocol + } + if !IsNil(o.AuthPassphrase) { + toSerialize["auth-passphrase"] = o.AuthPassphrase + } + if !IsNil(o.PrivacyProtocol) { + toSerialize["privacy-protocol"] = o.PrivacyProtocol + } + if !IsNil(o.PrivacyPassphrase) { + toSerialize["privacy-passphrase"] = o.PrivacyPassphrase + } + return toSerialize, nil +} + +func (o *SNMPv3CredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "username", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSNMPv3CredentialFields := _SNMPv3CredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSNMPv3CredentialFields) + + if err != nil { + return err + } + + *o = SNMPv3CredentialFields(varSNMPv3CredentialFields) + + return err +} + +type NullableSNMPv3CredentialFields struct { + value *SNMPv3CredentialFields + isSet bool +} + +func (v NullableSNMPv3CredentialFields) Get() *SNMPv3CredentialFields { + return v.value +} + +func (v *NullableSNMPv3CredentialFields) Set(val *SNMPv3CredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableSNMPv3CredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableSNMPv3CredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSNMPv3CredentialFields(val *SNMPv3CredentialFields) *NullableSNMPv3CredentialFields { + return &NullableSNMPv3CredentialFields{value: val, isSet: true} +} + +func (v NullableSNMPv3CredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSNMPv3CredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_software.go b/go/model_software.go new file mode 100644 index 0000000..6419cba --- /dev/null +++ b/go/model_software.go @@ -0,0 +1,1105 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Software type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Software{} + +// Software struct for Software +type Software struct { + Id string `json:"id"` + SoftwareId *string `json:"software_id,omitempty"` + SoftwareAssetId *string `json:"software_asset_id,omitempty"` + SoftwareOrganizationId *string `json:"software_organization_id,omitempty"` + SoftwareSourceId *int32 `json:"software_source_id,omitempty"` + SoftwareCreatedAt *int64 `json:"software_created_at,omitempty"` + SoftwareUpdatedAt *int64 `json:"software_updated_at,omitempty"` + SoftwareServiceAddress NullableString `json:"software_service_address,omitempty"` + SoftwareServiceTransport *string `json:"software_service_transport,omitempty"` + SoftwareServicePort *int64 `json:"software_service_port,omitempty"` + SoftwareInstalledAt *int64 `json:"software_installed_at,omitempty"` + SoftwareInstalledSize *int64 `json:"software_installed_size,omitempty"` + SoftwareInstalledFrom *string `json:"software_installed_from,omitempty"` + SoftwareAppId *string `json:"software_app_id,omitempty"` + SoftwarePart *string `json:"software_part,omitempty"` + SoftwareVendor *string `json:"software_vendor,omitempty"` + SoftwareProduct *string `json:"software_product,omitempty"` + SoftwareVersion *string `json:"software_version,omitempty"` + SoftwareUpdate *string `json:"software_update,omitempty"` + SoftwareEdition *string `json:"software_edition,omitempty"` + SoftwareLanguage *string `json:"software_language,omitempty"` + SoftwareSwEdition *string `json:"software_sw_edition,omitempty"` + SoftwareTargetSw *string `json:"software_target_sw,omitempty"` + SoftwareTargetHw *string `json:"software_target_hw,omitempty"` + SoftwareOther *string `json:"software_other,omitempty"` + SoftwareCpe23 *string `json:"software_cpe23,omitempty"` + SoftwareAttributes *map[string]string `json:"software_attributes,omitempty"` +} + +type _Software Software + +// NewSoftware instantiates a new Software object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSoftware(id string) *Software { + this := Software{} + this.Id = id + return &this +} + +// NewSoftwareWithDefaults instantiates a new Software object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSoftwareWithDefaults() *Software { + this := Software{} + return &this +} + +// GetId returns the Id field value +func (o *Software) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Software) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Software) SetId(v string) { + o.Id = v +} + +// GetSoftwareId returns the SoftwareId field value if set, zero value otherwise. +func (o *Software) GetSoftwareId() string { + if o == nil || IsNil(o.SoftwareId) { + var ret string + return ret + } + return *o.SoftwareId +} + +// GetSoftwareIdOk returns a tuple with the SoftwareId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareIdOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareId) { + return nil, false + } + return o.SoftwareId, true +} + +// HasSoftwareId returns a boolean if a field has been set. +func (o *Software) HasSoftwareId() bool { + if o != nil && !IsNil(o.SoftwareId) { + return true + } + + return false +} + +// SetSoftwareId gets a reference to the given string and assigns it to the SoftwareId field. +func (o *Software) SetSoftwareId(v string) { + o.SoftwareId = &v +} + +// GetSoftwareAssetId returns the SoftwareAssetId field value if set, zero value otherwise. +func (o *Software) GetSoftwareAssetId() string { + if o == nil || IsNil(o.SoftwareAssetId) { + var ret string + return ret + } + return *o.SoftwareAssetId +} + +// GetSoftwareAssetIdOk returns a tuple with the SoftwareAssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareAssetIdOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareAssetId) { + return nil, false + } + return o.SoftwareAssetId, true +} + +// HasSoftwareAssetId returns a boolean if a field has been set. +func (o *Software) HasSoftwareAssetId() bool { + if o != nil && !IsNil(o.SoftwareAssetId) { + return true + } + + return false +} + +// SetSoftwareAssetId gets a reference to the given string and assigns it to the SoftwareAssetId field. +func (o *Software) SetSoftwareAssetId(v string) { + o.SoftwareAssetId = &v +} + +// GetSoftwareOrganizationId returns the SoftwareOrganizationId field value if set, zero value otherwise. +func (o *Software) GetSoftwareOrganizationId() string { + if o == nil || IsNil(o.SoftwareOrganizationId) { + var ret string + return ret + } + return *o.SoftwareOrganizationId +} + +// GetSoftwareOrganizationIdOk returns a tuple with the SoftwareOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareOrganizationId) { + return nil, false + } + return o.SoftwareOrganizationId, true +} + +// HasSoftwareOrganizationId returns a boolean if a field has been set. +func (o *Software) HasSoftwareOrganizationId() bool { + if o != nil && !IsNil(o.SoftwareOrganizationId) { + return true + } + + return false +} + +// SetSoftwareOrganizationId gets a reference to the given string and assigns it to the SoftwareOrganizationId field. +func (o *Software) SetSoftwareOrganizationId(v string) { + o.SoftwareOrganizationId = &v +} + +// GetSoftwareSourceId returns the SoftwareSourceId field value if set, zero value otherwise. +func (o *Software) GetSoftwareSourceId() int32 { + if o == nil || IsNil(o.SoftwareSourceId) { + var ret int32 + return ret + } + return *o.SoftwareSourceId +} + +// GetSoftwareSourceIdOk returns a tuple with the SoftwareSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.SoftwareSourceId) { + return nil, false + } + return o.SoftwareSourceId, true +} + +// HasSoftwareSourceId returns a boolean if a field has been set. +func (o *Software) HasSoftwareSourceId() bool { + if o != nil && !IsNil(o.SoftwareSourceId) { + return true + } + + return false +} + +// SetSoftwareSourceId gets a reference to the given int32 and assigns it to the SoftwareSourceId field. +func (o *Software) SetSoftwareSourceId(v int32) { + o.SoftwareSourceId = &v +} + +// GetSoftwareCreatedAt returns the SoftwareCreatedAt field value if set, zero value otherwise. +func (o *Software) GetSoftwareCreatedAt() int64 { + if o == nil || IsNil(o.SoftwareCreatedAt) { + var ret int64 + return ret + } + return *o.SoftwareCreatedAt +} + +// GetSoftwareCreatedAtOk returns a tuple with the SoftwareCreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.SoftwareCreatedAt) { + return nil, false + } + return o.SoftwareCreatedAt, true +} + +// HasSoftwareCreatedAt returns a boolean if a field has been set. +func (o *Software) HasSoftwareCreatedAt() bool { + if o != nil && !IsNil(o.SoftwareCreatedAt) { + return true + } + + return false +} + +// SetSoftwareCreatedAt gets a reference to the given int64 and assigns it to the SoftwareCreatedAt field. +func (o *Software) SetSoftwareCreatedAt(v int64) { + o.SoftwareCreatedAt = &v +} + +// GetSoftwareUpdatedAt returns the SoftwareUpdatedAt field value if set, zero value otherwise. +func (o *Software) GetSoftwareUpdatedAt() int64 { + if o == nil || IsNil(o.SoftwareUpdatedAt) { + var ret int64 + return ret + } + return *o.SoftwareUpdatedAt +} + +// GetSoftwareUpdatedAtOk returns a tuple with the SoftwareUpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.SoftwareUpdatedAt) { + return nil, false + } + return o.SoftwareUpdatedAt, true +} + +// HasSoftwareUpdatedAt returns a boolean if a field has been set. +func (o *Software) HasSoftwareUpdatedAt() bool { + if o != nil && !IsNil(o.SoftwareUpdatedAt) { + return true + } + + return false +} + +// SetSoftwareUpdatedAt gets a reference to the given int64 and assigns it to the SoftwareUpdatedAt field. +func (o *Software) SetSoftwareUpdatedAt(v int64) { + o.SoftwareUpdatedAt = &v +} + +// GetSoftwareServiceAddress returns the SoftwareServiceAddress field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Software) GetSoftwareServiceAddress() string { + if o == nil || IsNil(o.SoftwareServiceAddress.Get()) { + var ret string + return ret + } + return *o.SoftwareServiceAddress.Get() +} + +// GetSoftwareServiceAddressOk returns a tuple with the SoftwareServiceAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Software) GetSoftwareServiceAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SoftwareServiceAddress.Get(), o.SoftwareServiceAddress.IsSet() +} + +// HasSoftwareServiceAddress returns a boolean if a field has been set. +func (o *Software) HasSoftwareServiceAddress() bool { + if o != nil && o.SoftwareServiceAddress.IsSet() { + return true + } + + return false +} + +// SetSoftwareServiceAddress gets a reference to the given NullableString and assigns it to the SoftwareServiceAddress field. +func (o *Software) SetSoftwareServiceAddress(v string) { + o.SoftwareServiceAddress.Set(&v) +} +// SetSoftwareServiceAddressNil sets the value for SoftwareServiceAddress to be an explicit nil +func (o *Software) SetSoftwareServiceAddressNil() { + o.SoftwareServiceAddress.Set(nil) +} + +// UnsetSoftwareServiceAddress ensures that no value is present for SoftwareServiceAddress, not even an explicit nil +func (o *Software) UnsetSoftwareServiceAddress() { + o.SoftwareServiceAddress.Unset() +} + +// GetSoftwareServiceTransport returns the SoftwareServiceTransport field value if set, zero value otherwise. +func (o *Software) GetSoftwareServiceTransport() string { + if o == nil || IsNil(o.SoftwareServiceTransport) { + var ret string + return ret + } + return *o.SoftwareServiceTransport +} + +// GetSoftwareServiceTransportOk returns a tuple with the SoftwareServiceTransport field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareServiceTransportOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareServiceTransport) { + return nil, false + } + return o.SoftwareServiceTransport, true +} + +// HasSoftwareServiceTransport returns a boolean if a field has been set. +func (o *Software) HasSoftwareServiceTransport() bool { + if o != nil && !IsNil(o.SoftwareServiceTransport) { + return true + } + + return false +} + +// SetSoftwareServiceTransport gets a reference to the given string and assigns it to the SoftwareServiceTransport field. +func (o *Software) SetSoftwareServiceTransport(v string) { + o.SoftwareServiceTransport = &v +} + +// GetSoftwareServicePort returns the SoftwareServicePort field value if set, zero value otherwise. +func (o *Software) GetSoftwareServicePort() int64 { + if o == nil || IsNil(o.SoftwareServicePort) { + var ret int64 + return ret + } + return *o.SoftwareServicePort +} + +// GetSoftwareServicePortOk returns a tuple with the SoftwareServicePort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareServicePortOk() (*int64, bool) { + if o == nil || IsNil(o.SoftwareServicePort) { + return nil, false + } + return o.SoftwareServicePort, true +} + +// HasSoftwareServicePort returns a boolean if a field has been set. +func (o *Software) HasSoftwareServicePort() bool { + if o != nil && !IsNil(o.SoftwareServicePort) { + return true + } + + return false +} + +// SetSoftwareServicePort gets a reference to the given int64 and assigns it to the SoftwareServicePort field. +func (o *Software) SetSoftwareServicePort(v int64) { + o.SoftwareServicePort = &v +} + +// GetSoftwareInstalledAt returns the SoftwareInstalledAt field value if set, zero value otherwise. +func (o *Software) GetSoftwareInstalledAt() int64 { + if o == nil || IsNil(o.SoftwareInstalledAt) { + var ret int64 + return ret + } + return *o.SoftwareInstalledAt +} + +// GetSoftwareInstalledAtOk returns a tuple with the SoftwareInstalledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareInstalledAtOk() (*int64, bool) { + if o == nil || IsNil(o.SoftwareInstalledAt) { + return nil, false + } + return o.SoftwareInstalledAt, true +} + +// HasSoftwareInstalledAt returns a boolean if a field has been set. +func (o *Software) HasSoftwareInstalledAt() bool { + if o != nil && !IsNil(o.SoftwareInstalledAt) { + return true + } + + return false +} + +// SetSoftwareInstalledAt gets a reference to the given int64 and assigns it to the SoftwareInstalledAt field. +func (o *Software) SetSoftwareInstalledAt(v int64) { + o.SoftwareInstalledAt = &v +} + +// GetSoftwareInstalledSize returns the SoftwareInstalledSize field value if set, zero value otherwise. +func (o *Software) GetSoftwareInstalledSize() int64 { + if o == nil || IsNil(o.SoftwareInstalledSize) { + var ret int64 + return ret + } + return *o.SoftwareInstalledSize +} + +// GetSoftwareInstalledSizeOk returns a tuple with the SoftwareInstalledSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareInstalledSizeOk() (*int64, bool) { + if o == nil || IsNil(o.SoftwareInstalledSize) { + return nil, false + } + return o.SoftwareInstalledSize, true +} + +// HasSoftwareInstalledSize returns a boolean if a field has been set. +func (o *Software) HasSoftwareInstalledSize() bool { + if o != nil && !IsNil(o.SoftwareInstalledSize) { + return true + } + + return false +} + +// SetSoftwareInstalledSize gets a reference to the given int64 and assigns it to the SoftwareInstalledSize field. +func (o *Software) SetSoftwareInstalledSize(v int64) { + o.SoftwareInstalledSize = &v +} + +// GetSoftwareInstalledFrom returns the SoftwareInstalledFrom field value if set, zero value otherwise. +func (o *Software) GetSoftwareInstalledFrom() string { + if o == nil || IsNil(o.SoftwareInstalledFrom) { + var ret string + return ret + } + return *o.SoftwareInstalledFrom +} + +// GetSoftwareInstalledFromOk returns a tuple with the SoftwareInstalledFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareInstalledFromOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareInstalledFrom) { + return nil, false + } + return o.SoftwareInstalledFrom, true +} + +// HasSoftwareInstalledFrom returns a boolean if a field has been set. +func (o *Software) HasSoftwareInstalledFrom() bool { + if o != nil && !IsNil(o.SoftwareInstalledFrom) { + return true + } + + return false +} + +// SetSoftwareInstalledFrom gets a reference to the given string and assigns it to the SoftwareInstalledFrom field. +func (o *Software) SetSoftwareInstalledFrom(v string) { + o.SoftwareInstalledFrom = &v +} + +// GetSoftwareAppId returns the SoftwareAppId field value if set, zero value otherwise. +func (o *Software) GetSoftwareAppId() string { + if o == nil || IsNil(o.SoftwareAppId) { + var ret string + return ret + } + return *o.SoftwareAppId +} + +// GetSoftwareAppIdOk returns a tuple with the SoftwareAppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareAppIdOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareAppId) { + return nil, false + } + return o.SoftwareAppId, true +} + +// HasSoftwareAppId returns a boolean if a field has been set. +func (o *Software) HasSoftwareAppId() bool { + if o != nil && !IsNil(o.SoftwareAppId) { + return true + } + + return false +} + +// SetSoftwareAppId gets a reference to the given string and assigns it to the SoftwareAppId field. +func (o *Software) SetSoftwareAppId(v string) { + o.SoftwareAppId = &v +} + +// GetSoftwarePart returns the SoftwarePart field value if set, zero value otherwise. +func (o *Software) GetSoftwarePart() string { + if o == nil || IsNil(o.SoftwarePart) { + var ret string + return ret + } + return *o.SoftwarePart +} + +// GetSoftwarePartOk returns a tuple with the SoftwarePart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwarePartOk() (*string, bool) { + if o == nil || IsNil(o.SoftwarePart) { + return nil, false + } + return o.SoftwarePart, true +} + +// HasSoftwarePart returns a boolean if a field has been set. +func (o *Software) HasSoftwarePart() bool { + if o != nil && !IsNil(o.SoftwarePart) { + return true + } + + return false +} + +// SetSoftwarePart gets a reference to the given string and assigns it to the SoftwarePart field. +func (o *Software) SetSoftwarePart(v string) { + o.SoftwarePart = &v +} + +// GetSoftwareVendor returns the SoftwareVendor field value if set, zero value otherwise. +func (o *Software) GetSoftwareVendor() string { + if o == nil || IsNil(o.SoftwareVendor) { + var ret string + return ret + } + return *o.SoftwareVendor +} + +// GetSoftwareVendorOk returns a tuple with the SoftwareVendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareVendorOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareVendor) { + return nil, false + } + return o.SoftwareVendor, true +} + +// HasSoftwareVendor returns a boolean if a field has been set. +func (o *Software) HasSoftwareVendor() bool { + if o != nil && !IsNil(o.SoftwareVendor) { + return true + } + + return false +} + +// SetSoftwareVendor gets a reference to the given string and assigns it to the SoftwareVendor field. +func (o *Software) SetSoftwareVendor(v string) { + o.SoftwareVendor = &v +} + +// GetSoftwareProduct returns the SoftwareProduct field value if set, zero value otherwise. +func (o *Software) GetSoftwareProduct() string { + if o == nil || IsNil(o.SoftwareProduct) { + var ret string + return ret + } + return *o.SoftwareProduct +} + +// GetSoftwareProductOk returns a tuple with the SoftwareProduct field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareProductOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareProduct) { + return nil, false + } + return o.SoftwareProduct, true +} + +// HasSoftwareProduct returns a boolean if a field has been set. +func (o *Software) HasSoftwareProduct() bool { + if o != nil && !IsNil(o.SoftwareProduct) { + return true + } + + return false +} + +// SetSoftwareProduct gets a reference to the given string and assigns it to the SoftwareProduct field. +func (o *Software) SetSoftwareProduct(v string) { + o.SoftwareProduct = &v +} + +// GetSoftwareVersion returns the SoftwareVersion field value if set, zero value otherwise. +func (o *Software) GetSoftwareVersion() string { + if o == nil || IsNil(o.SoftwareVersion) { + var ret string + return ret + } + return *o.SoftwareVersion +} + +// GetSoftwareVersionOk returns a tuple with the SoftwareVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareVersionOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareVersion) { + return nil, false + } + return o.SoftwareVersion, true +} + +// HasSoftwareVersion returns a boolean if a field has been set. +func (o *Software) HasSoftwareVersion() bool { + if o != nil && !IsNil(o.SoftwareVersion) { + return true + } + + return false +} + +// SetSoftwareVersion gets a reference to the given string and assigns it to the SoftwareVersion field. +func (o *Software) SetSoftwareVersion(v string) { + o.SoftwareVersion = &v +} + +// GetSoftwareUpdate returns the SoftwareUpdate field value if set, zero value otherwise. +func (o *Software) GetSoftwareUpdate() string { + if o == nil || IsNil(o.SoftwareUpdate) { + var ret string + return ret + } + return *o.SoftwareUpdate +} + +// GetSoftwareUpdateOk returns a tuple with the SoftwareUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareUpdateOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareUpdate) { + return nil, false + } + return o.SoftwareUpdate, true +} + +// HasSoftwareUpdate returns a boolean if a field has been set. +func (o *Software) HasSoftwareUpdate() bool { + if o != nil && !IsNil(o.SoftwareUpdate) { + return true + } + + return false +} + +// SetSoftwareUpdate gets a reference to the given string and assigns it to the SoftwareUpdate field. +func (o *Software) SetSoftwareUpdate(v string) { + o.SoftwareUpdate = &v +} + +// GetSoftwareEdition returns the SoftwareEdition field value if set, zero value otherwise. +func (o *Software) GetSoftwareEdition() string { + if o == nil || IsNil(o.SoftwareEdition) { + var ret string + return ret + } + return *o.SoftwareEdition +} + +// GetSoftwareEditionOk returns a tuple with the SoftwareEdition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareEditionOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareEdition) { + return nil, false + } + return o.SoftwareEdition, true +} + +// HasSoftwareEdition returns a boolean if a field has been set. +func (o *Software) HasSoftwareEdition() bool { + if o != nil && !IsNil(o.SoftwareEdition) { + return true + } + + return false +} + +// SetSoftwareEdition gets a reference to the given string and assigns it to the SoftwareEdition field. +func (o *Software) SetSoftwareEdition(v string) { + o.SoftwareEdition = &v +} + +// GetSoftwareLanguage returns the SoftwareLanguage field value if set, zero value otherwise. +func (o *Software) GetSoftwareLanguage() string { + if o == nil || IsNil(o.SoftwareLanguage) { + var ret string + return ret + } + return *o.SoftwareLanguage +} + +// GetSoftwareLanguageOk returns a tuple with the SoftwareLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareLanguageOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareLanguage) { + return nil, false + } + return o.SoftwareLanguage, true +} + +// HasSoftwareLanguage returns a boolean if a field has been set. +func (o *Software) HasSoftwareLanguage() bool { + if o != nil && !IsNil(o.SoftwareLanguage) { + return true + } + + return false +} + +// SetSoftwareLanguage gets a reference to the given string and assigns it to the SoftwareLanguage field. +func (o *Software) SetSoftwareLanguage(v string) { + o.SoftwareLanguage = &v +} + +// GetSoftwareSwEdition returns the SoftwareSwEdition field value if set, zero value otherwise. +func (o *Software) GetSoftwareSwEdition() string { + if o == nil || IsNil(o.SoftwareSwEdition) { + var ret string + return ret + } + return *o.SoftwareSwEdition +} + +// GetSoftwareSwEditionOk returns a tuple with the SoftwareSwEdition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareSwEditionOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareSwEdition) { + return nil, false + } + return o.SoftwareSwEdition, true +} + +// HasSoftwareSwEdition returns a boolean if a field has been set. +func (o *Software) HasSoftwareSwEdition() bool { + if o != nil && !IsNil(o.SoftwareSwEdition) { + return true + } + + return false +} + +// SetSoftwareSwEdition gets a reference to the given string and assigns it to the SoftwareSwEdition field. +func (o *Software) SetSoftwareSwEdition(v string) { + o.SoftwareSwEdition = &v +} + +// GetSoftwareTargetSw returns the SoftwareTargetSw field value if set, zero value otherwise. +func (o *Software) GetSoftwareTargetSw() string { + if o == nil || IsNil(o.SoftwareTargetSw) { + var ret string + return ret + } + return *o.SoftwareTargetSw +} + +// GetSoftwareTargetSwOk returns a tuple with the SoftwareTargetSw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareTargetSwOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareTargetSw) { + return nil, false + } + return o.SoftwareTargetSw, true +} + +// HasSoftwareTargetSw returns a boolean if a field has been set. +func (o *Software) HasSoftwareTargetSw() bool { + if o != nil && !IsNil(o.SoftwareTargetSw) { + return true + } + + return false +} + +// SetSoftwareTargetSw gets a reference to the given string and assigns it to the SoftwareTargetSw field. +func (o *Software) SetSoftwareTargetSw(v string) { + o.SoftwareTargetSw = &v +} + +// GetSoftwareTargetHw returns the SoftwareTargetHw field value if set, zero value otherwise. +func (o *Software) GetSoftwareTargetHw() string { + if o == nil || IsNil(o.SoftwareTargetHw) { + var ret string + return ret + } + return *o.SoftwareTargetHw +} + +// GetSoftwareTargetHwOk returns a tuple with the SoftwareTargetHw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareTargetHwOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareTargetHw) { + return nil, false + } + return o.SoftwareTargetHw, true +} + +// HasSoftwareTargetHw returns a boolean if a field has been set. +func (o *Software) HasSoftwareTargetHw() bool { + if o != nil && !IsNil(o.SoftwareTargetHw) { + return true + } + + return false +} + +// SetSoftwareTargetHw gets a reference to the given string and assigns it to the SoftwareTargetHw field. +func (o *Software) SetSoftwareTargetHw(v string) { + o.SoftwareTargetHw = &v +} + +// GetSoftwareOther returns the SoftwareOther field value if set, zero value otherwise. +func (o *Software) GetSoftwareOther() string { + if o == nil || IsNil(o.SoftwareOther) { + var ret string + return ret + } + return *o.SoftwareOther +} + +// GetSoftwareOtherOk returns a tuple with the SoftwareOther field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareOtherOk() (*string, bool) { + if o == nil || IsNil(o.SoftwareOther) { + return nil, false + } + return o.SoftwareOther, true +} + +// HasSoftwareOther returns a boolean if a field has been set. +func (o *Software) HasSoftwareOther() bool { + if o != nil && !IsNil(o.SoftwareOther) { + return true + } + + return false +} + +// SetSoftwareOther gets a reference to the given string and assigns it to the SoftwareOther field. +func (o *Software) SetSoftwareOther(v string) { + o.SoftwareOther = &v +} + +// GetSoftwareCpe23 returns the SoftwareCpe23 field value if set, zero value otherwise. +func (o *Software) GetSoftwareCpe23() string { + if o == nil || IsNil(o.SoftwareCpe23) { + var ret string + return ret + } + return *o.SoftwareCpe23 +} + +// GetSoftwareCpe23Ok returns a tuple with the SoftwareCpe23 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareCpe23Ok() (*string, bool) { + if o == nil || IsNil(o.SoftwareCpe23) { + return nil, false + } + return o.SoftwareCpe23, true +} + +// HasSoftwareCpe23 returns a boolean if a field has been set. +func (o *Software) HasSoftwareCpe23() bool { + if o != nil && !IsNil(o.SoftwareCpe23) { + return true + } + + return false +} + +// SetSoftwareCpe23 gets a reference to the given string and assigns it to the SoftwareCpe23 field. +func (o *Software) SetSoftwareCpe23(v string) { + o.SoftwareCpe23 = &v +} + +// GetSoftwareAttributes returns the SoftwareAttributes field value if set, zero value otherwise. +func (o *Software) GetSoftwareAttributes() map[string]string { + if o == nil || IsNil(o.SoftwareAttributes) { + var ret map[string]string + return ret + } + return *o.SoftwareAttributes +} + +// GetSoftwareAttributesOk returns a tuple with the SoftwareAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Software) GetSoftwareAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.SoftwareAttributes) { + return nil, false + } + return o.SoftwareAttributes, true +} + +// HasSoftwareAttributes returns a boolean if a field has been set. +func (o *Software) HasSoftwareAttributes() bool { + if o != nil && !IsNil(o.SoftwareAttributes) { + return true + } + + return false +} + +// SetSoftwareAttributes gets a reference to the given map[string]string and assigns it to the SoftwareAttributes field. +func (o *Software) SetSoftwareAttributes(v map[string]string) { + o.SoftwareAttributes = &v +} + +func (o Software) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Software) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.SoftwareId) { + toSerialize["software_id"] = o.SoftwareId + } + if !IsNil(o.SoftwareAssetId) { + toSerialize["software_asset_id"] = o.SoftwareAssetId + } + if !IsNil(o.SoftwareOrganizationId) { + toSerialize["software_organization_id"] = o.SoftwareOrganizationId + } + if !IsNil(o.SoftwareSourceId) { + toSerialize["software_source_id"] = o.SoftwareSourceId + } + if !IsNil(o.SoftwareCreatedAt) { + toSerialize["software_created_at"] = o.SoftwareCreatedAt + } + if !IsNil(o.SoftwareUpdatedAt) { + toSerialize["software_updated_at"] = o.SoftwareUpdatedAt + } + if o.SoftwareServiceAddress.IsSet() { + toSerialize["software_service_address"] = o.SoftwareServiceAddress.Get() + } + if !IsNil(o.SoftwareServiceTransport) { + toSerialize["software_service_transport"] = o.SoftwareServiceTransport + } + if !IsNil(o.SoftwareServicePort) { + toSerialize["software_service_port"] = o.SoftwareServicePort + } + if !IsNil(o.SoftwareInstalledAt) { + toSerialize["software_installed_at"] = o.SoftwareInstalledAt + } + if !IsNil(o.SoftwareInstalledSize) { + toSerialize["software_installed_size"] = o.SoftwareInstalledSize + } + if !IsNil(o.SoftwareInstalledFrom) { + toSerialize["software_installed_from"] = o.SoftwareInstalledFrom + } + if !IsNil(o.SoftwareAppId) { + toSerialize["software_app_id"] = o.SoftwareAppId + } + if !IsNil(o.SoftwarePart) { + toSerialize["software_part"] = o.SoftwarePart + } + if !IsNil(o.SoftwareVendor) { + toSerialize["software_vendor"] = o.SoftwareVendor + } + if !IsNil(o.SoftwareProduct) { + toSerialize["software_product"] = o.SoftwareProduct + } + if !IsNil(o.SoftwareVersion) { + toSerialize["software_version"] = o.SoftwareVersion + } + if !IsNil(o.SoftwareUpdate) { + toSerialize["software_update"] = o.SoftwareUpdate + } + if !IsNil(o.SoftwareEdition) { + toSerialize["software_edition"] = o.SoftwareEdition + } + if !IsNil(o.SoftwareLanguage) { + toSerialize["software_language"] = o.SoftwareLanguage + } + if !IsNil(o.SoftwareSwEdition) { + toSerialize["software_sw_edition"] = o.SoftwareSwEdition + } + if !IsNil(o.SoftwareTargetSw) { + toSerialize["software_target_sw"] = o.SoftwareTargetSw + } + if !IsNil(o.SoftwareTargetHw) { + toSerialize["software_target_hw"] = o.SoftwareTargetHw + } + if !IsNil(o.SoftwareOther) { + toSerialize["software_other"] = o.SoftwareOther + } + if !IsNil(o.SoftwareCpe23) { + toSerialize["software_cpe23"] = o.SoftwareCpe23 + } + if !IsNil(o.SoftwareAttributes) { + toSerialize["software_attributes"] = o.SoftwareAttributes + } + return toSerialize, nil +} + +func (o *Software) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSoftware := _Software{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSoftware) + + if err != nil { + return err + } + + *o = Software(varSoftware) + + return err +} + +type NullableSoftware struct { + value *Software + isSet bool +} + +func (v NullableSoftware) Get() *Software { + return v.value +} + +func (v *NullableSoftware) Set(val *Software) { + v.value = val + v.isSet = true +} + +func (v NullableSoftware) IsSet() bool { + return v.isSet +} + +func (v *NullableSoftware) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSoftware(val *Software) *NullableSoftware { + return &NullableSoftware{value: val, isSet: true} +} + +func (v NullableSoftware) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSoftware) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_software_export_response.go b/go/model_software_export_response.go new file mode 100644 index 0000000..54124b9 --- /dev/null +++ b/go/model_software_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// SoftwareExportResponse - Response body for the software export endpoint. Bare array unless `page_size` is provided. +type SoftwareExportResponse struct { + SoftwarePage *SoftwarePage + ArrayOfSoftware *[]Software +} + +// SoftwarePageAsSoftwareExportResponse is a convenience function that returns SoftwarePage wrapped in SoftwareExportResponse +func SoftwarePageAsSoftwareExportResponse(v *SoftwarePage) SoftwareExportResponse { + return SoftwareExportResponse{ + SoftwarePage: v, + } +} + +// []SoftwareAsSoftwareExportResponse is a convenience function that returns []Software wrapped in SoftwareExportResponse +func ArrayOfSoftwareAsSoftwareExportResponse(v *[]Software) SoftwareExportResponse { + return SoftwareExportResponse{ + ArrayOfSoftware: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *SoftwareExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into SoftwarePage + err = newStrictDecoder(data).Decode(&dst.SoftwarePage) + if err == nil { + jsonSoftwarePage, _ := json.Marshal(dst.SoftwarePage) + if string(jsonSoftwarePage) == "{}" { // empty struct + dst.SoftwarePage = nil + } else { + if err = validator.Validate(dst.SoftwarePage); err != nil { + dst.SoftwarePage = nil + } else { + match++ + } + } + } else { + dst.SoftwarePage = nil + } + + // try to unmarshal data into ArrayOfSoftware + err = newStrictDecoder(data).Decode(&dst.ArrayOfSoftware) + if err == nil { + jsonArrayOfSoftware, _ := json.Marshal(dst.ArrayOfSoftware) + if string(jsonArrayOfSoftware) == "{}" { // empty struct + dst.ArrayOfSoftware = nil + } else { + if err = validator.Validate(dst.ArrayOfSoftware); err != nil { + dst.ArrayOfSoftware = nil + } else { + match++ + } + } + } else { + dst.ArrayOfSoftware = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.SoftwarePage = nil + dst.ArrayOfSoftware = nil + + return fmt.Errorf("data matches more than one schema in oneOf(SoftwareExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(SoftwareExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src SoftwareExportResponse) MarshalJSON() ([]byte, error) { + if src.SoftwarePage != nil { + return json.Marshal(&src.SoftwarePage) + } + + if src.ArrayOfSoftware != nil { + return json.Marshal(&src.ArrayOfSoftware) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *SoftwareExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.SoftwarePage != nil { + return obj.SoftwarePage + } + + if obj.ArrayOfSoftware != nil { + return obj.ArrayOfSoftware + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj SoftwareExportResponse) GetActualInstanceValue() (interface{}) { + if obj.SoftwarePage != nil { + return *obj.SoftwarePage + } + + if obj.ArrayOfSoftware != nil { + return *obj.ArrayOfSoftware + } + + // all schemas are nil + return nil +} + +type NullableSoftwareExportResponse struct { + value *SoftwareExportResponse + isSet bool +} + +func (v NullableSoftwareExportResponse) Get() *SoftwareExportResponse { + return v.value +} + +func (v *NullableSoftwareExportResponse) Set(val *SoftwareExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSoftwareExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSoftwareExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSoftwareExportResponse(val *SoftwareExportResponse) *NullableSoftwareExportResponse { + return &NullableSoftwareExportResponse{value: val, isSet: true} +} + +func (v NullableSoftwareExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSoftwareExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_software_page.go b/go/model_software_page.go new file mode 100644 index 0000000..00850c0 --- /dev/null +++ b/go/model_software_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the SoftwarePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SoftwarePage{} + +// SoftwarePage A page of software inventory entries returned from a paginated export. +type SoftwarePage struct { + Software []Software `json:"software,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewSoftwarePage instantiates a new SoftwarePage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSoftwarePage() *SoftwarePage { + this := SoftwarePage{} + return &this +} + +// NewSoftwarePageWithDefaults instantiates a new SoftwarePage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSoftwarePageWithDefaults() *SoftwarePage { + this := SoftwarePage{} + return &this +} + +// GetSoftware returns the Software field value if set, zero value otherwise. +func (o *SoftwarePage) GetSoftware() []Software { + if o == nil || IsNil(o.Software) { + var ret []Software + return ret + } + return o.Software +} + +// GetSoftwareOk returns a tuple with the Software field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SoftwarePage) GetSoftwareOk() ([]Software, bool) { + if o == nil || IsNil(o.Software) { + return nil, false + } + return o.Software, true +} + +// HasSoftware returns a boolean if a field has been set. +func (o *SoftwarePage) HasSoftware() bool { + if o != nil && !IsNil(o.Software) { + return true + } + + return false +} + +// SetSoftware gets a reference to the given []Software and assigns it to the Software field. +func (o *SoftwarePage) SetSoftware(v []Software) { + o.Software = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *SoftwarePage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SoftwarePage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *SoftwarePage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *SoftwarePage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o SoftwarePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SoftwarePage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Software) { + toSerialize["software"] = o.Software + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableSoftwarePage struct { + value *SoftwarePage + isSet bool +} + +func (v NullableSoftwarePage) Get() *SoftwarePage { + return v.value +} + +func (v *NullableSoftwarePage) Set(val *SoftwarePage) { + v.value = val + v.isSet = true +} + +func (v NullableSoftwarePage) IsSet() bool { + return v.isSet +} + +func (v *NullableSoftwarePage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSoftwarePage(val *SoftwarePage) *NullableSoftwarePage { + return &NullableSoftwarePage{value: val, isSet: true} +} + +func (v NullableSoftwarePage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSoftwarePage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_tanium_credential_fields.go b/go/model_tanium_credential_fields.go new file mode 100644 index 0000000..7e11652 --- /dev/null +++ b/go/model_tanium_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TaniumCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaniumCredentialFields{} + +// TaniumCredentialFields struct for TaniumCredentialFields +type TaniumCredentialFields struct { + ApiUrl string `json:"api_url"` + ApiToken string `json:"api_token"` +} + +type _TaniumCredentialFields TaniumCredentialFields + +// NewTaniumCredentialFields instantiates a new TaniumCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaniumCredentialFields(apiUrl string, apiToken string) *TaniumCredentialFields { + this := TaniumCredentialFields{} + this.ApiUrl = apiUrl + this.ApiToken = apiToken + return &this +} + +// NewTaniumCredentialFieldsWithDefaults instantiates a new TaniumCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaniumCredentialFieldsWithDefaults() *TaniumCredentialFields { + this := TaniumCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *TaniumCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *TaniumCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *TaniumCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetApiToken returns the ApiToken field value +func (o *TaniumCredentialFields) GetApiToken() string { + if o == nil { + var ret string + return ret + } + + return o.ApiToken +} + +// GetApiTokenOk returns a tuple with the ApiToken field value +// and a boolean to check if the value has been set. +func (o *TaniumCredentialFields) GetApiTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiToken, true +} + +// SetApiToken sets field value +func (o *TaniumCredentialFields) SetApiToken(v string) { + o.ApiToken = v +} + +func (o TaniumCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaniumCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["api_token"] = o.ApiToken + return toSerialize, nil +} + +func (o *TaniumCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "api_token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTaniumCredentialFields := _TaniumCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTaniumCredentialFields) + + if err != nil { + return err + } + + *o = TaniumCredentialFields(varTaniumCredentialFields) + + return err +} + +type NullableTaniumCredentialFields struct { + value *TaniumCredentialFields + isSet bool +} + +func (v NullableTaniumCredentialFields) Get() *TaniumCredentialFields { + return v.value +} + +func (v *NullableTaniumCredentialFields) Set(val *TaniumCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableTaniumCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTaniumCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaniumCredentialFields(val *TaniumCredentialFields) *NullableTaniumCredentialFields { + return &NullableTaniumCredentialFields{value: val, isSet: true} +} + +func (v NullableTaniumCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaniumCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_task.go b/go/model_task.go index cf8008d..ee9c955 100644 --- a/go/model_task.go +++ b/go/model_task.go @@ -1,47 +1,62 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) -// Task struct for Task +// checks if the Task type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Task{} + +// Task A task object type Task struct { - Id string `json:"id"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - ClientId *string `json:"client_id,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - AgentId *string `json:"agent_id,omitempty"` - SiteId *string `json:"site_id,omitempty"` - CruncherId *string `json:"cruncher_id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - CreatedBy *string `json:"created_by,omitempty"` - CreatedByUserId *string `json:"created_by_user_id,omitempty"` - UpdatedAt *int64 `json:"updated_at,omitempty"` - Type *string `json:"type,omitempty"` - Status *string `json:"status,omitempty"` - Error *string `json:"error,omitempty"` - Params *map[string]string `json:"params,omitempty"` - Stats *map[string]interface{} `json:"stats,omitempty"` - Hidden *bool `json:"hidden,omitempty"` - ParentId *string `json:"parent_id,omitempty"` - Recur *bool `json:"recur,omitempty"` - RecurFrequency *string `json:"recur_frequency,omitempty"` - StartTime *int64 `json:"start_time,omitempty"` - RecurLast *int64 `json:"recur_last,omitempty"` - RecurNext *int64 `json:"recur_next,omitempty"` - RecurLastTaskId *string `json:"recur_last_task_id,omitempty"` -} + Id string `json:"id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + // The ID of the Hosted Zone which executes the task. If the + HostedZoneId *string `json:"hosted_zone_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + CruncherId *string `json:"cruncher_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CreatedBy *string `json:"created_by,omitempty"` + CreatedByUserId *string `json:"created_by_user_id,omitempty"` + // The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. + CustomIntegrationId *string `json:"custom_integration_id,omitempty"` + // The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. + SourceId *int32 `json:"source_id,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Type *string `json:"type,omitempty"` + Status *string `json:"status,omitempty"` + Error *string `json:"error,omitempty"` + Params *map[string]string `json:"params,omitempty"` + Stats map[string]interface{} `json:"stats,omitempty"` + Hidden *bool `json:"hidden,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Recur *bool `json:"recur,omitempty"` + RecurFrequency *string `json:"recur_frequency,omitempty"` + StartTime *int64 `json:"start_time,omitempty"` + RecurLast *int64 `json:"recur_last,omitempty"` + RecurNext *int64 `json:"recur_next,omitempty"` + RecurLastTaskId *string `json:"recur_last_task_id,omitempty"` +} + +type _Task Task // NewTask instantiates a new Task object // This constructor will assign default values to properties that have it defined, @@ -87,7 +102,7 @@ func (o *Task) SetId(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *Task) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -97,7 +112,7 @@ func (o *Task) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -105,7 +120,7 @@ func (o *Task) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *Task) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -119,7 +134,7 @@ func (o *Task) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *Task) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -129,7 +144,7 @@ func (o *Task) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -137,7 +152,7 @@ func (o *Task) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *Task) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -149,9 +164,41 @@ func (o *Task) SetDescription(v string) { o.Description = &v } +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *Task) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Task) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *Task) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *Task) SetTemplateId(v string) { + o.TemplateId = &v +} + // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *Task) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -161,7 +208,7 @@ func (o *Task) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -169,7 +216,7 @@ func (o *Task) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *Task) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -183,7 +230,7 @@ func (o *Task) SetClientId(v string) { // GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. func (o *Task) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { var ret string return ret } @@ -193,7 +240,7 @@ func (o *Task) GetOrganizationId() string { // GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { return nil, false } return o.OrganizationId, true @@ -201,7 +248,7 @@ func (o *Task) GetOrganizationIdOk() (*string, bool) { // HasOrganizationId returns a boolean if a field has been set. func (o *Task) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { + if o != nil && !IsNil(o.OrganizationId) { return true } @@ -215,7 +262,7 @@ func (o *Task) SetOrganizationId(v string) { // GetAgentId returns the AgentId field value if set, zero value otherwise. func (o *Task) GetAgentId() string { - if o == nil || o.AgentId == nil { + if o == nil || IsNil(o.AgentId) { var ret string return ret } @@ -225,7 +272,7 @@ func (o *Task) GetAgentId() string { // GetAgentIdOk returns a tuple with the AgentId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetAgentIdOk() (*string, bool) { - if o == nil || o.AgentId == nil { + if o == nil || IsNil(o.AgentId) { return nil, false } return o.AgentId, true @@ -233,7 +280,7 @@ func (o *Task) GetAgentIdOk() (*string, bool) { // HasAgentId returns a boolean if a field has been set. func (o *Task) HasAgentId() bool { - if o != nil && o.AgentId != nil { + if o != nil && !IsNil(o.AgentId) { return true } @@ -245,9 +292,41 @@ func (o *Task) SetAgentId(v string) { o.AgentId = &v } +// GetHostedZoneId returns the HostedZoneId field value if set, zero value otherwise. +func (o *Task) GetHostedZoneId() string { + if o == nil || IsNil(o.HostedZoneId) { + var ret string + return ret + } + return *o.HostedZoneId +} + +// GetHostedZoneIdOk returns a tuple with the HostedZoneId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Task) GetHostedZoneIdOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneId) { + return nil, false + } + return o.HostedZoneId, true +} + +// HasHostedZoneId returns a boolean if a field has been set. +func (o *Task) HasHostedZoneId() bool { + if o != nil && !IsNil(o.HostedZoneId) { + return true + } + + return false +} + +// SetHostedZoneId gets a reference to the given string and assigns it to the HostedZoneId field. +func (o *Task) SetHostedZoneId(v string) { + o.HostedZoneId = &v +} + // GetSiteId returns the SiteId field value if set, zero value otherwise. func (o *Task) GetSiteId() string { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { var ret string return ret } @@ -257,7 +336,7 @@ func (o *Task) GetSiteId() string { // GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetSiteIdOk() (*string, bool) { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { return nil, false } return o.SiteId, true @@ -265,7 +344,7 @@ func (o *Task) GetSiteIdOk() (*string, bool) { // HasSiteId returns a boolean if a field has been set. func (o *Task) HasSiteId() bool { - if o != nil && o.SiteId != nil { + if o != nil && !IsNil(o.SiteId) { return true } @@ -279,7 +358,7 @@ func (o *Task) SetSiteId(v string) { // GetCruncherId returns the CruncherId field value if set, zero value otherwise. func (o *Task) GetCruncherId() string { - if o == nil || o.CruncherId == nil { + if o == nil || IsNil(o.CruncherId) { var ret string return ret } @@ -289,7 +368,7 @@ func (o *Task) GetCruncherId() string { // GetCruncherIdOk returns a tuple with the CruncherId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetCruncherIdOk() (*string, bool) { - if o == nil || o.CruncherId == nil { + if o == nil || IsNil(o.CruncherId) { return nil, false } return o.CruncherId, true @@ -297,7 +376,7 @@ func (o *Task) GetCruncherIdOk() (*string, bool) { // HasCruncherId returns a boolean if a field has been set. func (o *Task) HasCruncherId() bool { - if o != nil && o.CruncherId != nil { + if o != nil && !IsNil(o.CruncherId) { return true } @@ -311,7 +390,7 @@ func (o *Task) SetCruncherId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Task) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -321,7 +400,7 @@ func (o *Task) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -329,7 +408,7 @@ func (o *Task) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Task) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -343,7 +422,7 @@ func (o *Task) SetCreatedAt(v int64) { // GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. func (o *Task) GetCreatedBy() string { - if o == nil || o.CreatedBy == nil { + if o == nil || IsNil(o.CreatedBy) { var ret string return ret } @@ -353,7 +432,7 @@ func (o *Task) GetCreatedBy() string { // GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetCreatedByOk() (*string, bool) { - if o == nil || o.CreatedBy == nil { + if o == nil || IsNil(o.CreatedBy) { return nil, false } return o.CreatedBy, true @@ -361,7 +440,7 @@ func (o *Task) GetCreatedByOk() (*string, bool) { // HasCreatedBy returns a boolean if a field has been set. func (o *Task) HasCreatedBy() bool { - if o != nil && o.CreatedBy != nil { + if o != nil && !IsNil(o.CreatedBy) { return true } @@ -375,7 +454,7 @@ func (o *Task) SetCreatedBy(v string) { // GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. func (o *Task) GetCreatedByUserId() string { - if o == nil || o.CreatedByUserId == nil { + if o == nil || IsNil(o.CreatedByUserId) { var ret string return ret } @@ -385,7 +464,7 @@ func (o *Task) GetCreatedByUserId() string { // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetCreatedByUserIdOk() (*string, bool) { - if o == nil || o.CreatedByUserId == nil { + if o == nil || IsNil(o.CreatedByUserId) { return nil, false } return o.CreatedByUserId, true @@ -393,7 +472,7 @@ func (o *Task) GetCreatedByUserIdOk() (*string, bool) { // HasCreatedByUserId returns a boolean if a field has been set. func (o *Task) HasCreatedByUserId() bool { - if o != nil && o.CreatedByUserId != nil { + if o != nil && !IsNil(o.CreatedByUserId) { return true } @@ -405,9 +484,73 @@ func (o *Task) SetCreatedByUserId(v string) { o.CreatedByUserId = &v } +// GetCustomIntegrationId returns the CustomIntegrationId field value if set, zero value otherwise. +func (o *Task) GetCustomIntegrationId() string { + if o == nil || IsNil(o.CustomIntegrationId) { + var ret string + return ret + } + return *o.CustomIntegrationId +} + +// GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Task) GetCustomIntegrationIdOk() (*string, bool) { + if o == nil || IsNil(o.CustomIntegrationId) { + return nil, false + } + return o.CustomIntegrationId, true +} + +// HasCustomIntegrationId returns a boolean if a field has been set. +func (o *Task) HasCustomIntegrationId() bool { + if o != nil && !IsNil(o.CustomIntegrationId) { + return true + } + + return false +} + +// SetCustomIntegrationId gets a reference to the given string and assigns it to the CustomIntegrationId field. +func (o *Task) SetCustomIntegrationId(v string) { + o.CustomIntegrationId = &v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *Task) GetSourceId() int32 { + if o == nil || IsNil(o.SourceId) { + var ret int32 + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Task) GetSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *Task) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given int32 and assigns it to the SourceId field. +func (o *Task) SetSourceId(v int32) { + o.SourceId = &v +} + // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Task) GetUpdatedAt() int64 { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { var ret int64 return ret } @@ -417,7 +560,7 @@ func (o *Task) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetUpdatedAtOk() (*int64, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -425,7 +568,7 @@ func (o *Task) GetUpdatedAtOk() (*int64, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Task) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } @@ -439,7 +582,7 @@ func (o *Task) SetUpdatedAt(v int64) { // GetType returns the Type field value if set, zero value otherwise. func (o *Task) GetType() string { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret string return ret } @@ -449,7 +592,7 @@ func (o *Task) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -457,7 +600,7 @@ func (o *Task) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *Task) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -471,7 +614,7 @@ func (o *Task) SetType(v string) { // GetStatus returns the Status field value if set, zero value otherwise. func (o *Task) GetStatus() string { - if o == nil || o.Status == nil { + if o == nil || IsNil(o.Status) { var ret string return ret } @@ -481,7 +624,7 @@ func (o *Task) GetStatus() string { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { + if o == nil || IsNil(o.Status) { return nil, false } return o.Status, true @@ -489,7 +632,7 @@ func (o *Task) GetStatusOk() (*string, bool) { // HasStatus returns a boolean if a field has been set. func (o *Task) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !IsNil(o.Status) { return true } @@ -503,7 +646,7 @@ func (o *Task) SetStatus(v string) { // GetError returns the Error field value if set, zero value otherwise. func (o *Task) GetError() string { - if o == nil || o.Error == nil { + if o == nil || IsNil(o.Error) { var ret string return ret } @@ -513,7 +656,7 @@ func (o *Task) GetError() string { // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetErrorOk() (*string, bool) { - if o == nil || o.Error == nil { + if o == nil || IsNil(o.Error) { return nil, false } return o.Error, true @@ -521,7 +664,7 @@ func (o *Task) GetErrorOk() (*string, bool) { // HasError returns a boolean if a field has been set. func (o *Task) HasError() bool { - if o != nil && o.Error != nil { + if o != nil && !IsNil(o.Error) { return true } @@ -535,7 +678,7 @@ func (o *Task) SetError(v string) { // GetParams returns the Params field value if set, zero value otherwise. func (o *Task) GetParams() map[string]string { - if o == nil || o.Params == nil { + if o == nil || IsNil(o.Params) { var ret map[string]string return ret } @@ -545,7 +688,7 @@ func (o *Task) GetParams() map[string]string { // GetParamsOk returns a tuple with the Params field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetParamsOk() (*map[string]string, bool) { - if o == nil || o.Params == nil { + if o == nil || IsNil(o.Params) { return nil, false } return o.Params, true @@ -553,7 +696,7 @@ func (o *Task) GetParamsOk() (*map[string]string, bool) { // HasParams returns a boolean if a field has been set. func (o *Task) HasParams() bool { - if o != nil && o.Params != nil { + if o != nil && !IsNil(o.Params) { return true } @@ -567,25 +710,25 @@ func (o *Task) SetParams(v map[string]string) { // GetStats returns the Stats field value if set, zero value otherwise. func (o *Task) GetStats() map[string]interface{} { - if o == nil || o.Stats == nil { + if o == nil || IsNil(o.Stats) { var ret map[string]interface{} return ret } - return *o.Stats + return o.Stats } // GetStatsOk returns a tuple with the Stats field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Task) GetStatsOk() (*map[string]interface{}, bool) { - if o == nil || o.Stats == nil { - return nil, false +func (o *Task) GetStatsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Stats) { + return map[string]interface{}{}, false } return o.Stats, true } // HasStats returns a boolean if a field has been set. func (o *Task) HasStats() bool { - if o != nil && o.Stats != nil { + if o != nil && !IsNil(o.Stats) { return true } @@ -594,12 +737,12 @@ func (o *Task) HasStats() bool { // SetStats gets a reference to the given map[string]interface{} and assigns it to the Stats field. func (o *Task) SetStats(v map[string]interface{}) { - o.Stats = &v + o.Stats = v } // GetHidden returns the Hidden field value if set, zero value otherwise. func (o *Task) GetHidden() bool { - if o == nil || o.Hidden == nil { + if o == nil || IsNil(o.Hidden) { var ret bool return ret } @@ -609,7 +752,7 @@ func (o *Task) GetHidden() bool { // GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetHiddenOk() (*bool, bool) { - if o == nil || o.Hidden == nil { + if o == nil || IsNil(o.Hidden) { return nil, false } return o.Hidden, true @@ -617,7 +760,7 @@ func (o *Task) GetHiddenOk() (*bool, bool) { // HasHidden returns a boolean if a field has been set. func (o *Task) HasHidden() bool { - if o != nil && o.Hidden != nil { + if o != nil && !IsNil(o.Hidden) { return true } @@ -631,7 +774,7 @@ func (o *Task) SetHidden(v bool) { // GetParentId returns the ParentId field value if set, zero value otherwise. func (o *Task) GetParentId() string { - if o == nil || o.ParentId == nil { + if o == nil || IsNil(o.ParentId) { var ret string return ret } @@ -641,7 +784,7 @@ func (o *Task) GetParentId() string { // GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetParentIdOk() (*string, bool) { - if o == nil || o.ParentId == nil { + if o == nil || IsNil(o.ParentId) { return nil, false } return o.ParentId, true @@ -649,7 +792,7 @@ func (o *Task) GetParentIdOk() (*string, bool) { // HasParentId returns a boolean if a field has been set. func (o *Task) HasParentId() bool { - if o != nil && o.ParentId != nil { + if o != nil && !IsNil(o.ParentId) { return true } @@ -663,7 +806,7 @@ func (o *Task) SetParentId(v string) { // GetRecur returns the Recur field value if set, zero value otherwise. func (o *Task) GetRecur() bool { - if o == nil || o.Recur == nil { + if o == nil || IsNil(o.Recur) { var ret bool return ret } @@ -673,7 +816,7 @@ func (o *Task) GetRecur() bool { // GetRecurOk returns a tuple with the Recur field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetRecurOk() (*bool, bool) { - if o == nil || o.Recur == nil { + if o == nil || IsNil(o.Recur) { return nil, false } return o.Recur, true @@ -681,7 +824,7 @@ func (o *Task) GetRecurOk() (*bool, bool) { // HasRecur returns a boolean if a field has been set. func (o *Task) HasRecur() bool { - if o != nil && o.Recur != nil { + if o != nil && !IsNil(o.Recur) { return true } @@ -695,7 +838,7 @@ func (o *Task) SetRecur(v bool) { // GetRecurFrequency returns the RecurFrequency field value if set, zero value otherwise. func (o *Task) GetRecurFrequency() string { - if o == nil || o.RecurFrequency == nil { + if o == nil || IsNil(o.RecurFrequency) { var ret string return ret } @@ -705,7 +848,7 @@ func (o *Task) GetRecurFrequency() string { // GetRecurFrequencyOk returns a tuple with the RecurFrequency field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetRecurFrequencyOk() (*string, bool) { - if o == nil || o.RecurFrequency == nil { + if o == nil || IsNil(o.RecurFrequency) { return nil, false } return o.RecurFrequency, true @@ -713,7 +856,7 @@ func (o *Task) GetRecurFrequencyOk() (*string, bool) { // HasRecurFrequency returns a boolean if a field has been set. func (o *Task) HasRecurFrequency() bool { - if o != nil && o.RecurFrequency != nil { + if o != nil && !IsNil(o.RecurFrequency) { return true } @@ -727,7 +870,7 @@ func (o *Task) SetRecurFrequency(v string) { // GetStartTime returns the StartTime field value if set, zero value otherwise. func (o *Task) GetStartTime() int64 { - if o == nil || o.StartTime == nil { + if o == nil || IsNil(o.StartTime) { var ret int64 return ret } @@ -737,7 +880,7 @@ func (o *Task) GetStartTime() int64 { // GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetStartTimeOk() (*int64, bool) { - if o == nil || o.StartTime == nil { + if o == nil || IsNil(o.StartTime) { return nil, false } return o.StartTime, true @@ -745,7 +888,7 @@ func (o *Task) GetStartTimeOk() (*int64, bool) { // HasStartTime returns a boolean if a field has been set. func (o *Task) HasStartTime() bool { - if o != nil && o.StartTime != nil { + if o != nil && !IsNil(o.StartTime) { return true } @@ -759,7 +902,7 @@ func (o *Task) SetStartTime(v int64) { // GetRecurLast returns the RecurLast field value if set, zero value otherwise. func (o *Task) GetRecurLast() int64 { - if o == nil || o.RecurLast == nil { + if o == nil || IsNil(o.RecurLast) { var ret int64 return ret } @@ -769,7 +912,7 @@ func (o *Task) GetRecurLast() int64 { // GetRecurLastOk returns a tuple with the RecurLast field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetRecurLastOk() (*int64, bool) { - if o == nil || o.RecurLast == nil { + if o == nil || IsNil(o.RecurLast) { return nil, false } return o.RecurLast, true @@ -777,7 +920,7 @@ func (o *Task) GetRecurLastOk() (*int64, bool) { // HasRecurLast returns a boolean if a field has been set. func (o *Task) HasRecurLast() bool { - if o != nil && o.RecurLast != nil { + if o != nil && !IsNil(o.RecurLast) { return true } @@ -791,7 +934,7 @@ func (o *Task) SetRecurLast(v int64) { // GetRecurNext returns the RecurNext field value if set, zero value otherwise. func (o *Task) GetRecurNext() int64 { - if o == nil || o.RecurNext == nil { + if o == nil || IsNil(o.RecurNext) { var ret int64 return ret } @@ -801,7 +944,7 @@ func (o *Task) GetRecurNext() int64 { // GetRecurNextOk returns a tuple with the RecurNext field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetRecurNextOk() (*int64, bool) { - if o == nil || o.RecurNext == nil { + if o == nil || IsNil(o.RecurNext) { return nil, false } return o.RecurNext, true @@ -809,7 +952,7 @@ func (o *Task) GetRecurNextOk() (*int64, bool) { // HasRecurNext returns a boolean if a field has been set. func (o *Task) HasRecurNext() bool { - if o != nil && o.RecurNext != nil { + if o != nil && !IsNil(o.RecurNext) { return true } @@ -823,7 +966,7 @@ func (o *Task) SetRecurNext(v int64) { // GetRecurLastTaskId returns the RecurLastTaskId field value if set, zero value otherwise. func (o *Task) GetRecurLastTaskId() string { - if o == nil || o.RecurLastTaskId == nil { + if o == nil || IsNil(o.RecurLastTaskId) { var ret string return ret } @@ -833,7 +976,7 @@ func (o *Task) GetRecurLastTaskId() string { // GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Task) GetRecurLastTaskIdOk() (*string, bool) { - if o == nil || o.RecurLastTaskId == nil { + if o == nil || IsNil(o.RecurLastTaskId) { return nil, false } return o.RecurLastTaskId, true @@ -841,7 +984,7 @@ func (o *Task) GetRecurLastTaskIdOk() (*string, bool) { // HasRecurLastTaskId returns a boolean if a field has been set. func (o *Task) HasRecurLastTaskId() bool { - if o != nil && o.RecurLastTaskId != nil { + if o != nil && !IsNil(o.RecurLastTaskId) { return true } @@ -854,83 +997,138 @@ func (o *Task) SetRecurLastTaskId(v string) { } func (o Task) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Name != nil { + return json.Marshal(toSerialize) +} + +func (o Task) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Description != nil { + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.ClientId != nil { + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.OrganizationId != nil { + if !IsNil(o.OrganizationId) { toSerialize["organization_id"] = o.OrganizationId } - if o.AgentId != nil { + if !IsNil(o.AgentId) { toSerialize["agent_id"] = o.AgentId } - if o.SiteId != nil { + if !IsNil(o.HostedZoneId) { + toSerialize["hosted_zone_id"] = o.HostedZoneId + } + if !IsNil(o.SiteId) { toSerialize["site_id"] = o.SiteId } - if o.CruncherId != nil { + if !IsNil(o.CruncherId) { toSerialize["cruncher_id"] = o.CruncherId } - if o.CreatedAt != nil { + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.CreatedBy != nil { + if !IsNil(o.CreatedBy) { toSerialize["created_by"] = o.CreatedBy } - if o.CreatedByUserId != nil { + if !IsNil(o.CreatedByUserId) { toSerialize["created_by_user_id"] = o.CreatedByUserId } - if o.UpdatedAt != nil { + if !IsNil(o.CustomIntegrationId) { + toSerialize["custom_integration_id"] = o.CustomIntegrationId + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Status != nil { + if !IsNil(o.Status) { toSerialize["status"] = o.Status } - if o.Error != nil { + if !IsNil(o.Error) { toSerialize["error"] = o.Error } - if o.Params != nil { + if !IsNil(o.Params) { toSerialize["params"] = o.Params } - if o.Stats != nil { + if !IsNil(o.Stats) { toSerialize["stats"] = o.Stats } - if o.Hidden != nil { + if !IsNil(o.Hidden) { toSerialize["hidden"] = o.Hidden } - if o.ParentId != nil { + if !IsNil(o.ParentId) { toSerialize["parent_id"] = o.ParentId } - if o.Recur != nil { + if !IsNil(o.Recur) { toSerialize["recur"] = o.Recur } - if o.RecurFrequency != nil { + if !IsNil(o.RecurFrequency) { toSerialize["recur_frequency"] = o.RecurFrequency } - if o.StartTime != nil { + if !IsNil(o.StartTime) { toSerialize["start_time"] = o.StartTime } - if o.RecurLast != nil { + if !IsNil(o.RecurLast) { toSerialize["recur_last"] = o.RecurLast } - if o.RecurNext != nil { + if !IsNil(o.RecurNext) { toSerialize["recur_next"] = o.RecurNext } - if o.RecurLastTaskId != nil { + if !IsNil(o.RecurLastTaskId) { toSerialize["recur_last_task_id"] = o.RecurLastTaskId } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *Task) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTask := _Task{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTask) + + if err != nil { + return err + } + + *o = Task(varTask) + + return err } type NullableTask struct { @@ -968,3 +1166,5 @@ func (v *NullableTask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_task_base.go b/go/model_task_base.go new file mode 100644 index 0000000..7b9ad9f --- /dev/null +++ b/go/model_task_base.go @@ -0,0 +1,1138 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the TaskBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskBase{} + +// TaskBase All fields of a Task with none required +type TaskBase struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + // The ID of the Hosted Zone which executes the task. If the + HostedZoneId *string `json:"hosted_zone_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + CruncherId *string `json:"cruncher_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CreatedBy *string `json:"created_by,omitempty"` + CreatedByUserId *string `json:"created_by_user_id,omitempty"` + // The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. + CustomIntegrationId *string `json:"custom_integration_id,omitempty"` + // The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. + SourceId *int32 `json:"source_id,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Type *string `json:"type,omitempty"` + Status *string `json:"status,omitempty"` + Error *string `json:"error,omitempty"` + Params *map[string]string `json:"params,omitempty"` + Stats map[string]interface{} `json:"stats,omitempty"` + Hidden *bool `json:"hidden,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Recur *bool `json:"recur,omitempty"` + RecurFrequency *string `json:"recur_frequency,omitempty"` + StartTime *int64 `json:"start_time,omitempty"` + RecurLast *int64 `json:"recur_last,omitempty"` + RecurNext *int64 `json:"recur_next,omitempty"` + RecurLastTaskId *string `json:"recur_last_task_id,omitempty"` +} + +// NewTaskBase instantiates a new TaskBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskBase() *TaskBase { + this := TaskBase{} + return &this +} + +// NewTaskBaseWithDefaults instantiates a new TaskBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskBaseWithDefaults() *TaskBase { + this := TaskBase{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TaskBase) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TaskBase) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TaskBase) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TaskBase) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TaskBase) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TaskBase) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TaskBase) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TaskBase) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TaskBase) SetDescription(v string) { + o.Description = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *TaskBase) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *TaskBase) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *TaskBase) SetTemplateId(v string) { + o.TemplateId = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *TaskBase) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *TaskBase) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *TaskBase) SetClientId(v string) { + o.ClientId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *TaskBase) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *TaskBase) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *TaskBase) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetAgentId returns the AgentId field value if set, zero value otherwise. +func (o *TaskBase) GetAgentId() string { + if o == nil || IsNil(o.AgentId) { + var ret string + return ret + } + return *o.AgentId +} + +// GetAgentIdOk returns a tuple with the AgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentId) { + return nil, false + } + return o.AgentId, true +} + +// HasAgentId returns a boolean if a field has been set. +func (o *TaskBase) HasAgentId() bool { + if o != nil && !IsNil(o.AgentId) { + return true + } + + return false +} + +// SetAgentId gets a reference to the given string and assigns it to the AgentId field. +func (o *TaskBase) SetAgentId(v string) { + o.AgentId = &v +} + +// GetHostedZoneId returns the HostedZoneId field value if set, zero value otherwise. +func (o *TaskBase) GetHostedZoneId() string { + if o == nil || IsNil(o.HostedZoneId) { + var ret string + return ret + } + return *o.HostedZoneId +} + +// GetHostedZoneIdOk returns a tuple with the HostedZoneId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetHostedZoneIdOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneId) { + return nil, false + } + return o.HostedZoneId, true +} + +// HasHostedZoneId returns a boolean if a field has been set. +func (o *TaskBase) HasHostedZoneId() bool { + if o != nil && !IsNil(o.HostedZoneId) { + return true + } + + return false +} + +// SetHostedZoneId gets a reference to the given string and assigns it to the HostedZoneId field. +func (o *TaskBase) SetHostedZoneId(v string) { + o.HostedZoneId = &v +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *TaskBase) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *TaskBase) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *TaskBase) SetSiteId(v string) { + o.SiteId = &v +} + +// GetCruncherId returns the CruncherId field value if set, zero value otherwise. +func (o *TaskBase) GetCruncherId() string { + if o == nil || IsNil(o.CruncherId) { + var ret string + return ret + } + return *o.CruncherId +} + +// GetCruncherIdOk returns a tuple with the CruncherId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetCruncherIdOk() (*string, bool) { + if o == nil || IsNil(o.CruncherId) { + return nil, false + } + return o.CruncherId, true +} + +// HasCruncherId returns a boolean if a field has been set. +func (o *TaskBase) HasCruncherId() bool { + if o != nil && !IsNil(o.CruncherId) { + return true + } + + return false +} + +// SetCruncherId gets a reference to the given string and assigns it to the CruncherId field. +func (o *TaskBase) SetCruncherId(v string) { + o.CruncherId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TaskBase) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TaskBase) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *TaskBase) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *TaskBase) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *TaskBase) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *TaskBase) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *TaskBase) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *TaskBase) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *TaskBase) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetCustomIntegrationId returns the CustomIntegrationId field value if set, zero value otherwise. +func (o *TaskBase) GetCustomIntegrationId() string { + if o == nil || IsNil(o.CustomIntegrationId) { + var ret string + return ret + } + return *o.CustomIntegrationId +} + +// GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetCustomIntegrationIdOk() (*string, bool) { + if o == nil || IsNil(o.CustomIntegrationId) { + return nil, false + } + return o.CustomIntegrationId, true +} + +// HasCustomIntegrationId returns a boolean if a field has been set. +func (o *TaskBase) HasCustomIntegrationId() bool { + if o != nil && !IsNil(o.CustomIntegrationId) { + return true + } + + return false +} + +// SetCustomIntegrationId gets a reference to the given string and assigns it to the CustomIntegrationId field. +func (o *TaskBase) SetCustomIntegrationId(v string) { + o.CustomIntegrationId = &v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *TaskBase) GetSourceId() int32 { + if o == nil || IsNil(o.SourceId) { + var ret int32 + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *TaskBase) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given int32 and assigns it to the SourceId field. +func (o *TaskBase) SetSourceId(v int32) { + o.SourceId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TaskBase) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TaskBase) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *TaskBase) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TaskBase) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TaskBase) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TaskBase) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TaskBase) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TaskBase) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TaskBase) SetStatus(v string) { + o.Status = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *TaskBase) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *TaskBase) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *TaskBase) SetError(v string) { + o.Error = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *TaskBase) GetParams() map[string]string { + if o == nil || IsNil(o.Params) { + var ret map[string]string + return ret + } + return *o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetParamsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Params) { + return nil, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *TaskBase) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]string and assigns it to the Params field. +func (o *TaskBase) SetParams(v map[string]string) { + o.Params = &v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *TaskBase) GetStats() map[string]interface{} { + if o == nil || IsNil(o.Stats) { + var ret map[string]interface{} + return ret + } + return o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetStatsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Stats) { + return map[string]interface{}{}, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *TaskBase) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given map[string]interface{} and assigns it to the Stats field. +func (o *TaskBase) SetStats(v map[string]interface{}) { + o.Stats = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *TaskBase) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *TaskBase) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *TaskBase) SetHidden(v bool) { + o.Hidden = &v +} + +// GetParentId returns the ParentId field value if set, zero value otherwise. +func (o *TaskBase) GetParentId() string { + if o == nil || IsNil(o.ParentId) { + var ret string + return ret + } + return *o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetParentIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentId) { + return nil, false + } + return o.ParentId, true +} + +// HasParentId returns a boolean if a field has been set. +func (o *TaskBase) HasParentId() bool { + if o != nil && !IsNil(o.ParentId) { + return true + } + + return false +} + +// SetParentId gets a reference to the given string and assigns it to the ParentId field. +func (o *TaskBase) SetParentId(v string) { + o.ParentId = &v +} + +// GetRecur returns the Recur field value if set, zero value otherwise. +func (o *TaskBase) GetRecur() bool { + if o == nil || IsNil(o.Recur) { + var ret bool + return ret + } + return *o.Recur +} + +// GetRecurOk returns a tuple with the Recur field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetRecurOk() (*bool, bool) { + if o == nil || IsNil(o.Recur) { + return nil, false + } + return o.Recur, true +} + +// HasRecur returns a boolean if a field has been set. +func (o *TaskBase) HasRecur() bool { + if o != nil && !IsNil(o.Recur) { + return true + } + + return false +} + +// SetRecur gets a reference to the given bool and assigns it to the Recur field. +func (o *TaskBase) SetRecur(v bool) { + o.Recur = &v +} + +// GetRecurFrequency returns the RecurFrequency field value if set, zero value otherwise. +func (o *TaskBase) GetRecurFrequency() string { + if o == nil || IsNil(o.RecurFrequency) { + var ret string + return ret + } + return *o.RecurFrequency +} + +// GetRecurFrequencyOk returns a tuple with the RecurFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetRecurFrequencyOk() (*string, bool) { + if o == nil || IsNil(o.RecurFrequency) { + return nil, false + } + return o.RecurFrequency, true +} + +// HasRecurFrequency returns a boolean if a field has been set. +func (o *TaskBase) HasRecurFrequency() bool { + if o != nil && !IsNil(o.RecurFrequency) { + return true + } + + return false +} + +// SetRecurFrequency gets a reference to the given string and assigns it to the RecurFrequency field. +func (o *TaskBase) SetRecurFrequency(v string) { + o.RecurFrequency = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *TaskBase) GetStartTime() int64 { + if o == nil || IsNil(o.StartTime) { + var ret int64 + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetStartTimeOk() (*int64, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *TaskBase) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given int64 and assigns it to the StartTime field. +func (o *TaskBase) SetStartTime(v int64) { + o.StartTime = &v +} + +// GetRecurLast returns the RecurLast field value if set, zero value otherwise. +func (o *TaskBase) GetRecurLast() int64 { + if o == nil || IsNil(o.RecurLast) { + var ret int64 + return ret + } + return *o.RecurLast +} + +// GetRecurLastOk returns a tuple with the RecurLast field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetRecurLastOk() (*int64, bool) { + if o == nil || IsNil(o.RecurLast) { + return nil, false + } + return o.RecurLast, true +} + +// HasRecurLast returns a boolean if a field has been set. +func (o *TaskBase) HasRecurLast() bool { + if o != nil && !IsNil(o.RecurLast) { + return true + } + + return false +} + +// SetRecurLast gets a reference to the given int64 and assigns it to the RecurLast field. +func (o *TaskBase) SetRecurLast(v int64) { + o.RecurLast = &v +} + +// GetRecurNext returns the RecurNext field value if set, zero value otherwise. +func (o *TaskBase) GetRecurNext() int64 { + if o == nil || IsNil(o.RecurNext) { + var ret int64 + return ret + } + return *o.RecurNext +} + +// GetRecurNextOk returns a tuple with the RecurNext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetRecurNextOk() (*int64, bool) { + if o == nil || IsNil(o.RecurNext) { + return nil, false + } + return o.RecurNext, true +} + +// HasRecurNext returns a boolean if a field has been set. +func (o *TaskBase) HasRecurNext() bool { + if o != nil && !IsNil(o.RecurNext) { + return true + } + + return false +} + +// SetRecurNext gets a reference to the given int64 and assigns it to the RecurNext field. +func (o *TaskBase) SetRecurNext(v int64) { + o.RecurNext = &v +} + +// GetRecurLastTaskId returns the RecurLastTaskId field value if set, zero value otherwise. +func (o *TaskBase) GetRecurLastTaskId() string { + if o == nil || IsNil(o.RecurLastTaskId) { + var ret string + return ret + } + return *o.RecurLastTaskId +} + +// GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskBase) GetRecurLastTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.RecurLastTaskId) { + return nil, false + } + return o.RecurLastTaskId, true +} + +// HasRecurLastTaskId returns a boolean if a field has been set. +func (o *TaskBase) HasRecurLastTaskId() bool { + if o != nil && !IsNil(o.RecurLastTaskId) { + return true + } + + return false +} + +// SetRecurLastTaskId gets a reference to the given string and assigns it to the RecurLastTaskId field. +func (o *TaskBase) SetRecurLastTaskId(v string) { + o.RecurLastTaskId = &v +} + +func (o TaskBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + if !IsNil(o.AgentId) { + toSerialize["agent_id"] = o.AgentId + } + if !IsNil(o.HostedZoneId) { + toSerialize["hosted_zone_id"] = o.HostedZoneId + } + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.CruncherId) { + toSerialize["cruncher_id"] = o.CruncherId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["created_by_user_id"] = o.CreatedByUserId + } + if !IsNil(o.CustomIntegrationId) { + toSerialize["custom_integration_id"] = o.CustomIntegrationId + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.ParentId) { + toSerialize["parent_id"] = o.ParentId + } + if !IsNil(o.Recur) { + toSerialize["recur"] = o.Recur + } + if !IsNil(o.RecurFrequency) { + toSerialize["recur_frequency"] = o.RecurFrequency + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.RecurLast) { + toSerialize["recur_last"] = o.RecurLast + } + if !IsNil(o.RecurNext) { + toSerialize["recur_next"] = o.RecurNext + } + if !IsNil(o.RecurLastTaskId) { + toSerialize["recur_last_task_id"] = o.RecurLastTaskId + } + return toSerialize, nil +} + +type NullableTaskBase struct { + value *TaskBase + isSet bool +} + +func (v NullableTaskBase) Get() *TaskBase { + return v.value +} + +func (v *NullableTaskBase) Set(val *TaskBase) { + v.value = val + v.isSet = true +} + +func (v NullableTaskBase) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskBase(val *TaskBase) *NullableTaskBase { + return &NullableTaskBase{value: val, isSet: true} +} + +func (v NullableTaskBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_task_options.go b/go/model_task_options.go new file mode 100644 index 0000000..066821f --- /dev/null +++ b/go/model_task_options.go @@ -0,0 +1,1175 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the TaskOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskOptions{} + +// TaskOptions struct for TaskOptions +type TaskOptions struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + ClientId *string `json:"client_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + AgentId *string `json:"agent_id,omitempty"` + // The ID of the Hosted Zone which executes the task. If the + HostedZoneId *string `json:"hosted_zone_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + CruncherId *string `json:"cruncher_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CreatedBy *string `json:"created_by,omitempty"` + CreatedByUserId *string `json:"created_by_user_id,omitempty"` + // The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. + CustomIntegrationId *string `json:"custom_integration_id,omitempty"` + // The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. + SourceId *int32 `json:"source_id,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Type *string `json:"type,omitempty"` + Status *string `json:"status,omitempty"` + Error *string `json:"error,omitempty"` + Params *map[string]string `json:"params,omitempty"` + Stats map[string]interface{} `json:"stats,omitempty"` + Hidden *bool `json:"hidden,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Recur *bool `json:"recur,omitempty"` + RecurFrequency *string `json:"recur_frequency,omitempty"` + StartTime *int64 `json:"start_time,omitempty"` + RecurLast *int64 `json:"recur_last,omitempty"` + RecurNext *int64 `json:"recur_next,omitempty"` + RecurLastTaskId *string `json:"recur_last_task_id,omitempty"` + // The string 'auto' will use any available hosted zone. Otherwise, provide the string name (hostedzone1) of the hosted zone. + HostedZoneName *string `json:"hosted_zone_name,omitempty"` +} + +// NewTaskOptions instantiates a new TaskOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskOptions() *TaskOptions { + this := TaskOptions{} + return &this +} + +// NewTaskOptionsWithDefaults instantiates a new TaskOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskOptionsWithDefaults() *TaskOptions { + this := TaskOptions{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TaskOptions) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TaskOptions) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TaskOptions) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TaskOptions) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TaskOptions) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TaskOptions) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TaskOptions) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TaskOptions) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TaskOptions) SetDescription(v string) { + o.Description = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *TaskOptions) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *TaskOptions) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *TaskOptions) SetTemplateId(v string) { + o.TemplateId = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *TaskOptions) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *TaskOptions) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *TaskOptions) SetClientId(v string) { + o.ClientId = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *TaskOptions) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *TaskOptions) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *TaskOptions) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetAgentId returns the AgentId field value if set, zero value otherwise. +func (o *TaskOptions) GetAgentId() string { + if o == nil || IsNil(o.AgentId) { + var ret string + return ret + } + return *o.AgentId +} + +// GetAgentIdOk returns a tuple with the AgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentId) { + return nil, false + } + return o.AgentId, true +} + +// HasAgentId returns a boolean if a field has been set. +func (o *TaskOptions) HasAgentId() bool { + if o != nil && !IsNil(o.AgentId) { + return true + } + + return false +} + +// SetAgentId gets a reference to the given string and assigns it to the AgentId field. +func (o *TaskOptions) SetAgentId(v string) { + o.AgentId = &v +} + +// GetHostedZoneId returns the HostedZoneId field value if set, zero value otherwise. +func (o *TaskOptions) GetHostedZoneId() string { + if o == nil || IsNil(o.HostedZoneId) { + var ret string + return ret + } + return *o.HostedZoneId +} + +// GetHostedZoneIdOk returns a tuple with the HostedZoneId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetHostedZoneIdOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneId) { + return nil, false + } + return o.HostedZoneId, true +} + +// HasHostedZoneId returns a boolean if a field has been set. +func (o *TaskOptions) HasHostedZoneId() bool { + if o != nil && !IsNil(o.HostedZoneId) { + return true + } + + return false +} + +// SetHostedZoneId gets a reference to the given string and assigns it to the HostedZoneId field. +func (o *TaskOptions) SetHostedZoneId(v string) { + o.HostedZoneId = &v +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *TaskOptions) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *TaskOptions) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *TaskOptions) SetSiteId(v string) { + o.SiteId = &v +} + +// GetCruncherId returns the CruncherId field value if set, zero value otherwise. +func (o *TaskOptions) GetCruncherId() string { + if o == nil || IsNil(o.CruncherId) { + var ret string + return ret + } + return *o.CruncherId +} + +// GetCruncherIdOk returns a tuple with the CruncherId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetCruncherIdOk() (*string, bool) { + if o == nil || IsNil(o.CruncherId) { + return nil, false + } + return o.CruncherId, true +} + +// HasCruncherId returns a boolean if a field has been set. +func (o *TaskOptions) HasCruncherId() bool { + if o != nil && !IsNil(o.CruncherId) { + return true + } + + return false +} + +// SetCruncherId gets a reference to the given string and assigns it to the CruncherId field. +func (o *TaskOptions) SetCruncherId(v string) { + o.CruncherId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TaskOptions) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TaskOptions) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *TaskOptions) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *TaskOptions) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *TaskOptions) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *TaskOptions) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *TaskOptions) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *TaskOptions) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *TaskOptions) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetCustomIntegrationId returns the CustomIntegrationId field value if set, zero value otherwise. +func (o *TaskOptions) GetCustomIntegrationId() string { + if o == nil || IsNil(o.CustomIntegrationId) { + var ret string + return ret + } + return *o.CustomIntegrationId +} + +// GetCustomIntegrationIdOk returns a tuple with the CustomIntegrationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetCustomIntegrationIdOk() (*string, bool) { + if o == nil || IsNil(o.CustomIntegrationId) { + return nil, false + } + return o.CustomIntegrationId, true +} + +// HasCustomIntegrationId returns a boolean if a field has been set. +func (o *TaskOptions) HasCustomIntegrationId() bool { + if o != nil && !IsNil(o.CustomIntegrationId) { + return true + } + + return false +} + +// SetCustomIntegrationId gets a reference to the given string and assigns it to the CustomIntegrationId field. +func (o *TaskOptions) SetCustomIntegrationId(v string) { + o.CustomIntegrationId = &v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *TaskOptions) GetSourceId() int32 { + if o == nil || IsNil(o.SourceId) { + var ret int32 + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetSourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *TaskOptions) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given int32 and assigns it to the SourceId field. +func (o *TaskOptions) SetSourceId(v int32) { + o.SourceId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TaskOptions) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TaskOptions) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *TaskOptions) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TaskOptions) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TaskOptions) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TaskOptions) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TaskOptions) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TaskOptions) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TaskOptions) SetStatus(v string) { + o.Status = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *TaskOptions) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *TaskOptions) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *TaskOptions) SetError(v string) { + o.Error = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *TaskOptions) GetParams() map[string]string { + if o == nil || IsNil(o.Params) { + var ret map[string]string + return ret + } + return *o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetParamsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Params) { + return nil, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *TaskOptions) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]string and assigns it to the Params field. +func (o *TaskOptions) SetParams(v map[string]string) { + o.Params = &v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *TaskOptions) GetStats() map[string]interface{} { + if o == nil || IsNil(o.Stats) { + var ret map[string]interface{} + return ret + } + return o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetStatsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Stats) { + return map[string]interface{}{}, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *TaskOptions) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given map[string]interface{} and assigns it to the Stats field. +func (o *TaskOptions) SetStats(v map[string]interface{}) { + o.Stats = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *TaskOptions) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *TaskOptions) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *TaskOptions) SetHidden(v bool) { + o.Hidden = &v +} + +// GetParentId returns the ParentId field value if set, zero value otherwise. +func (o *TaskOptions) GetParentId() string { + if o == nil || IsNil(o.ParentId) { + var ret string + return ret + } + return *o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetParentIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentId) { + return nil, false + } + return o.ParentId, true +} + +// HasParentId returns a boolean if a field has been set. +func (o *TaskOptions) HasParentId() bool { + if o != nil && !IsNil(o.ParentId) { + return true + } + + return false +} + +// SetParentId gets a reference to the given string and assigns it to the ParentId field. +func (o *TaskOptions) SetParentId(v string) { + o.ParentId = &v +} + +// GetRecur returns the Recur field value if set, zero value otherwise. +func (o *TaskOptions) GetRecur() bool { + if o == nil || IsNil(o.Recur) { + var ret bool + return ret + } + return *o.Recur +} + +// GetRecurOk returns a tuple with the Recur field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetRecurOk() (*bool, bool) { + if o == nil || IsNil(o.Recur) { + return nil, false + } + return o.Recur, true +} + +// HasRecur returns a boolean if a field has been set. +func (o *TaskOptions) HasRecur() bool { + if o != nil && !IsNil(o.Recur) { + return true + } + + return false +} + +// SetRecur gets a reference to the given bool and assigns it to the Recur field. +func (o *TaskOptions) SetRecur(v bool) { + o.Recur = &v +} + +// GetRecurFrequency returns the RecurFrequency field value if set, zero value otherwise. +func (o *TaskOptions) GetRecurFrequency() string { + if o == nil || IsNil(o.RecurFrequency) { + var ret string + return ret + } + return *o.RecurFrequency +} + +// GetRecurFrequencyOk returns a tuple with the RecurFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetRecurFrequencyOk() (*string, bool) { + if o == nil || IsNil(o.RecurFrequency) { + return nil, false + } + return o.RecurFrequency, true +} + +// HasRecurFrequency returns a boolean if a field has been set. +func (o *TaskOptions) HasRecurFrequency() bool { + if o != nil && !IsNil(o.RecurFrequency) { + return true + } + + return false +} + +// SetRecurFrequency gets a reference to the given string and assigns it to the RecurFrequency field. +func (o *TaskOptions) SetRecurFrequency(v string) { + o.RecurFrequency = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *TaskOptions) GetStartTime() int64 { + if o == nil || IsNil(o.StartTime) { + var ret int64 + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetStartTimeOk() (*int64, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *TaskOptions) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given int64 and assigns it to the StartTime field. +func (o *TaskOptions) SetStartTime(v int64) { + o.StartTime = &v +} + +// GetRecurLast returns the RecurLast field value if set, zero value otherwise. +func (o *TaskOptions) GetRecurLast() int64 { + if o == nil || IsNil(o.RecurLast) { + var ret int64 + return ret + } + return *o.RecurLast +} + +// GetRecurLastOk returns a tuple with the RecurLast field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetRecurLastOk() (*int64, bool) { + if o == nil || IsNil(o.RecurLast) { + return nil, false + } + return o.RecurLast, true +} + +// HasRecurLast returns a boolean if a field has been set. +func (o *TaskOptions) HasRecurLast() bool { + if o != nil && !IsNil(o.RecurLast) { + return true + } + + return false +} + +// SetRecurLast gets a reference to the given int64 and assigns it to the RecurLast field. +func (o *TaskOptions) SetRecurLast(v int64) { + o.RecurLast = &v +} + +// GetRecurNext returns the RecurNext field value if set, zero value otherwise. +func (o *TaskOptions) GetRecurNext() int64 { + if o == nil || IsNil(o.RecurNext) { + var ret int64 + return ret + } + return *o.RecurNext +} + +// GetRecurNextOk returns a tuple with the RecurNext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetRecurNextOk() (*int64, bool) { + if o == nil || IsNil(o.RecurNext) { + return nil, false + } + return o.RecurNext, true +} + +// HasRecurNext returns a boolean if a field has been set. +func (o *TaskOptions) HasRecurNext() bool { + if o != nil && !IsNil(o.RecurNext) { + return true + } + + return false +} + +// SetRecurNext gets a reference to the given int64 and assigns it to the RecurNext field. +func (o *TaskOptions) SetRecurNext(v int64) { + o.RecurNext = &v +} + +// GetRecurLastTaskId returns the RecurLastTaskId field value if set, zero value otherwise. +func (o *TaskOptions) GetRecurLastTaskId() string { + if o == nil || IsNil(o.RecurLastTaskId) { + var ret string + return ret + } + return *o.RecurLastTaskId +} + +// GetRecurLastTaskIdOk returns a tuple with the RecurLastTaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetRecurLastTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.RecurLastTaskId) { + return nil, false + } + return o.RecurLastTaskId, true +} + +// HasRecurLastTaskId returns a boolean if a field has been set. +func (o *TaskOptions) HasRecurLastTaskId() bool { + if o != nil && !IsNil(o.RecurLastTaskId) { + return true + } + + return false +} + +// SetRecurLastTaskId gets a reference to the given string and assigns it to the RecurLastTaskId field. +func (o *TaskOptions) SetRecurLastTaskId(v string) { + o.RecurLastTaskId = &v +} + +// GetHostedZoneName returns the HostedZoneName field value if set, zero value otherwise. +func (o *TaskOptions) GetHostedZoneName() string { + if o == nil || IsNil(o.HostedZoneName) { + var ret string + return ret + } + return *o.HostedZoneName +} + +// GetHostedZoneNameOk returns a tuple with the HostedZoneName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskOptions) GetHostedZoneNameOk() (*string, bool) { + if o == nil || IsNil(o.HostedZoneName) { + return nil, false + } + return o.HostedZoneName, true +} + +// HasHostedZoneName returns a boolean if a field has been set. +func (o *TaskOptions) HasHostedZoneName() bool { + if o != nil && !IsNil(o.HostedZoneName) { + return true + } + + return false +} + +// SetHostedZoneName gets a reference to the given string and assigns it to the HostedZoneName field. +func (o *TaskOptions) SetHostedZoneName(v string) { + o.HostedZoneName = &v +} + +func (o TaskOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + if !IsNil(o.AgentId) { + toSerialize["agent_id"] = o.AgentId + } + if !IsNil(o.HostedZoneId) { + toSerialize["hosted_zone_id"] = o.HostedZoneId + } + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.CruncherId) { + toSerialize["cruncher_id"] = o.CruncherId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["created_by_user_id"] = o.CreatedByUserId + } + if !IsNil(o.CustomIntegrationId) { + toSerialize["custom_integration_id"] = o.CustomIntegrationId + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.ParentId) { + toSerialize["parent_id"] = o.ParentId + } + if !IsNil(o.Recur) { + toSerialize["recur"] = o.Recur + } + if !IsNil(o.RecurFrequency) { + toSerialize["recur_frequency"] = o.RecurFrequency + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.RecurLast) { + toSerialize["recur_last"] = o.RecurLast + } + if !IsNil(o.RecurNext) { + toSerialize["recur_next"] = o.RecurNext + } + if !IsNil(o.RecurLastTaskId) { + toSerialize["recur_last_task_id"] = o.RecurLastTaskId + } + if !IsNil(o.HostedZoneName) { + toSerialize["hosted_zone_name"] = o.HostedZoneName + } + return toSerialize, nil +} + +type NullableTaskOptions struct { + value *TaskOptions + isSet bool +} + +func (v NullableTaskOptions) Get() *TaskOptions { + return v.value +} + +func (v *NullableTaskOptions) Set(val *TaskOptions) { + v.value = val + v.isSet = true +} + +func (v NullableTaskOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskOptions(val *TaskOptions) *NullableTaskOptions { + return &NullableTaskOptions{value: val, isSet: true} +} + +func (v NullableTaskOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_tenable_io_credential_fields.go b/go/model_tenable_io_credential_fields.go new file mode 100644 index 0000000..e293961 --- /dev/null +++ b/go/model_tenable_io_credential_fields.go @@ -0,0 +1,215 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TenableIoCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TenableIoCredentialFields{} + +// TenableIoCredentialFields struct for TenableIoCredentialFields +type TenableIoCredentialFields struct { + ApiUrl string `json:"api_url"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` +} + +type _TenableIoCredentialFields TenableIoCredentialFields + +// NewTenableIoCredentialFields instantiates a new TenableIoCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTenableIoCredentialFields(apiUrl string, accessKey string, secretKey string) *TenableIoCredentialFields { + this := TenableIoCredentialFields{} + this.ApiUrl = apiUrl + this.AccessKey = accessKey + this.SecretKey = secretKey + return &this +} + +// NewTenableIoCredentialFieldsWithDefaults instantiates a new TenableIoCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTenableIoCredentialFieldsWithDefaults() *TenableIoCredentialFields { + this := TenableIoCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *TenableIoCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *TenableIoCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *TenableIoCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetAccessKey returns the AccessKey field value +func (o *TenableIoCredentialFields) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *TenableIoCredentialFields) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *TenableIoCredentialFields) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *TenableIoCredentialFields) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *TenableIoCredentialFields) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *TenableIoCredentialFields) SetSecretKey(v string) { + o.SecretKey = v +} + +func (o TenableIoCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TenableIoCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + return toSerialize, nil +} + +func (o *TenableIoCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "access_key", + "secret_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTenableIoCredentialFields := _TenableIoCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTenableIoCredentialFields) + + if err != nil { + return err + } + + *o = TenableIoCredentialFields(varTenableIoCredentialFields) + + return err +} + +type NullableTenableIoCredentialFields struct { + value *TenableIoCredentialFields + isSet bool +} + +func (v NullableTenableIoCredentialFields) Get() *TenableIoCredentialFields { + return v.value +} + +func (v *NullableTenableIoCredentialFields) Set(val *TenableIoCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableTenableIoCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTenableIoCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTenableIoCredentialFields(val *TenableIoCredentialFields) *NullableTenableIoCredentialFields { + return &NullableTenableIoCredentialFields{value: val, isSet: true} +} + +func (v NullableTenableIoCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTenableIoCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_tenable_sc_credential_fields.go b/go/model_tenable_sc_credential_fields.go new file mode 100644 index 0000000..d336924 --- /dev/null +++ b/go/model_tenable_sc_credential_fields.go @@ -0,0 +1,287 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TenableScCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TenableScCredentialFields{} + +// TenableScCredentialFields struct for TenableScCredentialFields +type TenableScCredentialFields struct { + ApiUrl string `json:"api_url"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + Insecure *string `json:"insecure,omitempty"` + Thumbprints *string `json:"thumbprints,omitempty"` +} + +type _TenableScCredentialFields TenableScCredentialFields + +// NewTenableScCredentialFields instantiates a new TenableScCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTenableScCredentialFields(apiUrl string, accessKey string, secretKey string) *TenableScCredentialFields { + this := TenableScCredentialFields{} + this.ApiUrl = apiUrl + this.AccessKey = accessKey + this.SecretKey = secretKey + return &this +} + +// NewTenableScCredentialFieldsWithDefaults instantiates a new TenableScCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTenableScCredentialFieldsWithDefaults() *TenableScCredentialFields { + this := TenableScCredentialFields{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *TenableScCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *TenableScCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *TenableScCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetAccessKey returns the AccessKey field value +func (o *TenableScCredentialFields) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *TenableScCredentialFields) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *TenableScCredentialFields) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *TenableScCredentialFields) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *TenableScCredentialFields) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *TenableScCredentialFields) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetInsecure returns the Insecure field value if set, zero value otherwise. +func (o *TenableScCredentialFields) GetInsecure() string { + if o == nil || IsNil(o.Insecure) { + var ret string + return ret + } + return *o.Insecure +} + +// GetInsecureOk returns a tuple with the Insecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TenableScCredentialFields) GetInsecureOk() (*string, bool) { + if o == nil || IsNil(o.Insecure) { + return nil, false + } + return o.Insecure, true +} + +// HasInsecure returns a boolean if a field has been set. +func (o *TenableScCredentialFields) HasInsecure() bool { + if o != nil && !IsNil(o.Insecure) { + return true + } + + return false +} + +// SetInsecure gets a reference to the given string and assigns it to the Insecure field. +func (o *TenableScCredentialFields) SetInsecure(v string) { + o.Insecure = &v +} + +// GetThumbprints returns the Thumbprints field value if set, zero value otherwise. +func (o *TenableScCredentialFields) GetThumbprints() string { + if o == nil || IsNil(o.Thumbprints) { + var ret string + return ret + } + return *o.Thumbprints +} + +// GetThumbprintsOk returns a tuple with the Thumbprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TenableScCredentialFields) GetThumbprintsOk() (*string, bool) { + if o == nil || IsNil(o.Thumbprints) { + return nil, false + } + return o.Thumbprints, true +} + +// HasThumbprints returns a boolean if a field has been set. +func (o *TenableScCredentialFields) HasThumbprints() bool { + if o != nil && !IsNil(o.Thumbprints) { + return true + } + + return false +} + +// SetThumbprints gets a reference to the given string and assigns it to the Thumbprints field. +func (o *TenableScCredentialFields) SetThumbprints(v string) { + o.Thumbprints = &v +} + +func (o TenableScCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TenableScCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_url"] = o.ApiUrl + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + if !IsNil(o.Insecure) { + toSerialize["insecure"] = o.Insecure + } + if !IsNil(o.Thumbprints) { + toSerialize["thumbprints"] = o.Thumbprints + } + return toSerialize, nil +} + +func (o *TenableScCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_url", + "access_key", + "secret_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTenableScCredentialFields := _TenableScCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTenableScCredentialFields) + + if err != nil { + return err + } + + *o = TenableScCredentialFields(varTenableScCredentialFields) + + return err +} + +type NullableTenableScCredentialFields struct { + value *TenableScCredentialFields + isSet bool +} + +func (v NullableTenableScCredentialFields) Get() *TenableScCredentialFields { + return v.value +} + +func (v *NullableTenableScCredentialFields) Set(val *TenableScCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableTenableScCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTenableScCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTenableScCredentialFields(val *TenableScCredentialFields) *NullableTenableScCredentialFields { + return &NullableTenableScCredentialFields{value: val, isSet: true} +} + +func (v NullableTenableScCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTenableScCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_url.go b/go/model_url.go index 3dd5c30..5d77666 100644 --- a/go/model_url.go +++ b/go/model_url.go @@ -1,30 +1,39 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the URL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &URL{} + // URL A URL to a resource type URL struct { - Id *string `json:"id,omitempty"` + Url string `json:"url"` } +type _URL URL + // NewURL instantiates a new URL object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewURL() *URL { +func NewURL(url string) *URL { this := URL{} + this.Url = url return &this } @@ -36,44 +45,79 @@ func NewURLWithDefaults() *URL { return &this } -// GetId returns the Id field value if set, zero value otherwise. -func (o *URL) GetId() string { - if o == nil || o.Id == nil { +// GetUrl returns the Url field value +func (o *URL) GetUrl() string { + if o == nil { var ret string return ret } - return *o.Id + + return o.Url } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. -func (o *URL) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { +func (o *URL) GetUrlOk() (*string, bool) { + if o == nil { return nil, false } - return o.Id, true + return &o.Url, true } -// HasId returns a boolean if a field has been set. -func (o *URL) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false +// SetUrl sets field value +func (o *URL) SetUrl(v string) { + o.Url = v } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *URL) SetId(v string) { - o.Id = &v +func (o URL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o URL) MarshalJSON() ([]byte, error) { +func (o URL) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id + toSerialize["url"] = o.Url + return toSerialize, nil +} + +func (o *URL) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", } - return json.Marshal(toSerialize) + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varURL := _URL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varURL) + + if err != nil { + return err + } + + *o = URL(varURL) + + return err } type NullableURL struct { @@ -111,3 +155,5 @@ func (v *NullableURL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_user.go b/go/model_user.go new file mode 100644 index 0000000..3bf499a --- /dev/null +++ b/go/model_user.go @@ -0,0 +1,997 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Id string `json:"id"` + ClientId *string `json:"client_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + Name *string `json:"name,omitempty"` + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + Email *string `json:"email,omitempty"` + ClientAdmin *bool `json:"client_admin,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` + PasswordEnabledAt *int64 `json:"password_enabled_at,omitempty"` + InviteTokenExpiration *int64 `json:"invite_token_expiration,omitempty"` + ResetTokenExpiration *int64 `json:"reset_token_expiration,omitempty"` + TermsAgreedAsOf *int64 `json:"terms_agreed_as_of,omitempty"` + LastLoginIp NullableString `json:"last_login_ip,omitempty"` + LastLoginAt *int64 `json:"last_login_at,omitempty"` + LastLoginUa *string `json:"last_login_ua,omitempty"` + LastActivityAt *int64 `json:"last_activity_at,omitempty"` + SsoOnly *bool `json:"sso_only,omitempty"` + LoginFailures *int64 `json:"login_failures,omitempty"` + Actions *int64 `json:"actions,omitempty"` + LastActionAt *int64 `json:"last_action_at,omitempty"` + MfaEnabled *bool `json:"mfa_enabled,omitempty"` +} + +type _User User + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser(id string) *User { + this := User{} + this.Id = id + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetId returns the Id field value +func (o *User) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *User) SetId(v string) { + o.Id = v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *User) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *User) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *User) SetClientId(v string) { + o.ClientId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *User) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *User) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *User) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *User) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *User) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *User) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *User) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *User) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *User) SetName(v string) { + o.Name = &v +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *User) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *User) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *User) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *User) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *User) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *User) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *User) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email = &v +} + +// GetClientAdmin returns the ClientAdmin field value if set, zero value otherwise. +func (o *User) GetClientAdmin() bool { + if o == nil || IsNil(o.ClientAdmin) { + var ret bool + return ret + } + return *o.ClientAdmin +} + +// GetClientAdminOk returns a tuple with the ClientAdmin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetClientAdminOk() (*bool, bool) { + if o == nil || IsNil(o.ClientAdmin) { + return nil, false + } + return o.ClientAdmin, true +} + +// HasClientAdmin returns a boolean if a field has been set. +func (o *User) HasClientAdmin() bool { + if o != nil && !IsNil(o.ClientAdmin) { + return true + } + + return false +} + +// SetClientAdmin gets a reference to the given bool and assigns it to the ClientAdmin field. +func (o *User) SetClientAdmin(v bool) { + o.ClientAdmin = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *User) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *User) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *User) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *User) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *User) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *User) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +// GetPasswordEnabledAt returns the PasswordEnabledAt field value if set, zero value otherwise. +func (o *User) GetPasswordEnabledAt() int64 { + if o == nil || IsNil(o.PasswordEnabledAt) { + var ret int64 + return ret + } + return *o.PasswordEnabledAt +} + +// GetPasswordEnabledAtOk returns a tuple with the PasswordEnabledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordEnabledAtOk() (*int64, bool) { + if o == nil || IsNil(o.PasswordEnabledAt) { + return nil, false + } + return o.PasswordEnabledAt, true +} + +// HasPasswordEnabledAt returns a boolean if a field has been set. +func (o *User) HasPasswordEnabledAt() bool { + if o != nil && !IsNil(o.PasswordEnabledAt) { + return true + } + + return false +} + +// SetPasswordEnabledAt gets a reference to the given int64 and assigns it to the PasswordEnabledAt field. +func (o *User) SetPasswordEnabledAt(v int64) { + o.PasswordEnabledAt = &v +} + +// GetInviteTokenExpiration returns the InviteTokenExpiration field value if set, zero value otherwise. +func (o *User) GetInviteTokenExpiration() int64 { + if o == nil || IsNil(o.InviteTokenExpiration) { + var ret int64 + return ret + } + return *o.InviteTokenExpiration +} + +// GetInviteTokenExpirationOk returns a tuple with the InviteTokenExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetInviteTokenExpirationOk() (*int64, bool) { + if o == nil || IsNil(o.InviteTokenExpiration) { + return nil, false + } + return o.InviteTokenExpiration, true +} + +// HasInviteTokenExpiration returns a boolean if a field has been set. +func (o *User) HasInviteTokenExpiration() bool { + if o != nil && !IsNil(o.InviteTokenExpiration) { + return true + } + + return false +} + +// SetInviteTokenExpiration gets a reference to the given int64 and assigns it to the InviteTokenExpiration field. +func (o *User) SetInviteTokenExpiration(v int64) { + o.InviteTokenExpiration = &v +} + +// GetResetTokenExpiration returns the ResetTokenExpiration field value if set, zero value otherwise. +func (o *User) GetResetTokenExpiration() int64 { + if o == nil || IsNil(o.ResetTokenExpiration) { + var ret int64 + return ret + } + return *o.ResetTokenExpiration +} + +// GetResetTokenExpirationOk returns a tuple with the ResetTokenExpiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetResetTokenExpirationOk() (*int64, bool) { + if o == nil || IsNil(o.ResetTokenExpiration) { + return nil, false + } + return o.ResetTokenExpiration, true +} + +// HasResetTokenExpiration returns a boolean if a field has been set. +func (o *User) HasResetTokenExpiration() bool { + if o != nil && !IsNil(o.ResetTokenExpiration) { + return true + } + + return false +} + +// SetResetTokenExpiration gets a reference to the given int64 and assigns it to the ResetTokenExpiration field. +func (o *User) SetResetTokenExpiration(v int64) { + o.ResetTokenExpiration = &v +} + +// GetTermsAgreedAsOf returns the TermsAgreedAsOf field value if set, zero value otherwise. +func (o *User) GetTermsAgreedAsOf() int64 { + if o == nil || IsNil(o.TermsAgreedAsOf) { + var ret int64 + return ret + } + return *o.TermsAgreedAsOf +} + +// GetTermsAgreedAsOfOk returns a tuple with the TermsAgreedAsOf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetTermsAgreedAsOfOk() (*int64, bool) { + if o == nil || IsNil(o.TermsAgreedAsOf) { + return nil, false + } + return o.TermsAgreedAsOf, true +} + +// HasTermsAgreedAsOf returns a boolean if a field has been set. +func (o *User) HasTermsAgreedAsOf() bool { + if o != nil && !IsNil(o.TermsAgreedAsOf) { + return true + } + + return false +} + +// SetTermsAgreedAsOf gets a reference to the given int64 and assigns it to the TermsAgreedAsOf field. +func (o *User) SetTermsAgreedAsOf(v int64) { + o.TermsAgreedAsOf = &v +} + +// GetLastLoginIp returns the LastLoginIp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetLastLoginIp() string { + if o == nil || IsNil(o.LastLoginIp.Get()) { + var ret string + return ret + } + return *o.LastLoginIp.Get() +} + +// GetLastLoginIpOk returns a tuple with the LastLoginIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetLastLoginIpOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastLoginIp.Get(), o.LastLoginIp.IsSet() +} + +// HasLastLoginIp returns a boolean if a field has been set. +func (o *User) HasLastLoginIp() bool { + if o != nil && o.LastLoginIp.IsSet() { + return true + } + + return false +} + +// SetLastLoginIp gets a reference to the given NullableString and assigns it to the LastLoginIp field. +func (o *User) SetLastLoginIp(v string) { + o.LastLoginIp.Set(&v) +} +// SetLastLoginIpNil sets the value for LastLoginIp to be an explicit nil +func (o *User) SetLastLoginIpNil() { + o.LastLoginIp.Set(nil) +} + +// UnsetLastLoginIp ensures that no value is present for LastLoginIp, not even an explicit nil +func (o *User) UnsetLastLoginIp() { + o.LastLoginIp.Unset() +} + +// GetLastLoginAt returns the LastLoginAt field value if set, zero value otherwise. +func (o *User) GetLastLoginAt() int64 { + if o == nil || IsNil(o.LastLoginAt) { + var ret int64 + return ret + } + return *o.LastLoginAt +} + +// GetLastLoginAtOk returns a tuple with the LastLoginAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastLoginAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastLoginAt) { + return nil, false + } + return o.LastLoginAt, true +} + +// HasLastLoginAt returns a boolean if a field has been set. +func (o *User) HasLastLoginAt() bool { + if o != nil && !IsNil(o.LastLoginAt) { + return true + } + + return false +} + +// SetLastLoginAt gets a reference to the given int64 and assigns it to the LastLoginAt field. +func (o *User) SetLastLoginAt(v int64) { + o.LastLoginAt = &v +} + +// GetLastLoginUa returns the LastLoginUa field value if set, zero value otherwise. +func (o *User) GetLastLoginUa() string { + if o == nil || IsNil(o.LastLoginUa) { + var ret string + return ret + } + return *o.LastLoginUa +} + +// GetLastLoginUaOk returns a tuple with the LastLoginUa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastLoginUaOk() (*string, bool) { + if o == nil || IsNil(o.LastLoginUa) { + return nil, false + } + return o.LastLoginUa, true +} + +// HasLastLoginUa returns a boolean if a field has been set. +func (o *User) HasLastLoginUa() bool { + if o != nil && !IsNil(o.LastLoginUa) { + return true + } + + return false +} + +// SetLastLoginUa gets a reference to the given string and assigns it to the LastLoginUa field. +func (o *User) SetLastLoginUa(v string) { + o.LastLoginUa = &v +} + +// GetLastActivityAt returns the LastActivityAt field value if set, zero value otherwise. +func (o *User) GetLastActivityAt() int64 { + if o == nil || IsNil(o.LastActivityAt) { + var ret int64 + return ret + } + return *o.LastActivityAt +} + +// GetLastActivityAtOk returns a tuple with the LastActivityAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastActivityAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastActivityAt) { + return nil, false + } + return o.LastActivityAt, true +} + +// HasLastActivityAt returns a boolean if a field has been set. +func (o *User) HasLastActivityAt() bool { + if o != nil && !IsNil(o.LastActivityAt) { + return true + } + + return false +} + +// SetLastActivityAt gets a reference to the given int64 and assigns it to the LastActivityAt field. +func (o *User) SetLastActivityAt(v int64) { + o.LastActivityAt = &v +} + +// GetSsoOnly returns the SsoOnly field value if set, zero value otherwise. +func (o *User) GetSsoOnly() bool { + if o == nil || IsNil(o.SsoOnly) { + var ret bool + return ret + } + return *o.SsoOnly +} + +// GetSsoOnlyOk returns a tuple with the SsoOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetSsoOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.SsoOnly) { + return nil, false + } + return o.SsoOnly, true +} + +// HasSsoOnly returns a boolean if a field has been set. +func (o *User) HasSsoOnly() bool { + if o != nil && !IsNil(o.SsoOnly) { + return true + } + + return false +} + +// SetSsoOnly gets a reference to the given bool and assigns it to the SsoOnly field. +func (o *User) SetSsoOnly(v bool) { + o.SsoOnly = &v +} + +// GetLoginFailures returns the LoginFailures field value if set, zero value otherwise. +func (o *User) GetLoginFailures() int64 { + if o == nil || IsNil(o.LoginFailures) { + var ret int64 + return ret + } + return *o.LoginFailures +} + +// GetLoginFailuresOk returns a tuple with the LoginFailures field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLoginFailuresOk() (*int64, bool) { + if o == nil || IsNil(o.LoginFailures) { + return nil, false + } + return o.LoginFailures, true +} + +// HasLoginFailures returns a boolean if a field has been set. +func (o *User) HasLoginFailures() bool { + if o != nil && !IsNil(o.LoginFailures) { + return true + } + + return false +} + +// SetLoginFailures gets a reference to the given int64 and assigns it to the LoginFailures field. +func (o *User) SetLoginFailures(v int64) { + o.LoginFailures = &v +} + +// GetActions returns the Actions field value if set, zero value otherwise. +func (o *User) GetActions() int64 { + if o == nil || IsNil(o.Actions) { + var ret int64 + return ret + } + return *o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetActionsOk() (*int64, bool) { + if o == nil || IsNil(o.Actions) { + return nil, false + } + return o.Actions, true +} + +// HasActions returns a boolean if a field has been set. +func (o *User) HasActions() bool { + if o != nil && !IsNil(o.Actions) { + return true + } + + return false +} + +// SetActions gets a reference to the given int64 and assigns it to the Actions field. +func (o *User) SetActions(v int64) { + o.Actions = &v +} + +// GetLastActionAt returns the LastActionAt field value if set, zero value otherwise. +func (o *User) GetLastActionAt() int64 { + if o == nil || IsNil(o.LastActionAt) { + var ret int64 + return ret + } + return *o.LastActionAt +} + +// GetLastActionAtOk returns a tuple with the LastActionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastActionAtOk() (*int64, bool) { + if o == nil || IsNil(o.LastActionAt) { + return nil, false + } + return o.LastActionAt, true +} + +// HasLastActionAt returns a boolean if a field has been set. +func (o *User) HasLastActionAt() bool { + if o != nil && !IsNil(o.LastActionAt) { + return true + } + + return false +} + +// SetLastActionAt gets a reference to the given int64 and assigns it to the LastActionAt field. +func (o *User) SetLastActionAt(v int64) { + o.LastActionAt = &v +} + +// GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise. +func (o *User) GetMfaEnabled() bool { + if o == nil || IsNil(o.MfaEnabled) { + var ret bool + return ret + } + return *o.MfaEnabled +} + +// GetMfaEnabledOk returns a tuple with the MfaEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetMfaEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.MfaEnabled) { + return nil, false + } + return o.MfaEnabled, true +} + +// HasMfaEnabled returns a boolean if a field has been set. +func (o *User) HasMfaEnabled() bool { + if o != nil && !IsNil(o.MfaEnabled) { + return true + } + + return false +} + +// SetMfaEnabled gets a reference to the given bool and assigns it to the MfaEnabled field. +func (o *User) SetMfaEnabled(v bool) { + o.MfaEnabled = &v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.ClientAdmin) { + toSerialize["client_admin"] = o.ClientAdmin + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + if !IsNil(o.PasswordEnabledAt) { + toSerialize["password_enabled_at"] = o.PasswordEnabledAt + } + if !IsNil(o.InviteTokenExpiration) { + toSerialize["invite_token_expiration"] = o.InviteTokenExpiration + } + if !IsNil(o.ResetTokenExpiration) { + toSerialize["reset_token_expiration"] = o.ResetTokenExpiration + } + if !IsNil(o.TermsAgreedAsOf) { + toSerialize["terms_agreed_as_of"] = o.TermsAgreedAsOf + } + if o.LastLoginIp.IsSet() { + toSerialize["last_login_ip"] = o.LastLoginIp.Get() + } + if !IsNil(o.LastLoginAt) { + toSerialize["last_login_at"] = o.LastLoginAt + } + if !IsNil(o.LastLoginUa) { + toSerialize["last_login_ua"] = o.LastLoginUa + } + if !IsNil(o.LastActivityAt) { + toSerialize["last_activity_at"] = o.LastActivityAt + } + if !IsNil(o.SsoOnly) { + toSerialize["sso_only"] = o.SsoOnly + } + if !IsNil(o.LoginFailures) { + toSerialize["login_failures"] = o.LoginFailures + } + if !IsNil(o.Actions) { + toSerialize["actions"] = o.Actions + } + if !IsNil(o.LastActionAt) { + toSerialize["last_action_at"] = o.LastActionAt + } + if !IsNil(o.MfaEnabled) { + toSerialize["mfa_enabled"] = o.MfaEnabled + } + return toSerialize, nil +} + +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_user_invite_options.go b/go/model_user_invite_options.go new file mode 100644 index 0000000..6cc3d39 --- /dev/null +++ b/go/model_user_invite_options.go @@ -0,0 +1,379 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the UserInviteOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInviteOptions{} + +// UserInviteOptions struct for UserInviteOptions +type UserInviteOptions struct { + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + Email *string `json:"email,omitempty"` + ClientAdmin *bool `json:"client_admin,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` + Subject *string `json:"subject,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewUserInviteOptions instantiates a new UserInviteOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInviteOptions() *UserInviteOptions { + this := UserInviteOptions{} + return &this +} + +// NewUserInviteOptionsWithDefaults instantiates a new UserInviteOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInviteOptionsWithDefaults() *UserInviteOptions { + this := UserInviteOptions{} + return &this +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *UserInviteOptions) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *UserInviteOptions) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *UserInviteOptions) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *UserInviteOptions) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *UserInviteOptions) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *UserInviteOptions) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UserInviteOptions) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UserInviteOptions) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UserInviteOptions) SetEmail(v string) { + o.Email = &v +} + +// GetClientAdmin returns the ClientAdmin field value if set, zero value otherwise. +func (o *UserInviteOptions) GetClientAdmin() bool { + if o == nil || IsNil(o.ClientAdmin) { + var ret bool + return ret + } + return *o.ClientAdmin +} + +// GetClientAdminOk returns a tuple with the ClientAdmin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetClientAdminOk() (*bool, bool) { + if o == nil || IsNil(o.ClientAdmin) { + return nil, false + } + return o.ClientAdmin, true +} + +// HasClientAdmin returns a boolean if a field has been set. +func (o *UserInviteOptions) HasClientAdmin() bool { + if o != nil && !IsNil(o.ClientAdmin) { + return true + } + + return false +} + +// SetClientAdmin gets a reference to the given bool and assigns it to the ClientAdmin field. +func (o *UserInviteOptions) SetClientAdmin(v bool) { + o.ClientAdmin = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *UserInviteOptions) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *UserInviteOptions) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *UserInviteOptions) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *UserInviteOptions) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *UserInviteOptions) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *UserInviteOptions) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +// GetSubject returns the Subject field value if set, zero value otherwise. +func (o *UserInviteOptions) GetSubject() string { + if o == nil || IsNil(o.Subject) { + var ret string + return ret + } + return *o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetSubjectOk() (*string, bool) { + if o == nil || IsNil(o.Subject) { + return nil, false + } + return o.Subject, true +} + +// HasSubject returns a boolean if a field has been set. +func (o *UserInviteOptions) HasSubject() bool { + if o != nil && !IsNil(o.Subject) { + return true + } + + return false +} + +// SetSubject gets a reference to the given string and assigns it to the Subject field. +func (o *UserInviteOptions) SetSubject(v string) { + o.Subject = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UserInviteOptions) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInviteOptions) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UserInviteOptions) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *UserInviteOptions) SetMessage(v string) { + o.Message = &v +} + +func (o UserInviteOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInviteOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.ClientAdmin) { + toSerialize["client_admin"] = o.ClientAdmin + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + if !IsNil(o.Subject) { + toSerialize["subject"] = o.Subject + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableUserInviteOptions struct { + value *UserInviteOptions + isSet bool +} + +func (v NullableUserInviteOptions) Get() *UserInviteOptions { + return v.value +} + +func (v *NullableUserInviteOptions) Set(val *UserInviteOptions) { + v.value = val + v.isSet = true +} + +func (v NullableUserInviteOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInviteOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInviteOptions(val *UserInviteOptions) *NullableUserInviteOptions { + return &NullableUserInviteOptions{value: val, isSet: true} +} + +func (v NullableUserInviteOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInviteOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_user_options.go b/go/model_user_options.go new file mode 100644 index 0000000..8b7a73f --- /dev/null +++ b/go/model_user_options.go @@ -0,0 +1,307 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the UserOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserOptions{} + +// UserOptions struct for UserOptions +type UserOptions struct { + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + Email *string `json:"email,omitempty"` + ClientAdmin *bool `json:"client_admin,omitempty"` + OrgDefaultRole *string `json:"org_default_role,omitempty"` + OrgRoles map[string]interface{} `json:"org_roles,omitempty"` +} + +// NewUserOptions instantiates a new UserOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserOptions() *UserOptions { + this := UserOptions{} + return &this +} + +// NewUserOptionsWithDefaults instantiates a new UserOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserOptionsWithDefaults() *UserOptions { + this := UserOptions{} + return &this +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *UserOptions) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *UserOptions) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *UserOptions) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *UserOptions) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *UserOptions) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *UserOptions) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UserOptions) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UserOptions) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UserOptions) SetEmail(v string) { + o.Email = &v +} + +// GetClientAdmin returns the ClientAdmin field value if set, zero value otherwise. +func (o *UserOptions) GetClientAdmin() bool { + if o == nil || IsNil(o.ClientAdmin) { + var ret bool + return ret + } + return *o.ClientAdmin +} + +// GetClientAdminOk returns a tuple with the ClientAdmin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetClientAdminOk() (*bool, bool) { + if o == nil || IsNil(o.ClientAdmin) { + return nil, false + } + return o.ClientAdmin, true +} + +// HasClientAdmin returns a boolean if a field has been set. +func (o *UserOptions) HasClientAdmin() bool { + if o != nil && !IsNil(o.ClientAdmin) { + return true + } + + return false +} + +// SetClientAdmin gets a reference to the given bool and assigns it to the ClientAdmin field. +func (o *UserOptions) SetClientAdmin(v bool) { + o.ClientAdmin = &v +} + +// GetOrgDefaultRole returns the OrgDefaultRole field value if set, zero value otherwise. +func (o *UserOptions) GetOrgDefaultRole() string { + if o == nil || IsNil(o.OrgDefaultRole) { + var ret string + return ret + } + return *o.OrgDefaultRole +} + +// GetOrgDefaultRoleOk returns a tuple with the OrgDefaultRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetOrgDefaultRoleOk() (*string, bool) { + if o == nil || IsNil(o.OrgDefaultRole) { + return nil, false + } + return o.OrgDefaultRole, true +} + +// HasOrgDefaultRole returns a boolean if a field has been set. +func (o *UserOptions) HasOrgDefaultRole() bool { + if o != nil && !IsNil(o.OrgDefaultRole) { + return true + } + + return false +} + +// SetOrgDefaultRole gets a reference to the given string and assigns it to the OrgDefaultRole field. +func (o *UserOptions) SetOrgDefaultRole(v string) { + o.OrgDefaultRole = &v +} + +// GetOrgRoles returns the OrgRoles field value if set, zero value otherwise. +func (o *UserOptions) GetOrgRoles() map[string]interface{} { + if o == nil || IsNil(o.OrgRoles) { + var ret map[string]interface{} + return ret + } + return o.OrgRoles +} + +// GetOrgRolesOk returns a tuple with the OrgRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserOptions) GetOrgRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OrgRoles) { + return map[string]interface{}{}, false + } + return o.OrgRoles, true +} + +// HasOrgRoles returns a boolean if a field has been set. +func (o *UserOptions) HasOrgRoles() bool { + if o != nil && !IsNil(o.OrgRoles) { + return true + } + + return false +} + +// SetOrgRoles gets a reference to the given map[string]interface{} and assigns it to the OrgRoles field. +func (o *UserOptions) SetOrgRoles(v map[string]interface{}) { + o.OrgRoles = v +} + +func (o UserOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.ClientAdmin) { + toSerialize["client_admin"] = o.ClientAdmin + } + if !IsNil(o.OrgDefaultRole) { + toSerialize["org_default_role"] = o.OrgDefaultRole + } + if !IsNil(o.OrgRoles) { + toSerialize["org_roles"] = o.OrgRoles + } + return toSerialize, nil +} + +type NullableUserOptions struct { + value *UserOptions + isSet bool +} + +func (v NullableUserOptions) Get() *UserOptions { + return v.value +} + +func (v *NullableUserOptions) Set(val *UserOptions) { + v.value = val + v.isSet = true +} + +func (v NullableUserOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableUserOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserOptions(val *UserOptions) *NullableUserOptions { + return &NullableUserOptions{value: val, isSet: true} +} + +func (v NullableUserOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_v_mware_credential_fields.go b/go/model_v_mware_credential_fields.go new file mode 100644 index 0000000..e1a853f --- /dev/null +++ b/go/model_v_mware_credential_fields.go @@ -0,0 +1,259 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the VMwareCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VMwareCredentialFields{} + +// VMwareCredentialFields struct for VMwareCredentialFields +type VMwareCredentialFields struct { + Username string `json:"username"` + Password string `json:"password"` + Insecure *string `json:"insecure,omitempty"` + Thumbprints *string `json:"thumbprints,omitempty"` +} + +type _VMwareCredentialFields VMwareCredentialFields + +// NewVMwareCredentialFields instantiates a new VMwareCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVMwareCredentialFields(username string, password string) *VMwareCredentialFields { + this := VMwareCredentialFields{} + this.Username = username + this.Password = password + return &this +} + +// NewVMwareCredentialFieldsWithDefaults instantiates a new VMwareCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVMwareCredentialFieldsWithDefaults() *VMwareCredentialFields { + this := VMwareCredentialFields{} + return &this +} + +// GetUsername returns the Username field value +func (o *VMwareCredentialFields) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *VMwareCredentialFields) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *VMwareCredentialFields) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *VMwareCredentialFields) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *VMwareCredentialFields) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *VMwareCredentialFields) SetPassword(v string) { + o.Password = v +} + +// GetInsecure returns the Insecure field value if set, zero value otherwise. +func (o *VMwareCredentialFields) GetInsecure() string { + if o == nil || IsNil(o.Insecure) { + var ret string + return ret + } + return *o.Insecure +} + +// GetInsecureOk returns a tuple with the Insecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VMwareCredentialFields) GetInsecureOk() (*string, bool) { + if o == nil || IsNil(o.Insecure) { + return nil, false + } + return o.Insecure, true +} + +// HasInsecure returns a boolean if a field has been set. +func (o *VMwareCredentialFields) HasInsecure() bool { + if o != nil && !IsNil(o.Insecure) { + return true + } + + return false +} + +// SetInsecure gets a reference to the given string and assigns it to the Insecure field. +func (o *VMwareCredentialFields) SetInsecure(v string) { + o.Insecure = &v +} + +// GetThumbprints returns the Thumbprints field value if set, zero value otherwise. +func (o *VMwareCredentialFields) GetThumbprints() string { + if o == nil || IsNil(o.Thumbprints) { + var ret string + return ret + } + return *o.Thumbprints +} + +// GetThumbprintsOk returns a tuple with the Thumbprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VMwareCredentialFields) GetThumbprintsOk() (*string, bool) { + if o == nil || IsNil(o.Thumbprints) { + return nil, false + } + return o.Thumbprints, true +} + +// HasThumbprints returns a boolean if a field has been set. +func (o *VMwareCredentialFields) HasThumbprints() bool { + if o != nil && !IsNil(o.Thumbprints) { + return true + } + + return false +} + +// SetThumbprints gets a reference to the given string and assigns it to the Thumbprints field. +func (o *VMwareCredentialFields) SetThumbprints(v string) { + o.Thumbprints = &v +} + +func (o VMwareCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VMwareCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + if !IsNil(o.Insecure) { + toSerialize["insecure"] = o.Insecure + } + if !IsNil(o.Thumbprints) { + toSerialize["thumbprints"] = o.Thumbprints + } + return toSerialize, nil +} + +func (o *VMwareCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "username", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVMwareCredentialFields := _VMwareCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVMwareCredentialFields) + + if err != nil { + return err + } + + *o = VMwareCredentialFields(varVMwareCredentialFields) + + return err +} + +type NullableVMwareCredentialFields struct { + value *VMwareCredentialFields + isSet bool +} + +func (v NullableVMwareCredentialFields) Get() *VMwareCredentialFields { + return v.value +} + +func (v *NullableVMwareCredentialFields) Set(val *VMwareCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableVMwareCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableVMwareCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVMwareCredentialFields(val *VMwareCredentialFields) *NullableVMwareCredentialFields { + return &NullableVMwareCredentialFields{value: val, isSet: true} +} + +func (v NullableVMwareCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVMwareCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_vulnerability.go b/go/model_vulnerability.go new file mode 100644 index 0000000..8a61b75 --- /dev/null +++ b/go/model_vulnerability.go @@ -0,0 +1,2725 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Vulnerability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Vulnerability{} + +// Vulnerability struct for Vulnerability +type Vulnerability struct { + VulnerabilityId *string `json:"vulnerability_id,omitempty"` + VulnerabilityAssetId *string `json:"vulnerability_asset_id,omitempty"` + VulnerabilityOrganizationId *string `json:"vulnerability_organization_id,omitempty"` + VulnerabilitySourceId *int32 `json:"vulnerability_source_id,omitempty"` + VulnerabilityCreatedAt *int64 `json:"vulnerability_created_at,omitempty"` + VulnerabilityUpdatedAt *int64 `json:"vulnerability_updated_at,omitempty"` + VulnerabilityServiceAddress NullableString `json:"vulnerability_service_address,omitempty"` + VulnerabilityServiceTransport *string `json:"vulnerability_service_transport,omitempty"` + VulnerabilityServicePort *int64 `json:"vulnerability_service_port,omitempty"` + VulnerabilityCpe23 *string `json:"vulnerability_cpe23,omitempty"` + VulnerabilityVulnId *string `json:"vulnerability_vuln_id,omitempty"` + VulnerabilityCategory *string `json:"vulnerability_category,omitempty"` + VulnerabilityName *string `json:"vulnerability_name,omitempty"` + VulnerabilityDescription *string `json:"vulnerability_description,omitempty"` + VulnerabilitySolution *string `json:"vulnerability_solution,omitempty"` + VulnerabilityCve *string `json:"vulnerability_cve,omitempty"` + VulnerabilityCvss2BaseScore *float64 `json:"vulnerability_cvss2_base_score,omitempty"` + VulnerabilityCvss2TemporalScore *float64 `json:"vulnerability_cvss2_temporal_score,omitempty"` + VulnerabilityCvss3BaseScore *float64 `json:"vulnerability_cvss3_base_score,omitempty"` + VulnerabilityCvss3TemporalScore *float64 `json:"vulnerability_cvss3_temporal_score,omitempty"` + VulnerabilitySeverity *string `json:"vulnerability_severity,omitempty"` + VulnerabilitySeverityScore *float64 `json:"vulnerability_severity_score,omitempty"` + VulnerabilityRisk *string `json:"vulnerability_risk,omitempty"` + VulnerabilityRiskScore *float64 `json:"vulnerability_risk_score,omitempty"` + VulnerabilityPublishedAt *int64 `json:"vulnerability_published_at,omitempty"` + VulnerabilityFirstDetectedAt *int64 `json:"vulnerability_first_detected_at,omitempty"` + VulnerabilityLastDetectedAt *int64 `json:"vulnerability_last_detected_at,omitempty"` + VulnerabilityAttributes *map[string]string `json:"vulnerability_attributes,omitempty"` + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + Alive *bool `json:"alive,omitempty"` + FirstSeen *int64 `json:"first_seen,omitempty"` + LastSeen *int64 `json:"last_seen,omitempty"` + DetectedBy *string `json:"detected_by,omitempty"` + Type *string `json:"type,omitempty"` + Os *string `json:"os,omitempty"` + OsVersion *string `json:"os_version,omitempty"` + Hw *string `json:"hw,omitempty"` + Addresses []*string `json:"addresses,omitempty"` + AddressesExtra []*string `json:"addresses_extra,omitempty"` + Macs []string `json:"macs,omitempty"` + MacVendors []string `json:"mac_vendors,omitempty"` + Names []string `json:"names,omitempty"` + Domains []string `json:"domains,omitempty"` + ServiceCount *int64 `json:"service_count,omitempty"` + ServiceCountTcp *int64 `json:"service_count_tcp,omitempty"` + ServiceCountUdp *int64 `json:"service_count_udp,omitempty"` + ServiceCountArp *int64 `json:"service_count_arp,omitempty"` + ServiceCountIcmp *int64 `json:"service_count_icmp,omitempty"` + LowestTtl *int64 `json:"lowest_ttl,omitempty"` + LowestRtt *int64 `json:"lowest_rtt,omitempty"` + LastAgentId *string `json:"last_agent_id,omitempty"` + LastTaskId *string `json:"last_task_id,omitempty"` + NewestMac *string `json:"newest_mac,omitempty"` + NewestMacVendor *string `json:"newest_mac_vendor,omitempty"` + NewestMacAge *int64 `json:"newest_mac_age,omitempty"` + Comments *string `json:"comments,omitempty"` + ServicePortsTcp []string `json:"service_ports_tcp,omitempty"` + ServicePortsUdp []string `json:"service_ports_udp,omitempty"` + ServicePortsProtocols []string `json:"service_ports_protocols,omitempty"` + ServicePortsProducts []string `json:"service_ports_products,omitempty"` + OrgName *string `json:"org_name,omitempty"` + SiteName *string `json:"site_name,omitempty"` + AgentName *string `json:"agent_name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Services *map[string]map[string]string `json:"services,omitempty"` + Rtts map[string]interface{} `json:"rtts,omitempty"` + Credentials *map[string]map[string]bool `json:"credentials,omitempty"` + Attributes *map[string]string `json:"attributes,omitempty"` +} + +type _Vulnerability Vulnerability + +// NewVulnerability instantiates a new Vulnerability object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerability(id string) *Vulnerability { + this := Vulnerability{} + this.Id = id + return &this +} + +// NewVulnerabilityWithDefaults instantiates a new Vulnerability object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityWithDefaults() *Vulnerability { + this := Vulnerability{} + return &this +} + +// GetVulnerabilityId returns the VulnerabilityId field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityId() string { + if o == nil || IsNil(o.VulnerabilityId) { + var ret string + return ret + } + return *o.VulnerabilityId +} + +// GetVulnerabilityIdOk returns a tuple with the VulnerabilityId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityIdOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityId) { + return nil, false + } + return o.VulnerabilityId, true +} + +// HasVulnerabilityId returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityId() bool { + if o != nil && !IsNil(o.VulnerabilityId) { + return true + } + + return false +} + +// SetVulnerabilityId gets a reference to the given string and assigns it to the VulnerabilityId field. +func (o *Vulnerability) SetVulnerabilityId(v string) { + o.VulnerabilityId = &v +} + +// GetVulnerabilityAssetId returns the VulnerabilityAssetId field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityAssetId() string { + if o == nil || IsNil(o.VulnerabilityAssetId) { + var ret string + return ret + } + return *o.VulnerabilityAssetId +} + +// GetVulnerabilityAssetIdOk returns a tuple with the VulnerabilityAssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityAssetIdOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityAssetId) { + return nil, false + } + return o.VulnerabilityAssetId, true +} + +// HasVulnerabilityAssetId returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityAssetId() bool { + if o != nil && !IsNil(o.VulnerabilityAssetId) { + return true + } + + return false +} + +// SetVulnerabilityAssetId gets a reference to the given string and assigns it to the VulnerabilityAssetId field. +func (o *Vulnerability) SetVulnerabilityAssetId(v string) { + o.VulnerabilityAssetId = &v +} + +// GetVulnerabilityOrganizationId returns the VulnerabilityOrganizationId field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityOrganizationId() string { + if o == nil || IsNil(o.VulnerabilityOrganizationId) { + var ret string + return ret + } + return *o.VulnerabilityOrganizationId +} + +// GetVulnerabilityOrganizationIdOk returns a tuple with the VulnerabilityOrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityOrganizationId) { + return nil, false + } + return o.VulnerabilityOrganizationId, true +} + +// HasVulnerabilityOrganizationId returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityOrganizationId() bool { + if o != nil && !IsNil(o.VulnerabilityOrganizationId) { + return true + } + + return false +} + +// SetVulnerabilityOrganizationId gets a reference to the given string and assigns it to the VulnerabilityOrganizationId field. +func (o *Vulnerability) SetVulnerabilityOrganizationId(v string) { + o.VulnerabilityOrganizationId = &v +} + +// GetVulnerabilitySourceId returns the VulnerabilitySourceId field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilitySourceId() int32 { + if o == nil || IsNil(o.VulnerabilitySourceId) { + var ret int32 + return ret + } + return *o.VulnerabilitySourceId +} + +// GetVulnerabilitySourceIdOk returns a tuple with the VulnerabilitySourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilitySourceIdOk() (*int32, bool) { + if o == nil || IsNil(o.VulnerabilitySourceId) { + return nil, false + } + return o.VulnerabilitySourceId, true +} + +// HasVulnerabilitySourceId returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilitySourceId() bool { + if o != nil && !IsNil(o.VulnerabilitySourceId) { + return true + } + + return false +} + +// SetVulnerabilitySourceId gets a reference to the given int32 and assigns it to the VulnerabilitySourceId field. +func (o *Vulnerability) SetVulnerabilitySourceId(v int32) { + o.VulnerabilitySourceId = &v +} + +// GetVulnerabilityCreatedAt returns the VulnerabilityCreatedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCreatedAt() int64 { + if o == nil || IsNil(o.VulnerabilityCreatedAt) { + var ret int64 + return ret + } + return *o.VulnerabilityCreatedAt +} + +// GetVulnerabilityCreatedAtOk returns a tuple with the VulnerabilityCreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityCreatedAt) { + return nil, false + } + return o.VulnerabilityCreatedAt, true +} + +// HasVulnerabilityCreatedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCreatedAt() bool { + if o != nil && !IsNil(o.VulnerabilityCreatedAt) { + return true + } + + return false +} + +// SetVulnerabilityCreatedAt gets a reference to the given int64 and assigns it to the VulnerabilityCreatedAt field. +func (o *Vulnerability) SetVulnerabilityCreatedAt(v int64) { + o.VulnerabilityCreatedAt = &v +} + +// GetVulnerabilityUpdatedAt returns the VulnerabilityUpdatedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityUpdatedAt() int64 { + if o == nil || IsNil(o.VulnerabilityUpdatedAt) { + var ret int64 + return ret + } + return *o.VulnerabilityUpdatedAt +} + +// GetVulnerabilityUpdatedAtOk returns a tuple with the VulnerabilityUpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityUpdatedAt) { + return nil, false + } + return o.VulnerabilityUpdatedAt, true +} + +// HasVulnerabilityUpdatedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityUpdatedAt() bool { + if o != nil && !IsNil(o.VulnerabilityUpdatedAt) { + return true + } + + return false +} + +// SetVulnerabilityUpdatedAt gets a reference to the given int64 and assigns it to the VulnerabilityUpdatedAt field. +func (o *Vulnerability) SetVulnerabilityUpdatedAt(v int64) { + o.VulnerabilityUpdatedAt = &v +} + +// GetVulnerabilityServiceAddress returns the VulnerabilityServiceAddress field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Vulnerability) GetVulnerabilityServiceAddress() string { + if o == nil || IsNil(o.VulnerabilityServiceAddress.Get()) { + var ret string + return ret + } + return *o.VulnerabilityServiceAddress.Get() +} + +// GetVulnerabilityServiceAddressOk returns a tuple with the VulnerabilityServiceAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Vulnerability) GetVulnerabilityServiceAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.VulnerabilityServiceAddress.Get(), o.VulnerabilityServiceAddress.IsSet() +} + +// HasVulnerabilityServiceAddress returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityServiceAddress() bool { + if o != nil && o.VulnerabilityServiceAddress.IsSet() { + return true + } + + return false +} + +// SetVulnerabilityServiceAddress gets a reference to the given NullableString and assigns it to the VulnerabilityServiceAddress field. +func (o *Vulnerability) SetVulnerabilityServiceAddress(v string) { + o.VulnerabilityServiceAddress.Set(&v) +} +// SetVulnerabilityServiceAddressNil sets the value for VulnerabilityServiceAddress to be an explicit nil +func (o *Vulnerability) SetVulnerabilityServiceAddressNil() { + o.VulnerabilityServiceAddress.Set(nil) +} + +// UnsetVulnerabilityServiceAddress ensures that no value is present for VulnerabilityServiceAddress, not even an explicit nil +func (o *Vulnerability) UnsetVulnerabilityServiceAddress() { + o.VulnerabilityServiceAddress.Unset() +} + +// GetVulnerabilityServiceTransport returns the VulnerabilityServiceTransport field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityServiceTransport() string { + if o == nil || IsNil(o.VulnerabilityServiceTransport) { + var ret string + return ret + } + return *o.VulnerabilityServiceTransport +} + +// GetVulnerabilityServiceTransportOk returns a tuple with the VulnerabilityServiceTransport field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityServiceTransportOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityServiceTransport) { + return nil, false + } + return o.VulnerabilityServiceTransport, true +} + +// HasVulnerabilityServiceTransport returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityServiceTransport() bool { + if o != nil && !IsNil(o.VulnerabilityServiceTransport) { + return true + } + + return false +} + +// SetVulnerabilityServiceTransport gets a reference to the given string and assigns it to the VulnerabilityServiceTransport field. +func (o *Vulnerability) SetVulnerabilityServiceTransport(v string) { + o.VulnerabilityServiceTransport = &v +} + +// GetVulnerabilityServicePort returns the VulnerabilityServicePort field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityServicePort() int64 { + if o == nil || IsNil(o.VulnerabilityServicePort) { + var ret int64 + return ret + } + return *o.VulnerabilityServicePort +} + +// GetVulnerabilityServicePortOk returns a tuple with the VulnerabilityServicePort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityServicePortOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityServicePort) { + return nil, false + } + return o.VulnerabilityServicePort, true +} + +// HasVulnerabilityServicePort returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityServicePort() bool { + if o != nil && !IsNil(o.VulnerabilityServicePort) { + return true + } + + return false +} + +// SetVulnerabilityServicePort gets a reference to the given int64 and assigns it to the VulnerabilityServicePort field. +func (o *Vulnerability) SetVulnerabilityServicePort(v int64) { + o.VulnerabilityServicePort = &v +} + +// GetVulnerabilityCpe23 returns the VulnerabilityCpe23 field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCpe23() string { + if o == nil || IsNil(o.VulnerabilityCpe23) { + var ret string + return ret + } + return *o.VulnerabilityCpe23 +} + +// GetVulnerabilityCpe23Ok returns a tuple with the VulnerabilityCpe23 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCpe23Ok() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityCpe23) { + return nil, false + } + return o.VulnerabilityCpe23, true +} + +// HasVulnerabilityCpe23 returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCpe23() bool { + if o != nil && !IsNil(o.VulnerabilityCpe23) { + return true + } + + return false +} + +// SetVulnerabilityCpe23 gets a reference to the given string and assigns it to the VulnerabilityCpe23 field. +func (o *Vulnerability) SetVulnerabilityCpe23(v string) { + o.VulnerabilityCpe23 = &v +} + +// GetVulnerabilityVulnId returns the VulnerabilityVulnId field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityVulnId() string { + if o == nil || IsNil(o.VulnerabilityVulnId) { + var ret string + return ret + } + return *o.VulnerabilityVulnId +} + +// GetVulnerabilityVulnIdOk returns a tuple with the VulnerabilityVulnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityVulnIdOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityVulnId) { + return nil, false + } + return o.VulnerabilityVulnId, true +} + +// HasVulnerabilityVulnId returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityVulnId() bool { + if o != nil && !IsNil(o.VulnerabilityVulnId) { + return true + } + + return false +} + +// SetVulnerabilityVulnId gets a reference to the given string and assigns it to the VulnerabilityVulnId field. +func (o *Vulnerability) SetVulnerabilityVulnId(v string) { + o.VulnerabilityVulnId = &v +} + +// GetVulnerabilityCategory returns the VulnerabilityCategory field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCategory() string { + if o == nil || IsNil(o.VulnerabilityCategory) { + var ret string + return ret + } + return *o.VulnerabilityCategory +} + +// GetVulnerabilityCategoryOk returns a tuple with the VulnerabilityCategory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCategoryOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityCategory) { + return nil, false + } + return o.VulnerabilityCategory, true +} + +// HasVulnerabilityCategory returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCategory() bool { + if o != nil && !IsNil(o.VulnerabilityCategory) { + return true + } + + return false +} + +// SetVulnerabilityCategory gets a reference to the given string and assigns it to the VulnerabilityCategory field. +func (o *Vulnerability) SetVulnerabilityCategory(v string) { + o.VulnerabilityCategory = &v +} + +// GetVulnerabilityName returns the VulnerabilityName field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityName() string { + if o == nil || IsNil(o.VulnerabilityName) { + var ret string + return ret + } + return *o.VulnerabilityName +} + +// GetVulnerabilityNameOk returns a tuple with the VulnerabilityName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityNameOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityName) { + return nil, false + } + return o.VulnerabilityName, true +} + +// HasVulnerabilityName returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityName() bool { + if o != nil && !IsNil(o.VulnerabilityName) { + return true + } + + return false +} + +// SetVulnerabilityName gets a reference to the given string and assigns it to the VulnerabilityName field. +func (o *Vulnerability) SetVulnerabilityName(v string) { + o.VulnerabilityName = &v +} + +// GetVulnerabilityDescription returns the VulnerabilityDescription field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityDescription() string { + if o == nil || IsNil(o.VulnerabilityDescription) { + var ret string + return ret + } + return *o.VulnerabilityDescription +} + +// GetVulnerabilityDescriptionOk returns a tuple with the VulnerabilityDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityDescription) { + return nil, false + } + return o.VulnerabilityDescription, true +} + +// HasVulnerabilityDescription returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityDescription() bool { + if o != nil && !IsNil(o.VulnerabilityDescription) { + return true + } + + return false +} + +// SetVulnerabilityDescription gets a reference to the given string and assigns it to the VulnerabilityDescription field. +func (o *Vulnerability) SetVulnerabilityDescription(v string) { + o.VulnerabilityDescription = &v +} + +// GetVulnerabilitySolution returns the VulnerabilitySolution field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilitySolution() string { + if o == nil || IsNil(o.VulnerabilitySolution) { + var ret string + return ret + } + return *o.VulnerabilitySolution +} + +// GetVulnerabilitySolutionOk returns a tuple with the VulnerabilitySolution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilitySolutionOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilitySolution) { + return nil, false + } + return o.VulnerabilitySolution, true +} + +// HasVulnerabilitySolution returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilitySolution() bool { + if o != nil && !IsNil(o.VulnerabilitySolution) { + return true + } + + return false +} + +// SetVulnerabilitySolution gets a reference to the given string and assigns it to the VulnerabilitySolution field. +func (o *Vulnerability) SetVulnerabilitySolution(v string) { + o.VulnerabilitySolution = &v +} + +// GetVulnerabilityCve returns the VulnerabilityCve field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCve() string { + if o == nil || IsNil(o.VulnerabilityCve) { + var ret string + return ret + } + return *o.VulnerabilityCve +} + +// GetVulnerabilityCveOk returns a tuple with the VulnerabilityCve field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCveOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityCve) { + return nil, false + } + return o.VulnerabilityCve, true +} + +// HasVulnerabilityCve returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCve() bool { + if o != nil && !IsNil(o.VulnerabilityCve) { + return true + } + + return false +} + +// SetVulnerabilityCve gets a reference to the given string and assigns it to the VulnerabilityCve field. +func (o *Vulnerability) SetVulnerabilityCve(v string) { + o.VulnerabilityCve = &v +} + +// GetVulnerabilityCvss2BaseScore returns the VulnerabilityCvss2BaseScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCvss2BaseScore() float64 { + if o == nil || IsNil(o.VulnerabilityCvss2BaseScore) { + var ret float64 + return ret + } + return *o.VulnerabilityCvss2BaseScore +} + +// GetVulnerabilityCvss2BaseScoreOk returns a tuple with the VulnerabilityCvss2BaseScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCvss2BaseScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilityCvss2BaseScore) { + return nil, false + } + return o.VulnerabilityCvss2BaseScore, true +} + +// HasVulnerabilityCvss2BaseScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCvss2BaseScore() bool { + if o != nil && !IsNil(o.VulnerabilityCvss2BaseScore) { + return true + } + + return false +} + +// SetVulnerabilityCvss2BaseScore gets a reference to the given float64 and assigns it to the VulnerabilityCvss2BaseScore field. +func (o *Vulnerability) SetVulnerabilityCvss2BaseScore(v float64) { + o.VulnerabilityCvss2BaseScore = &v +} + +// GetVulnerabilityCvss2TemporalScore returns the VulnerabilityCvss2TemporalScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCvss2TemporalScore() float64 { + if o == nil || IsNil(o.VulnerabilityCvss2TemporalScore) { + var ret float64 + return ret + } + return *o.VulnerabilityCvss2TemporalScore +} + +// GetVulnerabilityCvss2TemporalScoreOk returns a tuple with the VulnerabilityCvss2TemporalScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCvss2TemporalScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilityCvss2TemporalScore) { + return nil, false + } + return o.VulnerabilityCvss2TemporalScore, true +} + +// HasVulnerabilityCvss2TemporalScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCvss2TemporalScore() bool { + if o != nil && !IsNil(o.VulnerabilityCvss2TemporalScore) { + return true + } + + return false +} + +// SetVulnerabilityCvss2TemporalScore gets a reference to the given float64 and assigns it to the VulnerabilityCvss2TemporalScore field. +func (o *Vulnerability) SetVulnerabilityCvss2TemporalScore(v float64) { + o.VulnerabilityCvss2TemporalScore = &v +} + +// GetVulnerabilityCvss3BaseScore returns the VulnerabilityCvss3BaseScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCvss3BaseScore() float64 { + if o == nil || IsNil(o.VulnerabilityCvss3BaseScore) { + var ret float64 + return ret + } + return *o.VulnerabilityCvss3BaseScore +} + +// GetVulnerabilityCvss3BaseScoreOk returns a tuple with the VulnerabilityCvss3BaseScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCvss3BaseScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilityCvss3BaseScore) { + return nil, false + } + return o.VulnerabilityCvss3BaseScore, true +} + +// HasVulnerabilityCvss3BaseScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCvss3BaseScore() bool { + if o != nil && !IsNil(o.VulnerabilityCvss3BaseScore) { + return true + } + + return false +} + +// SetVulnerabilityCvss3BaseScore gets a reference to the given float64 and assigns it to the VulnerabilityCvss3BaseScore field. +func (o *Vulnerability) SetVulnerabilityCvss3BaseScore(v float64) { + o.VulnerabilityCvss3BaseScore = &v +} + +// GetVulnerabilityCvss3TemporalScore returns the VulnerabilityCvss3TemporalScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityCvss3TemporalScore() float64 { + if o == nil || IsNil(o.VulnerabilityCvss3TemporalScore) { + var ret float64 + return ret + } + return *o.VulnerabilityCvss3TemporalScore +} + +// GetVulnerabilityCvss3TemporalScoreOk returns a tuple with the VulnerabilityCvss3TemporalScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityCvss3TemporalScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilityCvss3TemporalScore) { + return nil, false + } + return o.VulnerabilityCvss3TemporalScore, true +} + +// HasVulnerabilityCvss3TemporalScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityCvss3TemporalScore() bool { + if o != nil && !IsNil(o.VulnerabilityCvss3TemporalScore) { + return true + } + + return false +} + +// SetVulnerabilityCvss3TemporalScore gets a reference to the given float64 and assigns it to the VulnerabilityCvss3TemporalScore field. +func (o *Vulnerability) SetVulnerabilityCvss3TemporalScore(v float64) { + o.VulnerabilityCvss3TemporalScore = &v +} + +// GetVulnerabilitySeverity returns the VulnerabilitySeverity field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilitySeverity() string { + if o == nil || IsNil(o.VulnerabilitySeverity) { + var ret string + return ret + } + return *o.VulnerabilitySeverity +} + +// GetVulnerabilitySeverityOk returns a tuple with the VulnerabilitySeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilitySeverityOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilitySeverity) { + return nil, false + } + return o.VulnerabilitySeverity, true +} + +// HasVulnerabilitySeverity returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilitySeverity() bool { + if o != nil && !IsNil(o.VulnerabilitySeverity) { + return true + } + + return false +} + +// SetVulnerabilitySeverity gets a reference to the given string and assigns it to the VulnerabilitySeverity field. +func (o *Vulnerability) SetVulnerabilitySeverity(v string) { + o.VulnerabilitySeverity = &v +} + +// GetVulnerabilitySeverityScore returns the VulnerabilitySeverityScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilitySeverityScore() float64 { + if o == nil || IsNil(o.VulnerabilitySeverityScore) { + var ret float64 + return ret + } + return *o.VulnerabilitySeverityScore +} + +// GetVulnerabilitySeverityScoreOk returns a tuple with the VulnerabilitySeverityScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilitySeverityScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilitySeverityScore) { + return nil, false + } + return o.VulnerabilitySeverityScore, true +} + +// HasVulnerabilitySeverityScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilitySeverityScore() bool { + if o != nil && !IsNil(o.VulnerabilitySeverityScore) { + return true + } + + return false +} + +// SetVulnerabilitySeverityScore gets a reference to the given float64 and assigns it to the VulnerabilitySeverityScore field. +func (o *Vulnerability) SetVulnerabilitySeverityScore(v float64) { + o.VulnerabilitySeverityScore = &v +} + +// GetVulnerabilityRisk returns the VulnerabilityRisk field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityRisk() string { + if o == nil || IsNil(o.VulnerabilityRisk) { + var ret string + return ret + } + return *o.VulnerabilityRisk +} + +// GetVulnerabilityRiskOk returns a tuple with the VulnerabilityRisk field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityRiskOk() (*string, bool) { + if o == nil || IsNil(o.VulnerabilityRisk) { + return nil, false + } + return o.VulnerabilityRisk, true +} + +// HasVulnerabilityRisk returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityRisk() bool { + if o != nil && !IsNil(o.VulnerabilityRisk) { + return true + } + + return false +} + +// SetVulnerabilityRisk gets a reference to the given string and assigns it to the VulnerabilityRisk field. +func (o *Vulnerability) SetVulnerabilityRisk(v string) { + o.VulnerabilityRisk = &v +} + +// GetVulnerabilityRiskScore returns the VulnerabilityRiskScore field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityRiskScore() float64 { + if o == nil || IsNil(o.VulnerabilityRiskScore) { + var ret float64 + return ret + } + return *o.VulnerabilityRiskScore +} + +// GetVulnerabilityRiskScoreOk returns a tuple with the VulnerabilityRiskScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityRiskScoreOk() (*float64, bool) { + if o == nil || IsNil(o.VulnerabilityRiskScore) { + return nil, false + } + return o.VulnerabilityRiskScore, true +} + +// HasVulnerabilityRiskScore returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityRiskScore() bool { + if o != nil && !IsNil(o.VulnerabilityRiskScore) { + return true + } + + return false +} + +// SetVulnerabilityRiskScore gets a reference to the given float64 and assigns it to the VulnerabilityRiskScore field. +func (o *Vulnerability) SetVulnerabilityRiskScore(v float64) { + o.VulnerabilityRiskScore = &v +} + +// GetVulnerabilityPublishedAt returns the VulnerabilityPublishedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityPublishedAt() int64 { + if o == nil || IsNil(o.VulnerabilityPublishedAt) { + var ret int64 + return ret + } + return *o.VulnerabilityPublishedAt +} + +// GetVulnerabilityPublishedAtOk returns a tuple with the VulnerabilityPublishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityPublishedAtOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityPublishedAt) { + return nil, false + } + return o.VulnerabilityPublishedAt, true +} + +// HasVulnerabilityPublishedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityPublishedAt() bool { + if o != nil && !IsNil(o.VulnerabilityPublishedAt) { + return true + } + + return false +} + +// SetVulnerabilityPublishedAt gets a reference to the given int64 and assigns it to the VulnerabilityPublishedAt field. +func (o *Vulnerability) SetVulnerabilityPublishedAt(v int64) { + o.VulnerabilityPublishedAt = &v +} + +// GetVulnerabilityFirstDetectedAt returns the VulnerabilityFirstDetectedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityFirstDetectedAt() int64 { + if o == nil || IsNil(o.VulnerabilityFirstDetectedAt) { + var ret int64 + return ret + } + return *o.VulnerabilityFirstDetectedAt +} + +// GetVulnerabilityFirstDetectedAtOk returns a tuple with the VulnerabilityFirstDetectedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityFirstDetectedAtOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityFirstDetectedAt) { + return nil, false + } + return o.VulnerabilityFirstDetectedAt, true +} + +// HasVulnerabilityFirstDetectedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityFirstDetectedAt() bool { + if o != nil && !IsNil(o.VulnerabilityFirstDetectedAt) { + return true + } + + return false +} + +// SetVulnerabilityFirstDetectedAt gets a reference to the given int64 and assigns it to the VulnerabilityFirstDetectedAt field. +func (o *Vulnerability) SetVulnerabilityFirstDetectedAt(v int64) { + o.VulnerabilityFirstDetectedAt = &v +} + +// GetVulnerabilityLastDetectedAt returns the VulnerabilityLastDetectedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityLastDetectedAt() int64 { + if o == nil || IsNil(o.VulnerabilityLastDetectedAt) { + var ret int64 + return ret + } + return *o.VulnerabilityLastDetectedAt +} + +// GetVulnerabilityLastDetectedAtOk returns a tuple with the VulnerabilityLastDetectedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityLastDetectedAtOk() (*int64, bool) { + if o == nil || IsNil(o.VulnerabilityLastDetectedAt) { + return nil, false + } + return o.VulnerabilityLastDetectedAt, true +} + +// HasVulnerabilityLastDetectedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityLastDetectedAt() bool { + if o != nil && !IsNil(o.VulnerabilityLastDetectedAt) { + return true + } + + return false +} + +// SetVulnerabilityLastDetectedAt gets a reference to the given int64 and assigns it to the VulnerabilityLastDetectedAt field. +func (o *Vulnerability) SetVulnerabilityLastDetectedAt(v int64) { + o.VulnerabilityLastDetectedAt = &v +} + +// GetVulnerabilityAttributes returns the VulnerabilityAttributes field value if set, zero value otherwise. +func (o *Vulnerability) GetVulnerabilityAttributes() map[string]string { + if o == nil || IsNil(o.VulnerabilityAttributes) { + var ret map[string]string + return ret + } + return *o.VulnerabilityAttributes +} + +// GetVulnerabilityAttributesOk returns a tuple with the VulnerabilityAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetVulnerabilityAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.VulnerabilityAttributes) { + return nil, false + } + return o.VulnerabilityAttributes, true +} + +// HasVulnerabilityAttributes returns a boolean if a field has been set. +func (o *Vulnerability) HasVulnerabilityAttributes() bool { + if o != nil && !IsNil(o.VulnerabilityAttributes) { + return true + } + + return false +} + +// SetVulnerabilityAttributes gets a reference to the given map[string]string and assigns it to the VulnerabilityAttributes field. +func (o *Vulnerability) SetVulnerabilityAttributes(v map[string]string) { + o.VulnerabilityAttributes = &v +} + +// GetId returns the Id field value +func (o *Vulnerability) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Vulnerability) SetId(v string) { + o.Id = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetCreatedAt() int64 { + if o == nil || IsNil(o.CreatedAt) { + var ret int64 + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetCreatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +func (o *Vulnerability) SetCreatedAt(v int64) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Vulnerability) GetUpdatedAt() int64 { + if o == nil || IsNil(o.UpdatedAt) { + var ret int64 + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetUpdatedAtOk() (*int64, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Vulnerability) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. +func (o *Vulnerability) SetUpdatedAt(v int64) { + o.UpdatedAt = &v +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *Vulnerability) GetOrganizationId() string { + if o == nil || IsNil(o.OrganizationId) { + var ret string + return ret + } + return *o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *Vulnerability) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *Vulnerability) SetOrganizationId(v string) { + o.OrganizationId = &v +} + +// GetSiteId returns the SiteId field value if set, zero value otherwise. +func (o *Vulnerability) GetSiteId() string { + if o == nil || IsNil(o.SiteId) { + var ret string + return ret + } + return *o.SiteId +} + +// GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetSiteIdOk() (*string, bool) { + if o == nil || IsNil(o.SiteId) { + return nil, false + } + return o.SiteId, true +} + +// HasSiteId returns a boolean if a field has been set. +func (o *Vulnerability) HasSiteId() bool { + if o != nil && !IsNil(o.SiteId) { + return true + } + + return false +} + +// SetSiteId gets a reference to the given string and assigns it to the SiteId field. +func (o *Vulnerability) SetSiteId(v string) { + o.SiteId = &v +} + +// GetAlive returns the Alive field value if set, zero value otherwise. +func (o *Vulnerability) GetAlive() bool { + if o == nil || IsNil(o.Alive) { + var ret bool + return ret + } + return *o.Alive +} + +// GetAliveOk returns a tuple with the Alive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAliveOk() (*bool, bool) { + if o == nil || IsNil(o.Alive) { + return nil, false + } + return o.Alive, true +} + +// HasAlive returns a boolean if a field has been set. +func (o *Vulnerability) HasAlive() bool { + if o != nil && !IsNil(o.Alive) { + return true + } + + return false +} + +// SetAlive gets a reference to the given bool and assigns it to the Alive field. +func (o *Vulnerability) SetAlive(v bool) { + o.Alive = &v +} + +// GetFirstSeen returns the FirstSeen field value if set, zero value otherwise. +func (o *Vulnerability) GetFirstSeen() int64 { + if o == nil || IsNil(o.FirstSeen) { + var ret int64 + return ret + } + return *o.FirstSeen +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetFirstSeenOk() (*int64, bool) { + if o == nil || IsNil(o.FirstSeen) { + return nil, false + } + return o.FirstSeen, true +} + +// HasFirstSeen returns a boolean if a field has been set. +func (o *Vulnerability) HasFirstSeen() bool { + if o != nil && !IsNil(o.FirstSeen) { + return true + } + + return false +} + +// SetFirstSeen gets a reference to the given int64 and assigns it to the FirstSeen field. +func (o *Vulnerability) SetFirstSeen(v int64) { + o.FirstSeen = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *Vulnerability) GetLastSeen() int64 { + if o == nil || IsNil(o.LastSeen) { + var ret int64 + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetLastSeenOk() (*int64, bool) { + if o == nil || IsNil(o.LastSeen) { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *Vulnerability) HasLastSeen() bool { + if o != nil && !IsNil(o.LastSeen) { + return true + } + + return false +} + +// SetLastSeen gets a reference to the given int64 and assigns it to the LastSeen field. +func (o *Vulnerability) SetLastSeen(v int64) { + o.LastSeen = &v +} + +// GetDetectedBy returns the DetectedBy field value if set, zero value otherwise. +func (o *Vulnerability) GetDetectedBy() string { + if o == nil || IsNil(o.DetectedBy) { + var ret string + return ret + } + return *o.DetectedBy +} + +// GetDetectedByOk returns a tuple with the DetectedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetDetectedByOk() (*string, bool) { + if o == nil || IsNil(o.DetectedBy) { + return nil, false + } + return o.DetectedBy, true +} + +// HasDetectedBy returns a boolean if a field has been set. +func (o *Vulnerability) HasDetectedBy() bool { + if o != nil && !IsNil(o.DetectedBy) { + return true + } + + return false +} + +// SetDetectedBy gets a reference to the given string and assigns it to the DetectedBy field. +func (o *Vulnerability) SetDetectedBy(v string) { + o.DetectedBy = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Vulnerability) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Vulnerability) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Vulnerability) SetType(v string) { + o.Type = &v +} + +// GetOs returns the Os field value if set, zero value otherwise. +func (o *Vulnerability) GetOs() string { + if o == nil || IsNil(o.Os) { + var ret string + return ret + } + return *o.Os +} + +// GetOsOk returns a tuple with the Os field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetOsOk() (*string, bool) { + if o == nil || IsNil(o.Os) { + return nil, false + } + return o.Os, true +} + +// HasOs returns a boolean if a field has been set. +func (o *Vulnerability) HasOs() bool { + if o != nil && !IsNil(o.Os) { + return true + } + + return false +} + +// SetOs gets a reference to the given string and assigns it to the Os field. +func (o *Vulnerability) SetOs(v string) { + o.Os = &v +} + +// GetOsVersion returns the OsVersion field value if set, zero value otherwise. +func (o *Vulnerability) GetOsVersion() string { + if o == nil || IsNil(o.OsVersion) { + var ret string + return ret + } + return *o.OsVersion +} + +// GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetOsVersionOk() (*string, bool) { + if o == nil || IsNil(o.OsVersion) { + return nil, false + } + return o.OsVersion, true +} + +// HasOsVersion returns a boolean if a field has been set. +func (o *Vulnerability) HasOsVersion() bool { + if o != nil && !IsNil(o.OsVersion) { + return true + } + + return false +} + +// SetOsVersion gets a reference to the given string and assigns it to the OsVersion field. +func (o *Vulnerability) SetOsVersion(v string) { + o.OsVersion = &v +} + +// GetHw returns the Hw field value if set, zero value otherwise. +func (o *Vulnerability) GetHw() string { + if o == nil || IsNil(o.Hw) { + var ret string + return ret + } + return *o.Hw +} + +// GetHwOk returns a tuple with the Hw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetHwOk() (*string, bool) { + if o == nil || IsNil(o.Hw) { + return nil, false + } + return o.Hw, true +} + +// HasHw returns a boolean if a field has been set. +func (o *Vulnerability) HasHw() bool { + if o != nil && !IsNil(o.Hw) { + return true + } + + return false +} + +// SetHw gets a reference to the given string and assigns it to the Hw field. +func (o *Vulnerability) SetHw(v string) { + o.Hw = &v +} + +// GetAddresses returns the Addresses field value if set, zero value otherwise. +func (o *Vulnerability) GetAddresses() []*string { + if o == nil || IsNil(o.Addresses) { + var ret []*string + return ret + } + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAddressesOk() ([]*string, bool) { + if o == nil || IsNil(o.Addresses) { + return nil, false + } + return o.Addresses, true +} + +// HasAddresses returns a boolean if a field has been set. +func (o *Vulnerability) HasAddresses() bool { + if o != nil && !IsNil(o.Addresses) { + return true + } + + return false +} + +// SetAddresses gets a reference to the given []*string and assigns it to the Addresses field. +func (o *Vulnerability) SetAddresses(v []*string) { + o.Addresses = v +} + +// GetAddressesExtra returns the AddressesExtra field value if set, zero value otherwise. +func (o *Vulnerability) GetAddressesExtra() []*string { + if o == nil || IsNil(o.AddressesExtra) { + var ret []*string + return ret + } + return o.AddressesExtra +} + +// GetAddressesExtraOk returns a tuple with the AddressesExtra field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAddressesExtraOk() ([]*string, bool) { + if o == nil || IsNil(o.AddressesExtra) { + return nil, false + } + return o.AddressesExtra, true +} + +// HasAddressesExtra returns a boolean if a field has been set. +func (o *Vulnerability) HasAddressesExtra() bool { + if o != nil && !IsNil(o.AddressesExtra) { + return true + } + + return false +} + +// SetAddressesExtra gets a reference to the given []*string and assigns it to the AddressesExtra field. +func (o *Vulnerability) SetAddressesExtra(v []*string) { + o.AddressesExtra = v +} + +// GetMacs returns the Macs field value if set, zero value otherwise. +func (o *Vulnerability) GetMacs() []string { + if o == nil || IsNil(o.Macs) { + var ret []string + return ret + } + return o.Macs +} + +// GetMacsOk returns a tuple with the Macs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetMacsOk() ([]string, bool) { + if o == nil || IsNil(o.Macs) { + return nil, false + } + return o.Macs, true +} + +// HasMacs returns a boolean if a field has been set. +func (o *Vulnerability) HasMacs() bool { + if o != nil && !IsNil(o.Macs) { + return true + } + + return false +} + +// SetMacs gets a reference to the given []string and assigns it to the Macs field. +func (o *Vulnerability) SetMacs(v []string) { + o.Macs = v +} + +// GetMacVendors returns the MacVendors field value if set, zero value otherwise. +func (o *Vulnerability) GetMacVendors() []string { + if o == nil || IsNil(o.MacVendors) { + var ret []string + return ret + } + return o.MacVendors +} + +// GetMacVendorsOk returns a tuple with the MacVendors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetMacVendorsOk() ([]string, bool) { + if o == nil || IsNil(o.MacVendors) { + return nil, false + } + return o.MacVendors, true +} + +// HasMacVendors returns a boolean if a field has been set. +func (o *Vulnerability) HasMacVendors() bool { + if o != nil && !IsNil(o.MacVendors) { + return true + } + + return false +} + +// SetMacVendors gets a reference to the given []string and assigns it to the MacVendors field. +func (o *Vulnerability) SetMacVendors(v []string) { + o.MacVendors = v +} + +// GetNames returns the Names field value if set, zero value otherwise. +func (o *Vulnerability) GetNames() []string { + if o == nil || IsNil(o.Names) { + var ret []string + return ret + } + return o.Names +} + +// GetNamesOk returns a tuple with the Names field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { + return nil, false + } + return o.Names, true +} + +// HasNames returns a boolean if a field has been set. +func (o *Vulnerability) HasNames() bool { + if o != nil && !IsNil(o.Names) { + return true + } + + return false +} + +// SetNames gets a reference to the given []string and assigns it to the Names field. +func (o *Vulnerability) SetNames(v []string) { + o.Names = v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *Vulnerability) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *Vulnerability) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *Vulnerability) SetDomains(v []string) { + o.Domains = v +} + +// GetServiceCount returns the ServiceCount field value if set, zero value otherwise. +func (o *Vulnerability) GetServiceCount() int64 { + if o == nil || IsNil(o.ServiceCount) { + var ret int64 + return ret + } + return *o.ServiceCount +} + +// GetServiceCountOk returns a tuple with the ServiceCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServiceCountOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCount) { + return nil, false + } + return o.ServiceCount, true +} + +// HasServiceCount returns a boolean if a field has been set. +func (o *Vulnerability) HasServiceCount() bool { + if o != nil && !IsNil(o.ServiceCount) { + return true + } + + return false +} + +// SetServiceCount gets a reference to the given int64 and assigns it to the ServiceCount field. +func (o *Vulnerability) SetServiceCount(v int64) { + o.ServiceCount = &v +} + +// GetServiceCountTcp returns the ServiceCountTcp field value if set, zero value otherwise. +func (o *Vulnerability) GetServiceCountTcp() int64 { + if o == nil || IsNil(o.ServiceCountTcp) { + var ret int64 + return ret + } + return *o.ServiceCountTcp +} + +// GetServiceCountTcpOk returns a tuple with the ServiceCountTcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServiceCountTcpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountTcp) { + return nil, false + } + return o.ServiceCountTcp, true +} + +// HasServiceCountTcp returns a boolean if a field has been set. +func (o *Vulnerability) HasServiceCountTcp() bool { + if o != nil && !IsNil(o.ServiceCountTcp) { + return true + } + + return false +} + +// SetServiceCountTcp gets a reference to the given int64 and assigns it to the ServiceCountTcp field. +func (o *Vulnerability) SetServiceCountTcp(v int64) { + o.ServiceCountTcp = &v +} + +// GetServiceCountUdp returns the ServiceCountUdp field value if set, zero value otherwise. +func (o *Vulnerability) GetServiceCountUdp() int64 { + if o == nil || IsNil(o.ServiceCountUdp) { + var ret int64 + return ret + } + return *o.ServiceCountUdp +} + +// GetServiceCountUdpOk returns a tuple with the ServiceCountUdp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServiceCountUdpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountUdp) { + return nil, false + } + return o.ServiceCountUdp, true +} + +// HasServiceCountUdp returns a boolean if a field has been set. +func (o *Vulnerability) HasServiceCountUdp() bool { + if o != nil && !IsNil(o.ServiceCountUdp) { + return true + } + + return false +} + +// SetServiceCountUdp gets a reference to the given int64 and assigns it to the ServiceCountUdp field. +func (o *Vulnerability) SetServiceCountUdp(v int64) { + o.ServiceCountUdp = &v +} + +// GetServiceCountArp returns the ServiceCountArp field value if set, zero value otherwise. +func (o *Vulnerability) GetServiceCountArp() int64 { + if o == nil || IsNil(o.ServiceCountArp) { + var ret int64 + return ret + } + return *o.ServiceCountArp +} + +// GetServiceCountArpOk returns a tuple with the ServiceCountArp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServiceCountArpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountArp) { + return nil, false + } + return o.ServiceCountArp, true +} + +// HasServiceCountArp returns a boolean if a field has been set. +func (o *Vulnerability) HasServiceCountArp() bool { + if o != nil && !IsNil(o.ServiceCountArp) { + return true + } + + return false +} + +// SetServiceCountArp gets a reference to the given int64 and assigns it to the ServiceCountArp field. +func (o *Vulnerability) SetServiceCountArp(v int64) { + o.ServiceCountArp = &v +} + +// GetServiceCountIcmp returns the ServiceCountIcmp field value if set, zero value otherwise. +func (o *Vulnerability) GetServiceCountIcmp() int64 { + if o == nil || IsNil(o.ServiceCountIcmp) { + var ret int64 + return ret + } + return *o.ServiceCountIcmp +} + +// GetServiceCountIcmpOk returns a tuple with the ServiceCountIcmp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServiceCountIcmpOk() (*int64, bool) { + if o == nil || IsNil(o.ServiceCountIcmp) { + return nil, false + } + return o.ServiceCountIcmp, true +} + +// HasServiceCountIcmp returns a boolean if a field has been set. +func (o *Vulnerability) HasServiceCountIcmp() bool { + if o != nil && !IsNil(o.ServiceCountIcmp) { + return true + } + + return false +} + +// SetServiceCountIcmp gets a reference to the given int64 and assigns it to the ServiceCountIcmp field. +func (o *Vulnerability) SetServiceCountIcmp(v int64) { + o.ServiceCountIcmp = &v +} + +// GetLowestTtl returns the LowestTtl field value if set, zero value otherwise. +func (o *Vulnerability) GetLowestTtl() int64 { + if o == nil || IsNil(o.LowestTtl) { + var ret int64 + return ret + } + return *o.LowestTtl +} + +// GetLowestTtlOk returns a tuple with the LowestTtl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetLowestTtlOk() (*int64, bool) { + if o == nil || IsNil(o.LowestTtl) { + return nil, false + } + return o.LowestTtl, true +} + +// HasLowestTtl returns a boolean if a field has been set. +func (o *Vulnerability) HasLowestTtl() bool { + if o != nil && !IsNil(o.LowestTtl) { + return true + } + + return false +} + +// SetLowestTtl gets a reference to the given int64 and assigns it to the LowestTtl field. +func (o *Vulnerability) SetLowestTtl(v int64) { + o.LowestTtl = &v +} + +// GetLowestRtt returns the LowestRtt field value if set, zero value otherwise. +func (o *Vulnerability) GetLowestRtt() int64 { + if o == nil || IsNil(o.LowestRtt) { + var ret int64 + return ret + } + return *o.LowestRtt +} + +// GetLowestRttOk returns a tuple with the LowestRtt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetLowestRttOk() (*int64, bool) { + if o == nil || IsNil(o.LowestRtt) { + return nil, false + } + return o.LowestRtt, true +} + +// HasLowestRtt returns a boolean if a field has been set. +func (o *Vulnerability) HasLowestRtt() bool { + if o != nil && !IsNil(o.LowestRtt) { + return true + } + + return false +} + +// SetLowestRtt gets a reference to the given int64 and assigns it to the LowestRtt field. +func (o *Vulnerability) SetLowestRtt(v int64) { + o.LowestRtt = &v +} + +// GetLastAgentId returns the LastAgentId field value if set, zero value otherwise. +func (o *Vulnerability) GetLastAgentId() string { + if o == nil || IsNil(o.LastAgentId) { + var ret string + return ret + } + return *o.LastAgentId +} + +// GetLastAgentIdOk returns a tuple with the LastAgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetLastAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.LastAgentId) { + return nil, false + } + return o.LastAgentId, true +} + +// HasLastAgentId returns a boolean if a field has been set. +func (o *Vulnerability) HasLastAgentId() bool { + if o != nil && !IsNil(o.LastAgentId) { + return true + } + + return false +} + +// SetLastAgentId gets a reference to the given string and assigns it to the LastAgentId field. +func (o *Vulnerability) SetLastAgentId(v string) { + o.LastAgentId = &v +} + +// GetLastTaskId returns the LastTaskId field value if set, zero value otherwise. +func (o *Vulnerability) GetLastTaskId() string { + if o == nil || IsNil(o.LastTaskId) { + var ret string + return ret + } + return *o.LastTaskId +} + +// GetLastTaskIdOk returns a tuple with the LastTaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetLastTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.LastTaskId) { + return nil, false + } + return o.LastTaskId, true +} + +// HasLastTaskId returns a boolean if a field has been set. +func (o *Vulnerability) HasLastTaskId() bool { + if o != nil && !IsNil(o.LastTaskId) { + return true + } + + return false +} + +// SetLastTaskId gets a reference to the given string and assigns it to the LastTaskId field. +func (o *Vulnerability) SetLastTaskId(v string) { + o.LastTaskId = &v +} + +// GetNewestMac returns the NewestMac field value if set, zero value otherwise. +func (o *Vulnerability) GetNewestMac() string { + if o == nil || IsNil(o.NewestMac) { + var ret string + return ret + } + return *o.NewestMac +} + +// GetNewestMacOk returns a tuple with the NewestMac field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetNewestMacOk() (*string, bool) { + if o == nil || IsNil(o.NewestMac) { + return nil, false + } + return o.NewestMac, true +} + +// HasNewestMac returns a boolean if a field has been set. +func (o *Vulnerability) HasNewestMac() bool { + if o != nil && !IsNil(o.NewestMac) { + return true + } + + return false +} + +// SetNewestMac gets a reference to the given string and assigns it to the NewestMac field. +func (o *Vulnerability) SetNewestMac(v string) { + o.NewestMac = &v +} + +// GetNewestMacVendor returns the NewestMacVendor field value if set, zero value otherwise. +func (o *Vulnerability) GetNewestMacVendor() string { + if o == nil || IsNil(o.NewestMacVendor) { + var ret string + return ret + } + return *o.NewestMacVendor +} + +// GetNewestMacVendorOk returns a tuple with the NewestMacVendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetNewestMacVendorOk() (*string, bool) { + if o == nil || IsNil(o.NewestMacVendor) { + return nil, false + } + return o.NewestMacVendor, true +} + +// HasNewestMacVendor returns a boolean if a field has been set. +func (o *Vulnerability) HasNewestMacVendor() bool { + if o != nil && !IsNil(o.NewestMacVendor) { + return true + } + + return false +} + +// SetNewestMacVendor gets a reference to the given string and assigns it to the NewestMacVendor field. +func (o *Vulnerability) SetNewestMacVendor(v string) { + o.NewestMacVendor = &v +} + +// GetNewestMacAge returns the NewestMacAge field value if set, zero value otherwise. +func (o *Vulnerability) GetNewestMacAge() int64 { + if o == nil || IsNil(o.NewestMacAge) { + var ret int64 + return ret + } + return *o.NewestMacAge +} + +// GetNewestMacAgeOk returns a tuple with the NewestMacAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetNewestMacAgeOk() (*int64, bool) { + if o == nil || IsNil(o.NewestMacAge) { + return nil, false + } + return o.NewestMacAge, true +} + +// HasNewestMacAge returns a boolean if a field has been set. +func (o *Vulnerability) HasNewestMacAge() bool { + if o != nil && !IsNil(o.NewestMacAge) { + return true + } + + return false +} + +// SetNewestMacAge gets a reference to the given int64 and assigns it to the NewestMacAge field. +func (o *Vulnerability) SetNewestMacAge(v int64) { + o.NewestMacAge = &v +} + +// GetComments returns the Comments field value if set, zero value otherwise. +func (o *Vulnerability) GetComments() string { + if o == nil || IsNil(o.Comments) { + var ret string + return ret + } + return *o.Comments +} + +// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetCommentsOk() (*string, bool) { + if o == nil || IsNil(o.Comments) { + return nil, false + } + return o.Comments, true +} + +// HasComments returns a boolean if a field has been set. +func (o *Vulnerability) HasComments() bool { + if o != nil && !IsNil(o.Comments) { + return true + } + + return false +} + +// SetComments gets a reference to the given string and assigns it to the Comments field. +func (o *Vulnerability) SetComments(v string) { + o.Comments = &v +} + +// GetServicePortsTcp returns the ServicePortsTcp field value if set, zero value otherwise. +func (o *Vulnerability) GetServicePortsTcp() []string { + if o == nil || IsNil(o.ServicePortsTcp) { + var ret []string + return ret + } + return o.ServicePortsTcp +} + +// GetServicePortsTcpOk returns a tuple with the ServicePortsTcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServicePortsTcpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsTcp) { + return nil, false + } + return o.ServicePortsTcp, true +} + +// HasServicePortsTcp returns a boolean if a field has been set. +func (o *Vulnerability) HasServicePortsTcp() bool { + if o != nil && !IsNil(o.ServicePortsTcp) { + return true + } + + return false +} + +// SetServicePortsTcp gets a reference to the given []string and assigns it to the ServicePortsTcp field. +func (o *Vulnerability) SetServicePortsTcp(v []string) { + o.ServicePortsTcp = v +} + +// GetServicePortsUdp returns the ServicePortsUdp field value if set, zero value otherwise. +func (o *Vulnerability) GetServicePortsUdp() []string { + if o == nil || IsNil(o.ServicePortsUdp) { + var ret []string + return ret + } + return o.ServicePortsUdp +} + +// GetServicePortsUdpOk returns a tuple with the ServicePortsUdp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServicePortsUdpOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsUdp) { + return nil, false + } + return o.ServicePortsUdp, true +} + +// HasServicePortsUdp returns a boolean if a field has been set. +func (o *Vulnerability) HasServicePortsUdp() bool { + if o != nil && !IsNil(o.ServicePortsUdp) { + return true + } + + return false +} + +// SetServicePortsUdp gets a reference to the given []string and assigns it to the ServicePortsUdp field. +func (o *Vulnerability) SetServicePortsUdp(v []string) { + o.ServicePortsUdp = v +} + +// GetServicePortsProtocols returns the ServicePortsProtocols field value if set, zero value otherwise. +func (o *Vulnerability) GetServicePortsProtocols() []string { + if o == nil || IsNil(o.ServicePortsProtocols) { + var ret []string + return ret + } + return o.ServicePortsProtocols +} + +// GetServicePortsProtocolsOk returns a tuple with the ServicePortsProtocols field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServicePortsProtocolsOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsProtocols) { + return nil, false + } + return o.ServicePortsProtocols, true +} + +// HasServicePortsProtocols returns a boolean if a field has been set. +func (o *Vulnerability) HasServicePortsProtocols() bool { + if o != nil && !IsNil(o.ServicePortsProtocols) { + return true + } + + return false +} + +// SetServicePortsProtocols gets a reference to the given []string and assigns it to the ServicePortsProtocols field. +func (o *Vulnerability) SetServicePortsProtocols(v []string) { + o.ServicePortsProtocols = v +} + +// GetServicePortsProducts returns the ServicePortsProducts field value if set, zero value otherwise. +func (o *Vulnerability) GetServicePortsProducts() []string { + if o == nil || IsNil(o.ServicePortsProducts) { + var ret []string + return ret + } + return o.ServicePortsProducts +} + +// GetServicePortsProductsOk returns a tuple with the ServicePortsProducts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServicePortsProductsOk() ([]string, bool) { + if o == nil || IsNil(o.ServicePortsProducts) { + return nil, false + } + return o.ServicePortsProducts, true +} + +// HasServicePortsProducts returns a boolean if a field has been set. +func (o *Vulnerability) HasServicePortsProducts() bool { + if o != nil && !IsNil(o.ServicePortsProducts) { + return true + } + + return false +} + +// SetServicePortsProducts gets a reference to the given []string and assigns it to the ServicePortsProducts field. +func (o *Vulnerability) SetServicePortsProducts(v []string) { + o.ServicePortsProducts = v +} + +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *Vulnerability) GetOrgName() string { + if o == nil || IsNil(o.OrgName) { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetOrgNameOk() (*string, bool) { + if o == nil || IsNil(o.OrgName) { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *Vulnerability) HasOrgName() bool { + if o != nil && !IsNil(o.OrgName) { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *Vulnerability) SetOrgName(v string) { + o.OrgName = &v +} + +// GetSiteName returns the SiteName field value if set, zero value otherwise. +func (o *Vulnerability) GetSiteName() string { + if o == nil || IsNil(o.SiteName) { + var ret string + return ret + } + return *o.SiteName +} + +// GetSiteNameOk returns a tuple with the SiteName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetSiteNameOk() (*string, bool) { + if o == nil || IsNil(o.SiteName) { + return nil, false + } + return o.SiteName, true +} + +// HasSiteName returns a boolean if a field has been set. +func (o *Vulnerability) HasSiteName() bool { + if o != nil && !IsNil(o.SiteName) { + return true + } + + return false +} + +// SetSiteName gets a reference to the given string and assigns it to the SiteName field. +func (o *Vulnerability) SetSiteName(v string) { + o.SiteName = &v +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *Vulnerability) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *Vulnerability) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *Vulnerability) SetAgentName(v string) { + o.AgentName = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Vulnerability) GetTags() map[string]string { + if o == nil || IsNil(o.Tags) { + var ret map[string]string + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetTagsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Vulnerability) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]string and assigns it to the Tags field. +func (o *Vulnerability) SetTags(v map[string]string) { + o.Tags = &v +} + +// GetServices returns the Services field value if set, zero value otherwise. +func (o *Vulnerability) GetServices() map[string]map[string]string { + if o == nil || IsNil(o.Services) { + var ret map[string]map[string]string + return ret + } + return *o.Services +} + +// GetServicesOk returns a tuple with the Services field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetServicesOk() (*map[string]map[string]string, bool) { + if o == nil || IsNil(o.Services) { + return nil, false + } + return o.Services, true +} + +// HasServices returns a boolean if a field has been set. +func (o *Vulnerability) HasServices() bool { + if o != nil && !IsNil(o.Services) { + return true + } + + return false +} + +// SetServices gets a reference to the given map[string]map[string]string and assigns it to the Services field. +func (o *Vulnerability) SetServices(v map[string]map[string]string) { + o.Services = &v +} + +// GetRtts returns the Rtts field value if set, zero value otherwise. +func (o *Vulnerability) GetRtts() map[string]interface{} { + if o == nil || IsNil(o.Rtts) { + var ret map[string]interface{} + return ret + } + return o.Rtts +} + +// GetRttsOk returns a tuple with the Rtts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetRttsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Rtts) { + return map[string]interface{}{}, false + } + return o.Rtts, true +} + +// HasRtts returns a boolean if a field has been set. +func (o *Vulnerability) HasRtts() bool { + if o != nil && !IsNil(o.Rtts) { + return true + } + + return false +} + +// SetRtts gets a reference to the given map[string]interface{} and assigns it to the Rtts field. +func (o *Vulnerability) SetRtts(v map[string]interface{}) { + o.Rtts = v +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *Vulnerability) GetCredentials() map[string]map[string]bool { + if o == nil || IsNil(o.Credentials) { + var ret map[string]map[string]bool + return ret + } + return *o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetCredentialsOk() (*map[string]map[string]bool, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *Vulnerability) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given map[string]map[string]bool and assigns it to the Credentials field. +func (o *Vulnerability) SetCredentials(v map[string]map[string]bool) { + o.Credentials = &v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *Vulnerability) GetAttributes() map[string]string { + if o == nil || IsNil(o.Attributes) { + var ret map[string]string + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *Vulnerability) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given map[string]string and assigns it to the Attributes field. +func (o *Vulnerability) SetAttributes(v map[string]string) { + o.Attributes = &v +} + +func (o Vulnerability) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Vulnerability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.VulnerabilityId) { + toSerialize["vulnerability_id"] = o.VulnerabilityId + } + if !IsNil(o.VulnerabilityAssetId) { + toSerialize["vulnerability_asset_id"] = o.VulnerabilityAssetId + } + if !IsNil(o.VulnerabilityOrganizationId) { + toSerialize["vulnerability_organization_id"] = o.VulnerabilityOrganizationId + } + if !IsNil(o.VulnerabilitySourceId) { + toSerialize["vulnerability_source_id"] = o.VulnerabilitySourceId + } + if !IsNil(o.VulnerabilityCreatedAt) { + toSerialize["vulnerability_created_at"] = o.VulnerabilityCreatedAt + } + if !IsNil(o.VulnerabilityUpdatedAt) { + toSerialize["vulnerability_updated_at"] = o.VulnerabilityUpdatedAt + } + if o.VulnerabilityServiceAddress.IsSet() { + toSerialize["vulnerability_service_address"] = o.VulnerabilityServiceAddress.Get() + } + if !IsNil(o.VulnerabilityServiceTransport) { + toSerialize["vulnerability_service_transport"] = o.VulnerabilityServiceTransport + } + if !IsNil(o.VulnerabilityServicePort) { + toSerialize["vulnerability_service_port"] = o.VulnerabilityServicePort + } + if !IsNil(o.VulnerabilityCpe23) { + toSerialize["vulnerability_cpe23"] = o.VulnerabilityCpe23 + } + if !IsNil(o.VulnerabilityVulnId) { + toSerialize["vulnerability_vuln_id"] = o.VulnerabilityVulnId + } + if !IsNil(o.VulnerabilityCategory) { + toSerialize["vulnerability_category"] = o.VulnerabilityCategory + } + if !IsNil(o.VulnerabilityName) { + toSerialize["vulnerability_name"] = o.VulnerabilityName + } + if !IsNil(o.VulnerabilityDescription) { + toSerialize["vulnerability_description"] = o.VulnerabilityDescription + } + if !IsNil(o.VulnerabilitySolution) { + toSerialize["vulnerability_solution"] = o.VulnerabilitySolution + } + if !IsNil(o.VulnerabilityCve) { + toSerialize["vulnerability_cve"] = o.VulnerabilityCve + } + if !IsNil(o.VulnerabilityCvss2BaseScore) { + toSerialize["vulnerability_cvss2_base_score"] = o.VulnerabilityCvss2BaseScore + } + if !IsNil(o.VulnerabilityCvss2TemporalScore) { + toSerialize["vulnerability_cvss2_temporal_score"] = o.VulnerabilityCvss2TemporalScore + } + if !IsNil(o.VulnerabilityCvss3BaseScore) { + toSerialize["vulnerability_cvss3_base_score"] = o.VulnerabilityCvss3BaseScore + } + if !IsNil(o.VulnerabilityCvss3TemporalScore) { + toSerialize["vulnerability_cvss3_temporal_score"] = o.VulnerabilityCvss3TemporalScore + } + if !IsNil(o.VulnerabilitySeverity) { + toSerialize["vulnerability_severity"] = o.VulnerabilitySeverity + } + if !IsNil(o.VulnerabilitySeverityScore) { + toSerialize["vulnerability_severity_score"] = o.VulnerabilitySeverityScore + } + if !IsNil(o.VulnerabilityRisk) { + toSerialize["vulnerability_risk"] = o.VulnerabilityRisk + } + if !IsNil(o.VulnerabilityRiskScore) { + toSerialize["vulnerability_risk_score"] = o.VulnerabilityRiskScore + } + if !IsNil(o.VulnerabilityPublishedAt) { + toSerialize["vulnerability_published_at"] = o.VulnerabilityPublishedAt + } + if !IsNil(o.VulnerabilityFirstDetectedAt) { + toSerialize["vulnerability_first_detected_at"] = o.VulnerabilityFirstDetectedAt + } + if !IsNil(o.VulnerabilityLastDetectedAt) { + toSerialize["vulnerability_last_detected_at"] = o.VulnerabilityLastDetectedAt + } + if !IsNil(o.VulnerabilityAttributes) { + toSerialize["vulnerability_attributes"] = o.VulnerabilityAttributes + } + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.OrganizationId) { + toSerialize["organization_id"] = o.OrganizationId + } + if !IsNil(o.SiteId) { + toSerialize["site_id"] = o.SiteId + } + if !IsNil(o.Alive) { + toSerialize["alive"] = o.Alive + } + if !IsNil(o.FirstSeen) { + toSerialize["first_seen"] = o.FirstSeen + } + if !IsNil(o.LastSeen) { + toSerialize["last_seen"] = o.LastSeen + } + if !IsNil(o.DetectedBy) { + toSerialize["detected_by"] = o.DetectedBy + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Os) { + toSerialize["os"] = o.Os + } + if !IsNil(o.OsVersion) { + toSerialize["os_version"] = o.OsVersion + } + if !IsNil(o.Hw) { + toSerialize["hw"] = o.Hw + } + if !IsNil(o.Addresses) { + toSerialize["addresses"] = o.Addresses + } + if !IsNil(o.AddressesExtra) { + toSerialize["addresses_extra"] = o.AddressesExtra + } + if !IsNil(o.Macs) { + toSerialize["macs"] = o.Macs + } + if !IsNil(o.MacVendors) { + toSerialize["mac_vendors"] = o.MacVendors + } + if !IsNil(o.Names) { + toSerialize["names"] = o.Names + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.ServiceCount) { + toSerialize["service_count"] = o.ServiceCount + } + if !IsNil(o.ServiceCountTcp) { + toSerialize["service_count_tcp"] = o.ServiceCountTcp + } + if !IsNil(o.ServiceCountUdp) { + toSerialize["service_count_udp"] = o.ServiceCountUdp + } + if !IsNil(o.ServiceCountArp) { + toSerialize["service_count_arp"] = o.ServiceCountArp + } + if !IsNil(o.ServiceCountIcmp) { + toSerialize["service_count_icmp"] = o.ServiceCountIcmp + } + if !IsNil(o.LowestTtl) { + toSerialize["lowest_ttl"] = o.LowestTtl + } + if !IsNil(o.LowestRtt) { + toSerialize["lowest_rtt"] = o.LowestRtt + } + if !IsNil(o.LastAgentId) { + toSerialize["last_agent_id"] = o.LastAgentId + } + if !IsNil(o.LastTaskId) { + toSerialize["last_task_id"] = o.LastTaskId + } + if !IsNil(o.NewestMac) { + toSerialize["newest_mac"] = o.NewestMac + } + if !IsNil(o.NewestMacVendor) { + toSerialize["newest_mac_vendor"] = o.NewestMacVendor + } + if !IsNil(o.NewestMacAge) { + toSerialize["newest_mac_age"] = o.NewestMacAge + } + if !IsNil(o.Comments) { + toSerialize["comments"] = o.Comments + } + if !IsNil(o.ServicePortsTcp) { + toSerialize["service_ports_tcp"] = o.ServicePortsTcp + } + if !IsNil(o.ServicePortsUdp) { + toSerialize["service_ports_udp"] = o.ServicePortsUdp + } + if !IsNil(o.ServicePortsProtocols) { + toSerialize["service_ports_protocols"] = o.ServicePortsProtocols + } + if !IsNil(o.ServicePortsProducts) { + toSerialize["service_ports_products"] = o.ServicePortsProducts + } + if !IsNil(o.OrgName) { + toSerialize["org_name"] = o.OrgName + } + if !IsNil(o.SiteName) { + toSerialize["site_name"] = o.SiteName + } + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Services) { + toSerialize["services"] = o.Services + } + if !IsNil(o.Rtts) { + toSerialize["rtts"] = o.Rtts + } + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + return toSerialize, nil +} + +func (o *Vulnerability) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVulnerability := _Vulnerability{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVulnerability) + + if err != nil { + return err + } + + *o = Vulnerability(varVulnerability) + + return err +} + +type NullableVulnerability struct { + value *Vulnerability + isSet bool +} + +func (v NullableVulnerability) Get() *Vulnerability { + return v.value +} + +func (v *NullableVulnerability) Set(val *Vulnerability) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerability) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerability(val *Vulnerability) *NullableVulnerability { + return &NullableVulnerability{value: val, isSet: true} +} + +func (v NullableVulnerability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_vulnerability_export_response.go b/go/model_vulnerability_export_response.go new file mode 100644 index 0000000..fe5310d --- /dev/null +++ b/go/model_vulnerability_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// VulnerabilityExportResponse - Response body for the vulnerability export endpoint. Bare array unless `page_size` is provided. +type VulnerabilityExportResponse struct { + VulnerabilityPage *VulnerabilityPage + ArrayOfVulnerability *[]Vulnerability +} + +// VulnerabilityPageAsVulnerabilityExportResponse is a convenience function that returns VulnerabilityPage wrapped in VulnerabilityExportResponse +func VulnerabilityPageAsVulnerabilityExportResponse(v *VulnerabilityPage) VulnerabilityExportResponse { + return VulnerabilityExportResponse{ + VulnerabilityPage: v, + } +} + +// []VulnerabilityAsVulnerabilityExportResponse is a convenience function that returns []Vulnerability wrapped in VulnerabilityExportResponse +func ArrayOfVulnerabilityAsVulnerabilityExportResponse(v *[]Vulnerability) VulnerabilityExportResponse { + return VulnerabilityExportResponse{ + ArrayOfVulnerability: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *VulnerabilityExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into VulnerabilityPage + err = newStrictDecoder(data).Decode(&dst.VulnerabilityPage) + if err == nil { + jsonVulnerabilityPage, _ := json.Marshal(dst.VulnerabilityPage) + if string(jsonVulnerabilityPage) == "{}" { // empty struct + dst.VulnerabilityPage = nil + } else { + if err = validator.Validate(dst.VulnerabilityPage); err != nil { + dst.VulnerabilityPage = nil + } else { + match++ + } + } + } else { + dst.VulnerabilityPage = nil + } + + // try to unmarshal data into ArrayOfVulnerability + err = newStrictDecoder(data).Decode(&dst.ArrayOfVulnerability) + if err == nil { + jsonArrayOfVulnerability, _ := json.Marshal(dst.ArrayOfVulnerability) + if string(jsonArrayOfVulnerability) == "{}" { // empty struct + dst.ArrayOfVulnerability = nil + } else { + if err = validator.Validate(dst.ArrayOfVulnerability); err != nil { + dst.ArrayOfVulnerability = nil + } else { + match++ + } + } + } else { + dst.ArrayOfVulnerability = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.VulnerabilityPage = nil + dst.ArrayOfVulnerability = nil + + return fmt.Errorf("data matches more than one schema in oneOf(VulnerabilityExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(VulnerabilityExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src VulnerabilityExportResponse) MarshalJSON() ([]byte, error) { + if src.VulnerabilityPage != nil { + return json.Marshal(&src.VulnerabilityPage) + } + + if src.ArrayOfVulnerability != nil { + return json.Marshal(&src.ArrayOfVulnerability) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *VulnerabilityExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.VulnerabilityPage != nil { + return obj.VulnerabilityPage + } + + if obj.ArrayOfVulnerability != nil { + return obj.ArrayOfVulnerability + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj VulnerabilityExportResponse) GetActualInstanceValue() (interface{}) { + if obj.VulnerabilityPage != nil { + return *obj.VulnerabilityPage + } + + if obj.ArrayOfVulnerability != nil { + return *obj.ArrayOfVulnerability + } + + // all schemas are nil + return nil +} + +type NullableVulnerabilityExportResponse struct { + value *VulnerabilityExportResponse + isSet bool +} + +func (v NullableVulnerabilityExportResponse) Get() *VulnerabilityExportResponse { + return v.value +} + +func (v *NullableVulnerabilityExportResponse) Set(val *VulnerabilityExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityExportResponse(val *VulnerabilityExportResponse) *NullableVulnerabilityExportResponse { + return &NullableVulnerabilityExportResponse{value: val, isSet: true} +} + +func (v NullableVulnerabilityExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_vulnerability_page.go b/go/model_vulnerability_page.go new file mode 100644 index 0000000..73cb270 --- /dev/null +++ b/go/model_vulnerability_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the VulnerabilityPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityPage{} + +// VulnerabilityPage A page of vulnerabilities returned from a paginated export. +type VulnerabilityPage struct { + Vulnerabilities []Vulnerability `json:"vulnerabilities,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewVulnerabilityPage instantiates a new VulnerabilityPage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityPage() *VulnerabilityPage { + this := VulnerabilityPage{} + return &this +} + +// NewVulnerabilityPageWithDefaults instantiates a new VulnerabilityPage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityPageWithDefaults() *VulnerabilityPage { + this := VulnerabilityPage{} + return &this +} + +// GetVulnerabilities returns the Vulnerabilities field value if set, zero value otherwise. +func (o *VulnerabilityPage) GetVulnerabilities() []Vulnerability { + if o == nil || IsNil(o.Vulnerabilities) { + var ret []Vulnerability + return ret + } + return o.Vulnerabilities +} + +// GetVulnerabilitiesOk returns a tuple with the Vulnerabilities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityPage) GetVulnerabilitiesOk() ([]Vulnerability, bool) { + if o == nil || IsNil(o.Vulnerabilities) { + return nil, false + } + return o.Vulnerabilities, true +} + +// HasVulnerabilities returns a boolean if a field has been set. +func (o *VulnerabilityPage) HasVulnerabilities() bool { + if o != nil && !IsNil(o.Vulnerabilities) { + return true + } + + return false +} + +// SetVulnerabilities gets a reference to the given []Vulnerability and assigns it to the Vulnerabilities field. +func (o *VulnerabilityPage) SetVulnerabilities(v []Vulnerability) { + o.Vulnerabilities = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *VulnerabilityPage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityPage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *VulnerabilityPage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *VulnerabilityPage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o VulnerabilityPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VulnerabilityPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Vulnerabilities) { + toSerialize["vulnerabilities"] = o.Vulnerabilities + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableVulnerabilityPage struct { + value *VulnerabilityPage + isSet bool +} + +func (v NullableVulnerabilityPage) Get() *VulnerabilityPage { + return v.value +} + +func (v *NullableVulnerabilityPage) Set(val *VulnerabilityPage) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityPage) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityPage(val *VulnerabilityPage) *NullableVulnerabilityPage { + return &NullableVulnerabilityPage{value: val, isSet: true} +} + +func (v NullableVulnerabilityPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_wireless.go b/go/model_wireless.go index ee32af5..dba8023 100644 --- a/go/model_wireless.go +++ b/go/model_wireless.go @@ -1,43 +1,51 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" + "bytes" + "fmt" ) +// checks if the Wireless type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Wireless{} + // Wireless struct for Wireless type Wireless struct { - Id string `json:"id"` - CreatedAt *int64 `json:"created_at,omitempty"` - LastSeen *int64 `json:"last_seen,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - SiteId *string `json:"site_id,omitempty"` - LastAgentId *string `json:"last_agent_id,omitempty"` - LastTaskId *string `json:"last_task_id,omitempty"` - Essid *string `json:"essid,omitempty"` - Bssid *string `json:"bssid,omitempty"` - Type *string `json:"type,omitempty"` - Authentication *string `json:"authentication,omitempty"` - Encryption *string `json:"encryption,omitempty"` - Signal *int32 `json:"signal,omitempty"` - Channels *string `json:"channels,omitempty"` - Interface *string `json:"interface,omitempty"` - Vendor *string `json:"vendor,omitempty"` - Family *string `json:"family,omitempty"` - Data *map[string]string `json:"data,omitempty"` - OrgName *string `json:"org_name,omitempty"` - SiteName *string `json:"site_name,omitempty"` - AgentName *string `json:"agent_name,omitempty"` -} + Id string `json:"id"` + CreatedAt *int64 `json:"created_at,omitempty"` + LastSeen *int64 `json:"last_seen,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + SiteId *string `json:"site_id,omitempty"` + LastAgentId *string `json:"last_agent_id,omitempty"` + LastTaskId *string `json:"last_task_id,omitempty"` + Essid *string `json:"essid,omitempty"` + Bssid *string `json:"bssid,omitempty"` + Type *string `json:"type,omitempty"` + Authentication *string `json:"authentication,omitempty"` + Encryption *string `json:"encryption,omitempty"` + Signal *int32 `json:"signal,omitempty"` + Channels *string `json:"channels,omitempty"` + Interface *string `json:"interface,omitempty"` + Vendor *string `json:"vendor,omitempty"` + Family *string `json:"family,omitempty"` + Data *map[string]string `json:"data,omitempty"` + OrgName *string `json:"org_name,omitempty"` + SiteName *string `json:"site_name,omitempty"` + AgentName *string `json:"agent_name,omitempty"` +} + +type _Wireless Wireless // NewWireless instantiates a new Wireless object // This constructor will assign default values to properties that have it defined, @@ -83,7 +91,7 @@ func (o *Wireless) SetId(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Wireless) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { var ret int64 return ret } @@ -93,7 +101,7 @@ func (o *Wireless) GetCreatedAt() int64 { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -101,7 +109,7 @@ func (o *Wireless) GetCreatedAtOk() (*int64, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Wireless) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !IsNil(o.CreatedAt) { return true } @@ -115,7 +123,7 @@ func (o *Wireless) SetCreatedAt(v int64) { // GetLastSeen returns the LastSeen field value if set, zero value otherwise. func (o *Wireless) GetLastSeen() int64 { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { var ret int64 return ret } @@ -125,7 +133,7 @@ func (o *Wireless) GetLastSeen() int64 { // GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetLastSeenOk() (*int64, bool) { - if o == nil || o.LastSeen == nil { + if o == nil || IsNil(o.LastSeen) { return nil, false } return o.LastSeen, true @@ -133,7 +141,7 @@ func (o *Wireless) GetLastSeenOk() (*int64, bool) { // HasLastSeen returns a boolean if a field has been set. func (o *Wireless) HasLastSeen() bool { - if o != nil && o.LastSeen != nil { + if o != nil && !IsNil(o.LastSeen) { return true } @@ -147,7 +155,7 @@ func (o *Wireless) SetLastSeen(v int64) { // GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. func (o *Wireless) GetOrganizationId() string { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { var ret string return ret } @@ -157,7 +165,7 @@ func (o *Wireless) GetOrganizationId() string { // GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetOrganizationIdOk() (*string, bool) { - if o == nil || o.OrganizationId == nil { + if o == nil || IsNil(o.OrganizationId) { return nil, false } return o.OrganizationId, true @@ -165,7 +173,7 @@ func (o *Wireless) GetOrganizationIdOk() (*string, bool) { // HasOrganizationId returns a boolean if a field has been set. func (o *Wireless) HasOrganizationId() bool { - if o != nil && o.OrganizationId != nil { + if o != nil && !IsNil(o.OrganizationId) { return true } @@ -179,7 +187,7 @@ func (o *Wireless) SetOrganizationId(v string) { // GetSiteId returns the SiteId field value if set, zero value otherwise. func (o *Wireless) GetSiteId() string { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { var ret string return ret } @@ -189,7 +197,7 @@ func (o *Wireless) GetSiteId() string { // GetSiteIdOk returns a tuple with the SiteId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetSiteIdOk() (*string, bool) { - if o == nil || o.SiteId == nil { + if o == nil || IsNil(o.SiteId) { return nil, false } return o.SiteId, true @@ -197,7 +205,7 @@ func (o *Wireless) GetSiteIdOk() (*string, bool) { // HasSiteId returns a boolean if a field has been set. func (o *Wireless) HasSiteId() bool { - if o != nil && o.SiteId != nil { + if o != nil && !IsNil(o.SiteId) { return true } @@ -211,7 +219,7 @@ func (o *Wireless) SetSiteId(v string) { // GetLastAgentId returns the LastAgentId field value if set, zero value otherwise. func (o *Wireless) GetLastAgentId() string { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { var ret string return ret } @@ -221,7 +229,7 @@ func (o *Wireless) GetLastAgentId() string { // GetLastAgentIdOk returns a tuple with the LastAgentId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetLastAgentIdOk() (*string, bool) { - if o == nil || o.LastAgentId == nil { + if o == nil || IsNil(o.LastAgentId) { return nil, false } return o.LastAgentId, true @@ -229,7 +237,7 @@ func (o *Wireless) GetLastAgentIdOk() (*string, bool) { // HasLastAgentId returns a boolean if a field has been set. func (o *Wireless) HasLastAgentId() bool { - if o != nil && o.LastAgentId != nil { + if o != nil && !IsNil(o.LastAgentId) { return true } @@ -243,7 +251,7 @@ func (o *Wireless) SetLastAgentId(v string) { // GetLastTaskId returns the LastTaskId field value if set, zero value otherwise. func (o *Wireless) GetLastTaskId() string { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { var ret string return ret } @@ -253,7 +261,7 @@ func (o *Wireless) GetLastTaskId() string { // GetLastTaskIdOk returns a tuple with the LastTaskId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetLastTaskIdOk() (*string, bool) { - if o == nil || o.LastTaskId == nil { + if o == nil || IsNil(o.LastTaskId) { return nil, false } return o.LastTaskId, true @@ -261,7 +269,7 @@ func (o *Wireless) GetLastTaskIdOk() (*string, bool) { // HasLastTaskId returns a boolean if a field has been set. func (o *Wireless) HasLastTaskId() bool { - if o != nil && o.LastTaskId != nil { + if o != nil && !IsNil(o.LastTaskId) { return true } @@ -275,7 +283,7 @@ func (o *Wireless) SetLastTaskId(v string) { // GetEssid returns the Essid field value if set, zero value otherwise. func (o *Wireless) GetEssid() string { - if o == nil || o.Essid == nil { + if o == nil || IsNil(o.Essid) { var ret string return ret } @@ -285,7 +293,7 @@ func (o *Wireless) GetEssid() string { // GetEssidOk returns a tuple with the Essid field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetEssidOk() (*string, bool) { - if o == nil || o.Essid == nil { + if o == nil || IsNil(o.Essid) { return nil, false } return o.Essid, true @@ -293,7 +301,7 @@ func (o *Wireless) GetEssidOk() (*string, bool) { // HasEssid returns a boolean if a field has been set. func (o *Wireless) HasEssid() bool { - if o != nil && o.Essid != nil { + if o != nil && !IsNil(o.Essid) { return true } @@ -307,7 +315,7 @@ func (o *Wireless) SetEssid(v string) { // GetBssid returns the Bssid field value if set, zero value otherwise. func (o *Wireless) GetBssid() string { - if o == nil || o.Bssid == nil { + if o == nil || IsNil(o.Bssid) { var ret string return ret } @@ -317,7 +325,7 @@ func (o *Wireless) GetBssid() string { // GetBssidOk returns a tuple with the Bssid field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetBssidOk() (*string, bool) { - if o == nil || o.Bssid == nil { + if o == nil || IsNil(o.Bssid) { return nil, false } return o.Bssid, true @@ -325,7 +333,7 @@ func (o *Wireless) GetBssidOk() (*string, bool) { // HasBssid returns a boolean if a field has been set. func (o *Wireless) HasBssid() bool { - if o != nil && o.Bssid != nil { + if o != nil && !IsNil(o.Bssid) { return true } @@ -339,7 +347,7 @@ func (o *Wireless) SetBssid(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *Wireless) GetType() string { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret string return ret } @@ -349,7 +357,7 @@ func (o *Wireless) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -357,7 +365,7 @@ func (o *Wireless) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *Wireless) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -371,7 +379,7 @@ func (o *Wireless) SetType(v string) { // GetAuthentication returns the Authentication field value if set, zero value otherwise. func (o *Wireless) GetAuthentication() string { - if o == nil || o.Authentication == nil { + if o == nil || IsNil(o.Authentication) { var ret string return ret } @@ -381,7 +389,7 @@ func (o *Wireless) GetAuthentication() string { // GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetAuthenticationOk() (*string, bool) { - if o == nil || o.Authentication == nil { + if o == nil || IsNil(o.Authentication) { return nil, false } return o.Authentication, true @@ -389,7 +397,7 @@ func (o *Wireless) GetAuthenticationOk() (*string, bool) { // HasAuthentication returns a boolean if a field has been set. func (o *Wireless) HasAuthentication() bool { - if o != nil && o.Authentication != nil { + if o != nil && !IsNil(o.Authentication) { return true } @@ -403,7 +411,7 @@ func (o *Wireless) SetAuthentication(v string) { // GetEncryption returns the Encryption field value if set, zero value otherwise. func (o *Wireless) GetEncryption() string { - if o == nil || o.Encryption == nil { + if o == nil || IsNil(o.Encryption) { var ret string return ret } @@ -413,7 +421,7 @@ func (o *Wireless) GetEncryption() string { // GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetEncryptionOk() (*string, bool) { - if o == nil || o.Encryption == nil { + if o == nil || IsNil(o.Encryption) { return nil, false } return o.Encryption, true @@ -421,7 +429,7 @@ func (o *Wireless) GetEncryptionOk() (*string, bool) { // HasEncryption returns a boolean if a field has been set. func (o *Wireless) HasEncryption() bool { - if o != nil && o.Encryption != nil { + if o != nil && !IsNil(o.Encryption) { return true } @@ -435,7 +443,7 @@ func (o *Wireless) SetEncryption(v string) { // GetSignal returns the Signal field value if set, zero value otherwise. func (o *Wireless) GetSignal() int32 { - if o == nil || o.Signal == nil { + if o == nil || IsNil(o.Signal) { var ret int32 return ret } @@ -445,7 +453,7 @@ func (o *Wireless) GetSignal() int32 { // GetSignalOk returns a tuple with the Signal field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetSignalOk() (*int32, bool) { - if o == nil || o.Signal == nil { + if o == nil || IsNil(o.Signal) { return nil, false } return o.Signal, true @@ -453,7 +461,7 @@ func (o *Wireless) GetSignalOk() (*int32, bool) { // HasSignal returns a boolean if a field has been set. func (o *Wireless) HasSignal() bool { - if o != nil && o.Signal != nil { + if o != nil && !IsNil(o.Signal) { return true } @@ -467,7 +475,7 @@ func (o *Wireless) SetSignal(v int32) { // GetChannels returns the Channels field value if set, zero value otherwise. func (o *Wireless) GetChannels() string { - if o == nil || o.Channels == nil { + if o == nil || IsNil(o.Channels) { var ret string return ret } @@ -477,7 +485,7 @@ func (o *Wireless) GetChannels() string { // GetChannelsOk returns a tuple with the Channels field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetChannelsOk() (*string, bool) { - if o == nil || o.Channels == nil { + if o == nil || IsNil(o.Channels) { return nil, false } return o.Channels, true @@ -485,7 +493,7 @@ func (o *Wireless) GetChannelsOk() (*string, bool) { // HasChannels returns a boolean if a field has been set. func (o *Wireless) HasChannels() bool { - if o != nil && o.Channels != nil { + if o != nil && !IsNil(o.Channels) { return true } @@ -499,7 +507,7 @@ func (o *Wireless) SetChannels(v string) { // GetInterface returns the Interface field value if set, zero value otherwise. func (o *Wireless) GetInterface() string { - if o == nil || o.Interface == nil { + if o == nil || IsNil(o.Interface) { var ret string return ret } @@ -509,7 +517,7 @@ func (o *Wireless) GetInterface() string { // GetInterfaceOk returns a tuple with the Interface field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetInterfaceOk() (*string, bool) { - if o == nil || o.Interface == nil { + if o == nil || IsNil(o.Interface) { return nil, false } return o.Interface, true @@ -517,7 +525,7 @@ func (o *Wireless) GetInterfaceOk() (*string, bool) { // HasInterface returns a boolean if a field has been set. func (o *Wireless) HasInterface() bool { - if o != nil && o.Interface != nil { + if o != nil && !IsNil(o.Interface) { return true } @@ -531,7 +539,7 @@ func (o *Wireless) SetInterface(v string) { // GetVendor returns the Vendor field value if set, zero value otherwise. func (o *Wireless) GetVendor() string { - if o == nil || o.Vendor == nil { + if o == nil || IsNil(o.Vendor) { var ret string return ret } @@ -541,7 +549,7 @@ func (o *Wireless) GetVendor() string { // GetVendorOk returns a tuple with the Vendor field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetVendorOk() (*string, bool) { - if o == nil || o.Vendor == nil { + if o == nil || IsNil(o.Vendor) { return nil, false } return o.Vendor, true @@ -549,7 +557,7 @@ func (o *Wireless) GetVendorOk() (*string, bool) { // HasVendor returns a boolean if a field has been set. func (o *Wireless) HasVendor() bool { - if o != nil && o.Vendor != nil { + if o != nil && !IsNil(o.Vendor) { return true } @@ -563,7 +571,7 @@ func (o *Wireless) SetVendor(v string) { // GetFamily returns the Family field value if set, zero value otherwise. func (o *Wireless) GetFamily() string { - if o == nil || o.Family == nil { + if o == nil || IsNil(o.Family) { var ret string return ret } @@ -573,7 +581,7 @@ func (o *Wireless) GetFamily() string { // GetFamilyOk returns a tuple with the Family field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetFamilyOk() (*string, bool) { - if o == nil || o.Family == nil { + if o == nil || IsNil(o.Family) { return nil, false } return o.Family, true @@ -581,7 +589,7 @@ func (o *Wireless) GetFamilyOk() (*string, bool) { // HasFamily returns a boolean if a field has been set. func (o *Wireless) HasFamily() bool { - if o != nil && o.Family != nil { + if o != nil && !IsNil(o.Family) { return true } @@ -595,7 +603,7 @@ func (o *Wireless) SetFamily(v string) { // GetData returns the Data field value if set, zero value otherwise. func (o *Wireless) GetData() map[string]string { - if o == nil || o.Data == nil { + if o == nil || IsNil(o.Data) { var ret map[string]string return ret } @@ -605,7 +613,7 @@ func (o *Wireless) GetData() map[string]string { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetDataOk() (*map[string]string, bool) { - if o == nil || o.Data == nil { + if o == nil || IsNil(o.Data) { return nil, false } return o.Data, true @@ -613,7 +621,7 @@ func (o *Wireless) GetDataOk() (*map[string]string, bool) { // HasData returns a boolean if a field has been set. func (o *Wireless) HasData() bool { - if o != nil && o.Data != nil { + if o != nil && !IsNil(o.Data) { return true } @@ -627,7 +635,7 @@ func (o *Wireless) SetData(v map[string]string) { // GetOrgName returns the OrgName field value if set, zero value otherwise. func (o *Wireless) GetOrgName() string { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { var ret string return ret } @@ -637,7 +645,7 @@ func (o *Wireless) GetOrgName() string { // GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetOrgNameOk() (*string, bool) { - if o == nil || o.OrgName == nil { + if o == nil || IsNil(o.OrgName) { return nil, false } return o.OrgName, true @@ -645,7 +653,7 @@ func (o *Wireless) GetOrgNameOk() (*string, bool) { // HasOrgName returns a boolean if a field has been set. func (o *Wireless) HasOrgName() bool { - if o != nil && o.OrgName != nil { + if o != nil && !IsNil(o.OrgName) { return true } @@ -659,7 +667,7 @@ func (o *Wireless) SetOrgName(v string) { // GetSiteName returns the SiteName field value if set, zero value otherwise. func (o *Wireless) GetSiteName() string { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { var ret string return ret } @@ -669,7 +677,7 @@ func (o *Wireless) GetSiteName() string { // GetSiteNameOk returns a tuple with the SiteName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetSiteNameOk() (*string, bool) { - if o == nil || o.SiteName == nil { + if o == nil || IsNil(o.SiteName) { return nil, false } return o.SiteName, true @@ -677,7 +685,7 @@ func (o *Wireless) GetSiteNameOk() (*string, bool) { // HasSiteName returns a boolean if a field has been set. func (o *Wireless) HasSiteName() bool { - if o != nil && o.SiteName != nil { + if o != nil && !IsNil(o.SiteName) { return true } @@ -691,7 +699,7 @@ func (o *Wireless) SetSiteName(v string) { // GetAgentName returns the AgentName field value if set, zero value otherwise. func (o *Wireless) GetAgentName() string { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { var ret string return ret } @@ -701,7 +709,7 @@ func (o *Wireless) GetAgentName() string { // GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Wireless) GetAgentNameOk() (*string, bool) { - if o == nil || o.AgentName == nil { + if o == nil || IsNil(o.AgentName) { return nil, false } return o.AgentName, true @@ -709,7 +717,7 @@ func (o *Wireless) GetAgentNameOk() (*string, bool) { // HasAgentName returns a boolean if a field has been set. func (o *Wireless) HasAgentName() bool { - if o != nil && o.AgentName != nil { + if o != nil && !IsNil(o.AgentName) { return true } @@ -722,71 +730,114 @@ func (o *Wireless) SetAgentName(v string) { } func (o Wireless) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CreatedAt != nil { + return json.Marshal(toSerialize) +} + +func (o Wireless) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.LastSeen != nil { + if !IsNil(o.LastSeen) { toSerialize["last_seen"] = o.LastSeen } - if o.OrganizationId != nil { + if !IsNil(o.OrganizationId) { toSerialize["organization_id"] = o.OrganizationId } - if o.SiteId != nil { + if !IsNil(o.SiteId) { toSerialize["site_id"] = o.SiteId } - if o.LastAgentId != nil { + if !IsNil(o.LastAgentId) { toSerialize["last_agent_id"] = o.LastAgentId } - if o.LastTaskId != nil { + if !IsNil(o.LastTaskId) { toSerialize["last_task_id"] = o.LastTaskId } - if o.Essid != nil { + if !IsNil(o.Essid) { toSerialize["essid"] = o.Essid } - if o.Bssid != nil { + if !IsNil(o.Bssid) { toSerialize["bssid"] = o.Bssid } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Authentication != nil { + if !IsNil(o.Authentication) { toSerialize["authentication"] = o.Authentication } - if o.Encryption != nil { + if !IsNil(o.Encryption) { toSerialize["encryption"] = o.Encryption } - if o.Signal != nil { + if !IsNil(o.Signal) { toSerialize["signal"] = o.Signal } - if o.Channels != nil { + if !IsNil(o.Channels) { toSerialize["channels"] = o.Channels } - if o.Interface != nil { + if !IsNil(o.Interface) { toSerialize["interface"] = o.Interface } - if o.Vendor != nil { + if !IsNil(o.Vendor) { toSerialize["vendor"] = o.Vendor } - if o.Family != nil { + if !IsNil(o.Family) { toSerialize["family"] = o.Family } - if o.Data != nil { + if !IsNil(o.Data) { toSerialize["data"] = o.Data } - if o.OrgName != nil { + if !IsNil(o.OrgName) { toSerialize["org_name"] = o.OrgName } - if o.SiteName != nil { + if !IsNil(o.SiteName) { toSerialize["site_name"] = o.SiteName } - if o.AgentName != nil { + if !IsNil(o.AgentName) { toSerialize["agent_name"] = o.AgentName } - return json.Marshal(toSerialize) + return toSerialize, nil +} + +func (o *Wireless) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWireless := _Wireless{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWireless) + + if err != nil { + return err + } + + *o = Wireless(varWireless) + + return err } type NullableWireless struct { @@ -824,3 +875,5 @@ func (v *NullableWireless) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/go/model_wireless_export_response.go b/go/model_wireless_export_response.go new file mode 100644 index 0000000..1f2cb5b --- /dev/null +++ b/go/model_wireless_export_response.go @@ -0,0 +1,172 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// WirelessExportResponse - Response body for the wireless export endpoint. Bare array unless `page_size` is provided. +type WirelessExportResponse struct { + WirelessPage *WirelessPage + ArrayOfWireless *[]Wireless +} + +// WirelessPageAsWirelessExportResponse is a convenience function that returns WirelessPage wrapped in WirelessExportResponse +func WirelessPageAsWirelessExportResponse(v *WirelessPage) WirelessExportResponse { + return WirelessExportResponse{ + WirelessPage: v, + } +} + +// []WirelessAsWirelessExportResponse is a convenience function that returns []Wireless wrapped in WirelessExportResponse +func ArrayOfWirelessAsWirelessExportResponse(v *[]Wireless) WirelessExportResponse { + return WirelessExportResponse{ + ArrayOfWireless: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *WirelessExportResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into WirelessPage + err = newStrictDecoder(data).Decode(&dst.WirelessPage) + if err == nil { + jsonWirelessPage, _ := json.Marshal(dst.WirelessPage) + if string(jsonWirelessPage) == "{}" { // empty struct + dst.WirelessPage = nil + } else { + if err = validator.Validate(dst.WirelessPage); err != nil { + dst.WirelessPage = nil + } else { + match++ + } + } + } else { + dst.WirelessPage = nil + } + + // try to unmarshal data into ArrayOfWireless + err = newStrictDecoder(data).Decode(&dst.ArrayOfWireless) + if err == nil { + jsonArrayOfWireless, _ := json.Marshal(dst.ArrayOfWireless) + if string(jsonArrayOfWireless) == "{}" { // empty struct + dst.ArrayOfWireless = nil + } else { + if err = validator.Validate(dst.ArrayOfWireless); err != nil { + dst.ArrayOfWireless = nil + } else { + match++ + } + } + } else { + dst.ArrayOfWireless = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.WirelessPage = nil + dst.ArrayOfWireless = nil + + return fmt.Errorf("data matches more than one schema in oneOf(WirelessExportResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(WirelessExportResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src WirelessExportResponse) MarshalJSON() ([]byte, error) { + if src.WirelessPage != nil { + return json.Marshal(&src.WirelessPage) + } + + if src.ArrayOfWireless != nil { + return json.Marshal(&src.ArrayOfWireless) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *WirelessExportResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.WirelessPage != nil { + return obj.WirelessPage + } + + if obj.ArrayOfWireless != nil { + return obj.ArrayOfWireless + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj WirelessExportResponse) GetActualInstanceValue() (interface{}) { + if obj.WirelessPage != nil { + return *obj.WirelessPage + } + + if obj.ArrayOfWireless != nil { + return *obj.ArrayOfWireless + } + + // all schemas are nil + return nil +} + +type NullableWirelessExportResponse struct { + value *WirelessExportResponse + isSet bool +} + +func (v NullableWirelessExportResponse) Get() *WirelessExportResponse { + return v.value +} + +func (v *NullableWirelessExportResponse) Set(val *WirelessExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWirelessExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWirelessExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWirelessExportResponse(val *WirelessExportResponse) *NullableWirelessExportResponse { + return &NullableWirelessExportResponse{value: val, isSet: true} +} + +func (v NullableWirelessExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWirelessExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_wireless_page.go b/go/model_wireless_page.go new file mode 100644 index 0000000..6fe4151 --- /dev/null +++ b/go/model_wireless_page.go @@ -0,0 +1,164 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WirelessPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WirelessPage{} + +// WirelessPage A page of wireless devices returned from a paginated export. +type WirelessPage struct { + Wireless []Wireless `json:"wireless,omitempty"` + // The key to use for the next page of results + NextKey *string `json:"next_key,omitempty"` +} + +// NewWirelessPage instantiates a new WirelessPage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWirelessPage() *WirelessPage { + this := WirelessPage{} + return &this +} + +// NewWirelessPageWithDefaults instantiates a new WirelessPage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWirelessPageWithDefaults() *WirelessPage { + this := WirelessPage{} + return &this +} + +// GetWireless returns the Wireless field value if set, zero value otherwise. +func (o *WirelessPage) GetWireless() []Wireless { + if o == nil || IsNil(o.Wireless) { + var ret []Wireless + return ret + } + return o.Wireless +} + +// GetWirelessOk returns a tuple with the Wireless field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WirelessPage) GetWirelessOk() ([]Wireless, bool) { + if o == nil || IsNil(o.Wireless) { + return nil, false + } + return o.Wireless, true +} + +// HasWireless returns a boolean if a field has been set. +func (o *WirelessPage) HasWireless() bool { + if o != nil && !IsNil(o.Wireless) { + return true + } + + return false +} + +// SetWireless gets a reference to the given []Wireless and assigns it to the Wireless field. +func (o *WirelessPage) SetWireless(v []Wireless) { + o.Wireless = v +} + +// GetNextKey returns the NextKey field value if set, zero value otherwise. +func (o *WirelessPage) GetNextKey() string { + if o == nil || IsNil(o.NextKey) { + var ret string + return ret + } + return *o.NextKey +} + +// GetNextKeyOk returns a tuple with the NextKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WirelessPage) GetNextKeyOk() (*string, bool) { + if o == nil || IsNil(o.NextKey) { + return nil, false + } + return o.NextKey, true +} + +// HasNextKey returns a boolean if a field has been set. +func (o *WirelessPage) HasNextKey() bool { + if o != nil && !IsNil(o.NextKey) { + return true + } + + return false +} + +// SetNextKey gets a reference to the given string and assigns it to the NextKey field. +func (o *WirelessPage) SetNextKey(v string) { + o.NextKey = &v +} + +func (o WirelessPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WirelessPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Wireless) { + toSerialize["wireless"] = o.Wireless + } + if !IsNil(o.NextKey) { + toSerialize["next_key"] = o.NextKey + } + return toSerialize, nil +} + +type NullableWirelessPage struct { + value *WirelessPage + isSet bool +} + +func (v NullableWirelessPage) Get() *WirelessPage { + return v.value +} + +func (v *NullableWirelessPage) Set(val *WirelessPage) { + v.value = val + v.isSet = true +} + +func (v NullableWirelessPage) IsSet() bool { + return v.isSet +} + +func (v *NullableWirelessPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWirelessPage(val *WirelessPage) *NullableWirelessPage { + return &NullableWirelessPage{value: val, isSet: true} +} + +func (v NullableWirelessPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWirelessPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_wiz_credential_fields.go b/go/model_wiz_credential_fields.go new file mode 100644 index 0000000..a59431f --- /dev/null +++ b/go/model_wiz_credential_fields.go @@ -0,0 +1,243 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WizCredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WizCredentialFields{} + +// WizCredentialFields struct for WizCredentialFields +type WizCredentialFields struct { + AuthUrl string `json:"auth_url"` + ApiUrl string `json:"api_url"` + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` +} + +type _WizCredentialFields WizCredentialFields + +// NewWizCredentialFields instantiates a new WizCredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWizCredentialFields(authUrl string, apiUrl string, clientId string, clientSecret string) *WizCredentialFields { + this := WizCredentialFields{} + this.AuthUrl = authUrl + this.ApiUrl = apiUrl + this.ClientId = clientId + this.ClientSecret = clientSecret + return &this +} + +// NewWizCredentialFieldsWithDefaults instantiates a new WizCredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWizCredentialFieldsWithDefaults() *WizCredentialFields { + this := WizCredentialFields{} + return &this +} + +// GetAuthUrl returns the AuthUrl field value +func (o *WizCredentialFields) GetAuthUrl() string { + if o == nil { + var ret string + return ret + } + + return o.AuthUrl +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value +// and a boolean to check if the value has been set. +func (o *WizCredentialFields) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthUrl, true +} + +// SetAuthUrl sets field value +func (o *WizCredentialFields) SetAuthUrl(v string) { + o.AuthUrl = v +} + +// GetApiUrl returns the ApiUrl field value +func (o *WizCredentialFields) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *WizCredentialFields) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *WizCredentialFields) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetClientId returns the ClientId field value +func (o *WizCredentialFields) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *WizCredentialFields) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *WizCredentialFields) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *WizCredentialFields) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *WizCredentialFields) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *WizCredentialFields) SetClientSecret(v string) { + o.ClientSecret = v +} + +func (o WizCredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WizCredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["auth_url"] = o.AuthUrl + toSerialize["api_url"] = o.ApiUrl + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + return toSerialize, nil +} + +func (o *WizCredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "auth_url", + "api_url", + "client_id", + "client_secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWizCredentialFields := _WizCredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWizCredentialFields) + + if err != nil { + return err + } + + *o = WizCredentialFields(varWizCredentialFields) + + return err +} + +type NullableWizCredentialFields struct { + value *WizCredentialFields + isSet bool +} + +func (v NullableWizCredentialFields) Get() *WizCredentialFields { + return v.value +} + +func (v *NullableWizCredentialFields) Set(val *WizCredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableWizCredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableWizCredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWizCredentialFields(val *WizCredentialFields) *NullableWizCredentialFields { + return &NullableWizCredentialFields{value: val, isSet: true} +} + +func (v NullableWizCredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWizCredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/model_x509_credential_fields.go b/go/model_x509_credential_fields.go new file mode 100644 index 0000000..c200461 --- /dev/null +++ b/go/model_x509_credential_fields.go @@ -0,0 +1,187 @@ +/* +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the X509CredentialFields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &X509CredentialFields{} + +// X509CredentialFields struct for X509CredentialFields +type X509CredentialFields struct { + X509Certificate string `json:"x509_certificate"` + PrivateKey string `json:"private_key"` +} + +type _X509CredentialFields X509CredentialFields + +// NewX509CredentialFields instantiates a new X509CredentialFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewX509CredentialFields(x509Certificate string, privateKey string) *X509CredentialFields { + this := X509CredentialFields{} + this.X509Certificate = x509Certificate + this.PrivateKey = privateKey + return &this +} + +// NewX509CredentialFieldsWithDefaults instantiates a new X509CredentialFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewX509CredentialFieldsWithDefaults() *X509CredentialFields { + this := X509CredentialFields{} + return &this +} + +// GetX509Certificate returns the X509Certificate field value +func (o *X509CredentialFields) GetX509Certificate() string { + if o == nil { + var ret string + return ret + } + + return o.X509Certificate +} + +// GetX509CertificateOk returns a tuple with the X509Certificate field value +// and a boolean to check if the value has been set. +func (o *X509CredentialFields) GetX509CertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.X509Certificate, true +} + +// SetX509Certificate sets field value +func (o *X509CredentialFields) SetX509Certificate(v string) { + o.X509Certificate = v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *X509CredentialFields) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *X509CredentialFields) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *X509CredentialFields) SetPrivateKey(v string) { + o.PrivateKey = v +} + +func (o X509CredentialFields) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o X509CredentialFields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["x509_certificate"] = o.X509Certificate + toSerialize["private_key"] = o.PrivateKey + return toSerialize, nil +} + +func (o *X509CredentialFields) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "x509_certificate", + "private_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varX509CredentialFields := _X509CredentialFields{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varX509CredentialFields) + + if err != nil { + return err + } + + *o = X509CredentialFields(varX509CredentialFields) + + return err +} + +type NullableX509CredentialFields struct { + value *X509CredentialFields + isSet bool +} + +func (v NullableX509CredentialFields) Get() *X509CredentialFields { + return v.value +} + +func (v *NullableX509CredentialFields) Set(val *X509CredentialFields) { + v.value = val + v.isSet = true +} + +func (v NullableX509CredentialFields) IsSet() bool { + return v.isSet +} + +func (v *NullableX509CredentialFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableX509CredentialFields(val *X509CredentialFields) *NullableX509CredentialFields { + return &NullableX509CredentialFields{value: val, isSet: true} +} + +func (v NullableX509CredentialFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableX509CredentialFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/response.go b/go/response.go index 7d3ab1d..e19021a 100644 --- a/go/response.go +++ b/go/response.go @@ -1,12 +1,13 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi @@ -32,14 +33,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. +// NewAPIResponse returns a new APIResponse object. func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} return response } // NewAPIResponseWithError returns a new APIResponse object with the provided error message. func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} return response } diff --git a/go/runzero-client/examples/basic/main.go b/go/runzero-client/examples/basic/main.go index 1f61df9..f2f9942 100644 --- a/go/runzero-client/examples/basic/main.go +++ b/go/runzero-client/examples/basic/main.go @@ -17,33 +17,33 @@ func main() { log.Printf("runZero Components") log.Printf("=================") - areq := client.PublicApi.GetLatestAgentVersion(ctx) + areq := client.PublicAPI.GetLatestAgentVersion(ctx) aver, res, err := areq.Execute() if err != nil { log.Fatalf("failed to get agent version: %s", err) } - log.Printf(" Agent: %s", aver.Version) + log.Printf(" Agent: %s", aver.GetVersion()) - sreq := client.PublicApi.GetLatestScannerVersion(ctx) + sreq := client.PublicAPI.GetLatestScannerVersion(ctx) sver, res, err := sreq.Execute() if err != nil { log.Fatalf("failed to get scanner version: %s", err) } - log.Printf(" Scanner: %s", sver.Version) + log.Printf(" Scanner: %s", sver.GetVersion()) - preq := client.PublicApi.GetLatestPlatformVersion(ctx) + preq := client.PublicAPI.GetLatestPlatformVersion(ctx) pver, res, err := preq.Execute() if err != nil { log.Fatalf("failed to get platform version: %s", err) } - log.Printf(" Platform: %s", pver.Version) + log.Printf(" Platform: %s", pver.GetVersion()) cnf := client.GetConfig() if len(cnf.DefaultHeader) == 0 { log.Printf("Set the RUMBLE_API_KEY environment variable to test authenticated APIs") return } - oreq := client.OrganizationApi.GetOrganization(ctx) + oreq := client.OrganizationAPI.GetOrganization(ctx) org, res, err := oreq.Execute() if err != nil { log.Fatalf("failed to get organization %s", err) diff --git a/go/runzero-client/examples/scan-all-sites/main.go b/go/runzero-client/examples/scan-all-sites/main.go index bad274a..63704ba 100644 --- a/go/runzero-client/examples/scan-all-sites/main.go +++ b/go/runzero-client/examples/scan-all-sites/main.go @@ -9,7 +9,7 @@ import ( "time" "github.com/gofrs/uuid" - openapi "github.com/runZeroInc/runzero-api/go" + runzero "github.com/runZeroInc/runzero-api/go" rc "github.com/runZeroInc/runzero-api/go/runzero-client" ) @@ -45,7 +45,7 @@ func main() { } // Build a list of connected agents - getAgentsReq := client.OrganizationApi.GetAgents(ctx) + getAgentsReq := client.OrganizationAPI.GetAgents(ctx) agents, _, err := getAgentsReq.Execute() if err != nil { log.Fatalf("failed to get agent list %s", err) @@ -73,7 +73,7 @@ func main() { } // Build a list of recurring tasks - getTasksReq := client.OrganizationApi.GetTasks(ctx) + getTasksReq := client.OrganizationAPI.GetTasks(ctx) tasks, _, err := getTasksReq.Execute() if err != nil { log.Fatalf("failed to get task list %s", err) @@ -92,16 +92,15 @@ func main() { } // Build a list of sites - getSitesReq := client.OrganizationApi.GetSites(ctx) + getSitesReq := client.OrganizationAPI.GetSites(ctx) sites, _, err := getSitesReq.Execute() if err != nil { log.Fatalf("failed to get sites list %s", err) } scansCurrent := 0 - todoSites := []openapi.Site{} + todoSites := []runzero.Site{} for _, site := range sites { - site := site if _, ok := siteTaskMap[site.GetId()]; ok { scansCurrent++ continue @@ -132,8 +131,8 @@ func main() { log.Printf("adding scan for site %s [%s]..", site.GetName(), site.GetId()) - newScanReq := client.OrganizationApi.CreateScan(ctx, site.GetId()) - newScanReq = newScanReq.ScanOptions(openapi.ScanOptions{ + newScanReq := client.OrganizationAPI.CreateScan(ctx, site.GetId()) + newScanReq = newScanReq.ScanOptions(runzero.ScanOptions{ Targets: "defaults", ScanFrequency: newString(*flagScanFreq), ScanStart: newString(fmt.Sprintf("%d", ts.Unix())), diff --git a/go/test/api_account_test.go b/go/test/api_account_test.go new file mode 100644 index 0000000..1912065 --- /dev/null +++ b/go/test/api_account_test.go @@ -0,0 +1,867 @@ +/* +runZero API + +Testing AccountAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_AccountAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AccountAPIService CreateAccountAssetOwnershipTypes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountAssetOwnershipTypes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountCredential(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountCustomIntegration(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountCustomIntegrationAndID", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customIntegrationId string + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountCustomIntegrationAndID(context.Background(), customIntegrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountGroup(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountGroupMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountGroupMapping(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountKey(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountOrganization(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountOrganizationExportToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountOrganizationExportToken(context.Background(), orgId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountScanTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountScanTemplate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService CreateAccountUserInvite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.CreateAccountUserInvite(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService DeleteAccountAssetOwnershipType", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ownershipTypeId string + + resp, httpRes, err := apiClient.AccountAPI.DeleteAccountAssetOwnershipType(context.Background(), ownershipTypeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService DeleteAccountAssetOwnershipTypes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.DeleteAccountAssetOwnershipTypes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService DeleteAccountCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customIntegrationId string + + resp, httpRes, err := apiClient.AccountAPI.DeleteAccountCustomIntegration(context.Background(), customIntegrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService DeleteAccountOrganizationExportToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + var keyId string + + httpRes, err := apiClient.AccountAPI.DeleteAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService DeleteAccountOrganizationExportTokenDeprecated", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + httpRes, err := apiClient.AccountAPI.DeleteAccountOrganizationExportTokenDeprecated(context.Background(), orgId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService ExportEventsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.ExportEventsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService ExportEventsJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.ExportEventsJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAPIToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAPIToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountAgents", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountAgents(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountAssetOwnershipTypes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountAssetOwnershipTypes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var credentialId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountCredential(context.Background(), credentialId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountCredentials", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountCredentials(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customIntegrationId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountCustomIntegration(context.Background(), customIntegrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountCustomIntegrations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountCustomIntegrations(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountGroupMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupMappingId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountGroupMapping(context.Background(), groupMappingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountGroupMappings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountGroupMappings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountGroups", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountGroups(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var keyId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountKey(context.Background(), keyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountKeys", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountKeys(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountLicense", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountLicense(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountOrganization(context.Background(), orgId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountOrganizationExportToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + var keyId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountOrganizationExportTokens", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountOrganizationExportTokens(context.Background(), orgId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountOrganizations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountOrganizations(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountScanTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var scanTemplateId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountScanTemplate(context.Background(), scanTemplateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountScanTemplates", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountScanTemplates(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountSites", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountSites(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountTasks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountTasks(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.AccountAPI.GetAccountUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService GetAccountUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.GetAccountUsers(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var credentialId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountCredential(context.Background(), credentialId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountGroupMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupMappingId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountGroupMapping(context.Background(), groupMappingId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var keyId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountKey(context.Background(), keyId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountOrganization(context.Background(), orgId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountScanTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var scanTemplateId string + + resp, httpRes, err := apiClient.AccountAPI.RemoveAccountScanTemplate(context.Background(), scanTemplateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RemoveAccountUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + httpRes, err := apiClient.AccountAPI.RemoveAccountUser(context.Background(), userId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService ResetAccountUserLockout", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.AccountAPI.ResetAccountUserLockout(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService ResetAccountUserMFA", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.AccountAPI.ResetAccountUserMFA(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService ResetAccountUserPassword", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.AccountAPI.ResetAccountUserPassword(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RotateAPIToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.RotateAPIToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RotateAccountKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var keyId string + + resp, httpRes, err := apiClient.AccountAPI.RotateAccountKey(context.Background(), keyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RotateAccountOrganizationExportToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + var keyId string + + resp, httpRes, err := apiClient.AccountAPI.RotateAccountOrganizationExportToken(context.Background(), orgId, keyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService RotateAccountOrganizationExportTokenDeprecated", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + resp, httpRes, err := apiClient.AccountAPI.RotateAccountOrganizationExportTokenDeprecated(context.Background(), orgId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountAssetOwnershipType", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ownershipTypeId string + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountAssetOwnershipType(context.Background(), ownershipTypeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountAssetOwnershipTypes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountAssetOwnershipTypes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customIntegrationId string + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountCustomIntegration(context.Background(), customIntegrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountGroup(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountGroupMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountGroupMapping(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgId string + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountOrganization(context.Background(), orgId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountScanTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountScanTemplate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountAPIService UpdateAccountUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.AccountAPI.UpdateAccountUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_cisco_sntc_test.go b/go/test/api_cisco_sntc_test.go new file mode 100644 index 0000000..fdf8632 --- /dev/null +++ b/go/test/api_cisco_sntc_test.go @@ -0,0 +1,38 @@ +/* +runZero API + +Testing CiscoSNTCAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_CiscoSNTCAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test CiscoSNTCAPIService ExportAssetsCiscoCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CiscoSNTCAPI.ExportAssetsCiscoCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_export_test.go b/go/test/api_export_test.go new file mode 100644 index 0000000..9d8eb72 --- /dev/null +++ b/go/test/api_export_test.go @@ -0,0 +1,542 @@ +/* +runZero API + +Testing ExportAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_ExportAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ExportAPIService ExportAssetTopHWCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetTopHWCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetTopOSCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetTopOSCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetTopTagsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetTopTagsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetTopTypesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetTopTypesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetsJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetsJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportAssetsNmapXML", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportAssetsNmapXML(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportCertificatesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportCertificatesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportCertificatesJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportCertificatesJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportCertificatesJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportCertificatesJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryGroupsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryGroupsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryGroupsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryGroupsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryGroupsJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryGroupsJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryUsersCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryUsersCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryUsersJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryUsersJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportDirectoryUsersJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportDirectoryUsersJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportFindingsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportFindingsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportFindingsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportFindingsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportFindingsJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportFindingsJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSNMPARPCacheCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSNMPARPCacheCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesTopProductsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesTopProductsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesTopProtocolsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesTopProtocolsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesTopTCPCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesTopTCPCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportServicesTopUDPCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportServicesTopUDPCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSitesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSitesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSitesJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSitesJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSitesJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSitesJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSoftwareCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSoftwareCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSoftwareJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSoftwareJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSoftwareJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSoftwareJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportSubnetUtilizationStatsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportSubnetUtilizationStatsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportTasksJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportTasksJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportTasksJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportTasksJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportVulnerabilitiesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportVulnerabilitiesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportVulnerabilitiesJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportVulnerabilitiesJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportVulnerabilitiesJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportVulnerabilitiesJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportWirelessCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportWirelessCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportWirelessJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportWirelessJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ExportAPIService ExportWirelessJSONL", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ExportAPI.ExportWirelessJSONL(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_import_test.go b/go/test/api_import_test.go new file mode 100644 index 0000000..b853f09 --- /dev/null +++ b/go/test/api_import_test.go @@ -0,0 +1,39 @@ +/* +runZero API + +Testing ImportAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/runZeroInc/runzero-api/go" +) + +func Test_openapi_ImportAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ImportAPIService ImportCustomIntegrationAssets", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgID string + + resp, httpRes, err := apiClient.ImportAPI.ImportCustomIntegrationAssets(context.Background(), orgID).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_organization_test.go b/go/test/api_organization_test.go new file mode 100644 index 0000000..9598cee --- /dev/null +++ b/go/test/api_organization_test.go @@ -0,0 +1,781 @@ +/* +runZero API + +Testing OrganizationAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/runZeroInc/runzero-api/go" +) + +func Test_openapi_OrganizationAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrganizationAPIService BulkRemoveCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customIntegrationId string + + httpRes, err := apiClient.OrganizationAPI.BulkRemoveCustomIntegration(context.Background(), customIntegrationId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService ClearBulkAssetOwners", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.ClearBulkAssetOwners(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService ClearBulkAssetTags", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.ClearBulkAssetTags(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService CreateSample", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.CreateSample(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService CreateScan", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.CreateScan(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService CreateSite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.CreateSite(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetAgent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var agentId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetAgent(context.Background(), agentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetAgents", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetAgents(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetAsset", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetAsset(context.Background(), assetId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetAssets", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetAssets(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetExplorer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var explorerId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetExplorer(context.Background(), explorerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetExplorers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetExplorers(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetHostedZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var hostedZoneId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetHostedZone(context.Background(), hostedZoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetHostedZones", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetHostedZones(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetKey(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetOrganization(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetServices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetServices(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetSite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetSite(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetSites", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetSites(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetTask", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetTask(context.Background(), taskId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetTaskChangeReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + httpRes, err := apiClient.OrganizationAPI.GetTaskChangeReport(context.Background(), taskId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetTaskLog", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + httpRes, err := apiClient.OrganizationAPI.GetTaskLog(context.Background(), taskId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetTaskScanData", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + httpRes, err := apiClient.OrganizationAPI.GetTaskScanData(context.Background(), taskId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetTasks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetTasks(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetWirelessLAN", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wirelessId string + + resp, httpRes, err := apiClient.OrganizationAPI.GetWirelessLAN(context.Background(), wirelessId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetWirelessLANs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.GetWirelessLANs(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService HideTask", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + resp, httpRes, err := apiClient.OrganizationAPI.HideTask(context.Background(), taskId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService ImportNessusScanData", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.ImportNessusScanData(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService ImportPacketData", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.ImportPacketData(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService ImportScanData", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.ImportScanData(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService MergeAssets", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.MergeAssets(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveAgent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var agentId string + + httpRes, err := apiClient.OrganizationAPI.RemoveAgent(context.Background(), agentId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveAsset", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + httpRes, err := apiClient.OrganizationAPI.RemoveAsset(context.Background(), assetId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveAssetSource", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + var sourceId string + + httpRes, err := apiClient.OrganizationAPI.RemoveAssetSource(context.Background(), assetId, sourceId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveBulkAssets", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.OrganizationAPI.RemoveBulkAssets(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveCustomIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + var customIntegrationId string + + httpRes, err := apiClient.OrganizationAPI.RemoveCustomIntegration(context.Background(), assetId, customIntegrationId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveExplorer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var explorerId string + + httpRes, err := apiClient.OrganizationAPI.RemoveExplorer(context.Background(), explorerId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.OrganizationAPI.RemoveKey(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId string + + httpRes, err := apiClient.OrganizationAPI.RemoveService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveSite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + httpRes, err := apiClient.OrganizationAPI.RemoveSite(context.Background(), siteId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveWirelessLAN", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wirelessId string + + httpRes, err := apiClient.OrganizationAPI.RemoveWirelessLAN(context.Background(), wirelessId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RotateKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.RotateKey(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService StopTask", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + resp, httpRes, err := apiClient.OrganizationAPI.StopTask(context.Background(), taskId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateAgentSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var agentId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateAgentSettings(context.Background(), agentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateAssetComments", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateAssetComments(context.Background(), assetId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateAssetCriticality", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateAssetCriticality(context.Background(), assetId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateAssetOwners", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateAssetOwners(context.Background(), assetId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateAssetTags", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var assetId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateAssetTags(context.Background(), assetId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateBulkAssetCriticality", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateBulkAssetCriticality(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateBulkAssetOwners", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateBulkAssetOwners(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateBulkAssetTags", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateBulkAssetTags(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateExplorerSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var explorerId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateExplorerSettings(context.Background(), explorerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateOrganization(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateSite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var siteId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateSite(context.Background(), siteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateTask", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var taskId string + + resp, httpRes, err := apiClient.OrganizationAPI.UpdateTask(context.Background(), taskId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpgradeAgent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var agentId string + + httpRes, err := apiClient.OrganizationAPI.UpgradeAgent(context.Background(), agentId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpgradeExplorer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var explorerId string + + httpRes, err := apiClient.OrganizationAPI.UpgradeExplorer(context.Background(), explorerId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_public_test.go b/go/test/api_public_test.go new file mode 100644 index 0000000..a8990d8 --- /dev/null +++ b/go/test/api_public_test.go @@ -0,0 +1,74 @@ +/* +runZero API + +Testing PublicAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_PublicAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PublicAPIService GetHealthCheck", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublicAPI.GetHealthCheck(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PublicAPIService GetLatestAgentVersion", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublicAPI.GetLatestAgentVersion(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PublicAPIService GetLatestPlatformVersion", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublicAPI.GetLatestPlatformVersion(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PublicAPIService GetLatestScannerVersion", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublicAPI.GetLatestScannerVersion(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_service_now_test.go b/go/test/api_service_now_test.go new file mode 100644 index 0000000..ed0ffb2 --- /dev/null +++ b/go/test/api_service_now_test.go @@ -0,0 +1,74 @@ +/* +runZero API + +Testing ServiceNowAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_ServiceNowAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ServiceNowAPIService SnowExportAssetsCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ServiceNowAPI.SnowExportAssetsCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ServiceNowAPIService SnowExportAssetsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ServiceNowAPI.SnowExportAssetsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ServiceNowAPIService SnowExportServicesCSV", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ServiceNowAPI.SnowExportServicesCSV(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ServiceNowAPIService SnowServiceGraphExportAssetsJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ServiceNowAPI.SnowServiceGraphExportAssetsJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/test/api_splunk_test.go b/go/test/api_splunk_test.go new file mode 100644 index 0000000..01417ba --- /dev/null +++ b/go/test/api_splunk_test.go @@ -0,0 +1,50 @@ +/* +runZero API + +Testing SplunkAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package runzero + +import ( + "context" + "testing" + + openapiclient "github.com/runZeroInc/runzero-api/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_runzero_SplunkAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SplunkAPIService SplunkAssetSyncCreatedJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SplunkAPI.SplunkAssetSyncCreatedJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SplunkAPIService SplunkAssetSyncUpdatedJSON", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SplunkAPI.SplunkAssetSyncUpdatedJSON(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/go/utils.go b/go/utils.go index 29ffc92..7c94d3e 100644 --- a/go/utils.go +++ b/go/utils.go @@ -1,21 +1,25 @@ /* - * runZero API - * - * runZero Network Discovery API - * - * API version: 1.0.4 - * Contact: support@runzero.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ +runZero API + +runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. + +API version: 4.0.250826.0 +Contact: support@runzero.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( + "bytes" "encoding/json" + "fmt" + "reflect" "time" ) -// PtrBool is a helper routine that returns a pointer to given integer value. +// PtrBool is a helper routine that returns a pointer to given boolean value. func PtrBool(v bool) *bool { return &v } // PtrInt is a helper routine that returns a pointer to given integer value. @@ -319,10 +323,40 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} \ No newline at end of file diff --git a/runzero-api.yml b/runzero-api.yml index 00bb4f3..42468a4 100644 --- a/runzero-api.yml +++ b/runzero-api.yml @@ -4,7 +4,7 @@ servers: url: https://console.runzero.com/api/v1.0 info: description: runZero API. API use is rate limited, you can make as many calls per day as you have licensed assets. - version: 4.0.250826.0 + version: 1.0.5 title: runZero API contact: email: support@runzero.com @@ -20,6 +20,12 @@ tags: description: Requires Export token (starts with ET), Organization key (starts with OT), Account key (starts with CT), or OAuth - name: Import description: Requires Organization key (starts with OT), Account key (starts with CT), or OAuth + - name: ServiceNow + description: ServiceNow integration endpoints. Requires Organization key (starts with OT), Account key (starts with CT), or OAuth. + - name: Splunk + description: Splunk-friendly export endpoints. Requires Export token (starts with ET), Organization key (starts with OT), Account key (starts with CT), or OAuth. + - name: Cisco SNTC + description: Cisco Smart Net Total Care integration endpoints. Requires Organization key (starts with OT), Account key (starts with CT), or OAuth. - name: Public description: Unauthenticated @@ -99,7 +105,6 @@ paths: format: uuid description: The ID of the organization to import the assets into tags: - - Organization - Import operationId: importCustomIntegrationAssets summary: Import assets described by a registered custom integration @@ -153,19 +158,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Asset' - - type: object - properties: - assets: - type: array - items: - $ref: '#/components/schemas/Asset' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/AssetExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -249,19 +242,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Service' - - type: object - properties: - services: - type: array - items: - $ref: '#/components/schemas/Service' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/ServiceExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -390,19 +371,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Wireless' - - type: object - properties: - wireless: - type: array - items: - $ref: '#/components/schemas/Wireless' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/WirelessExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -466,19 +435,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Software' - - type: object - properties: - software: - type: array - items: - $ref: '#/components/schemas/Software' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/SoftwareExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -542,19 +499,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Vulnerability' - - type: object - properties: - vulnerabilities: - type: array - items: - $ref: '#/components/schemas/Vulnerability' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/VulnerabilityExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -607,7 +552,6 @@ paths: get: tags: - Export - - Certificates operationId: exportCertificatesCSV summary: Export the certificate inventory as CSV responses: @@ -628,7 +572,6 @@ paths: get: tags: - Export - - Certificates operationId: exportCertificatesJSON summary: Export the certificate inventory as JSON responses: @@ -650,16 +593,17 @@ paths: get: tags: - Export - - Certificates operationId: exportCertificatesJSONL summary: Export the certificate inventory as JSONL line-delimited responses: '200': + # This is a streaming response of one Certificate object per line in JSON format description: filtered certificate results content: application/json: schema: - $ref: "#/components/schemas/Certificate" + type: string + format: binary '401': $ref: '#/components/responses/UnauthorizedError' @@ -1100,6 +1044,8 @@ paths: parameters: - $ref: '#/components/parameters/orgID' get: + tags: + - Export operationId: exportAssetMetricsJSON summary: Export asset metrics responses: @@ -1110,12 +1056,7 @@ paths: schema: type: object additionalProperties: - type: object - properties: - site_id: - type: string - metrics: - type: object + $ref: '#/components/schemas/AssetMetric' '401': $ref: '#/components/responses/UnauthorizedError' @@ -1173,7 +1114,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' delete: @@ -1201,7 +1142,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' @@ -1345,7 +1286,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Explorer' + $ref: '#/components/schemas/Agent' '401': $ref: '#/components/responses/UnauthorizedError' @@ -1372,7 +1313,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Explorer' + $ref: '#/components/schemas/Agent' '401': $ref: '#/components/responses/UnauthorizedError' '404': @@ -1418,14 +1359,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ExplorerPatchedSettings" + $ref: "#/components/schemas/AgentPatchedSettings" responses: '200': description: explorer details content: application/json: schema: - $ref: '#/components/schemas/Explorer' + $ref: '#/components/schemas/Agent' '401': $ref: '#/components/responses/UnauthorizedError' '404': @@ -1645,6 +1586,7 @@ paths: required: true description: UUID or name of the site to import scan data into requestBody: + required: true content: application/octet-stream: schema: @@ -1683,6 +1625,7 @@ paths: required: true description: UUID or name of the site to import Nessus scan data into requestBody: + required: true content: application/octet-stream: schema: @@ -1721,6 +1664,7 @@ paths: required: true description: UUID or name of the site to import packet capture into requestBody: + required: true content: application/octet-stream: schema: @@ -1759,8 +1703,9 @@ paths: required: true description: UUID or name of the site to scan requestBody: + required: true content: - text/json: + application/json: schema: $ref: '#/components/schemas/ScanOptions' responses: @@ -1796,8 +1741,9 @@ paths: required: true description: UUID or name of the site to scan requestBody: + required: true content: - text/json: + application/json: schema: $ref: '#/components/schemas/SampleOptions' responses: @@ -2076,7 +2022,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Search' + $ref: '#/components/schemas/SearchQuery' responses: '200': $ref: '#/components/responses/StatusMessage' @@ -2168,11 +2114,7 @@ paths: content: application/json: schema: - type: object - properties: - updated_asset_count: - type: integer - example: 10 + $ref: '#/components/schemas/BulkAssetUpdateResult' '400': $ref: '#/components/responses/InvalidRequestBodyError' '403': @@ -2196,18 +2138,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Search' + $ref: '#/components/schemas/SearchQuery' responses: '200': description: updated asset count content: application/json: schema: - type: object - properties: - updated_asset_count: - type: integer - example: 10 + $ref: '#/components/schemas/BulkAssetUpdateResult' '400': $ref: '#/components/responses/InvalidRequestBodyError' '403': @@ -2317,7 +2255,7 @@ paths: /org/custom-integrations: get: tags: - - Org + - Organization operationId: getOrgCustomIntegrations summary: Get all custom integrations responses: @@ -2347,7 +2285,7 @@ paths: description: UUID of the custom integration get: tags: - - Org + - Organization operationId: getOrgCustomIntegration summary: Get single custom integration responses: @@ -3205,7 +3143,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' put: @@ -3226,7 +3164,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' '404': @@ -3251,7 +3189,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' delete: @@ -3293,7 +3231,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIKey' + $ref: '#/components/schemas/OrganizationAPIKey' '401': $ref: '#/components/responses/UnauthorizedError' @@ -3324,19 +3262,7 @@ paths: content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/Event' - - type: object - properties: - events: - type: array - items: - $ref: '#/components/schemas/Event' - next_key: - type: string - description: The key to use for the next page of results + $ref: '#/components/schemas/EventExportResponse' '401': $ref: '#/components/responses/UnauthorizedError' @@ -3361,13 +3287,13 @@ paths: type: string responses: '200': + # This is a streaming response of one Event object per line in JSON format description: filtered event results content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Event' + type: string + format: binary '401': $ref: '#/components/responses/UnauthorizedError' @@ -4170,7 +4096,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NewCustomIntegration" + $ref: "#/components/schemas/CustomIntegrationCreate" responses: '200': description: The custom integration created @@ -4263,7 +4189,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/NewCustomIntegration' + $ref: '#/components/schemas/CustomIntegrationCreate' responses: '200': description: The updated custom integration @@ -4323,13 +4249,13 @@ paths: description: An access token content: application/json: - schema: + schema: $ref: '#/components/schemas/AccessToken' '400': $ref: '#/components/responses/InvalidRequestBodyError' '401': $ref: '#/components/responses/UnauthorizedError' - + /account/api/rotate: post: @@ -4350,7 +4276,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/APIClient' + $ref: '#/components/schemas/APIClientCredentials' '400': $ref: '#/components/responses/InvalidRequestBodyError' '401': @@ -4502,7 +4428,7 @@ paths: - ServiceNow operationId: snowServiceGraphExportAssetsJSON summary: Exports the asset inventory as JSON - parameters: + parameters: - in: query name: search description: an optional search string for filtering results @@ -4649,9 +4575,14 @@ components: $ref: "#/components/schemas/Problem" StatusMessage: description: Summary of operation results + content: + application/json: + schema: + $ref: "#/components/schemas/OperationStatus" schemas: - StatusMessage: + OperationStatus: + description: Summary of the result of a bulk or asynchronous operation. type: object Problem: @@ -5022,37 +4953,7 @@ components: description: Remediation information. type: string links: - type: object - properties: - cves: - type: array - items: - type: object - properties: - title: - type: string - url: - type: string - rz_blog: - description: URLs of relevant runZero blog postings. - type: array - items: - type: object - properties: - title: - type: string - url: - type: string - urls: - description: Additional relevant URLs. - type: array - items: - type: object - properties: - title: - type: string - url: - type: string + $ref: '#/components/schemas/FindingLinks' created_at: type: integer format: int64 @@ -5730,10 +5631,6 @@ components: type: string format: uuid example: "f6cfb91a-52ea-4a86-bf9a-5a891a26f52b" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid params: description: A number of scan parameter values. Currently there is no authoritative list of acceptable values. See existing templates for examples. type: object @@ -5764,10 +5661,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid name: description: The name of the template. type: string @@ -5781,46 +5674,26 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid organization_id: description: ID of the organization the template is available in. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid agent_id: description: ID of the explorer which may execute the template. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid site_id: description: ID of the site the template is being used in. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid cruncher_id: description: ID of the runZero cruncher the task is executing on. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid created_at: description: Unix timestamp value indicating when the template was created. type: integer @@ -5835,10 +5708,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid updated_at: description: Unix timestamp value indicating when the template was last modified. type: integer @@ -5874,10 +5743,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid recur: description: A flag representing whether derived tasks are scheduled to repeat. type: boolean @@ -5908,10 +5773,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid grace_period: description: Additional time beyond hard expiration deadline by which the task may still be allowed to execute. type: string @@ -5921,10 +5782,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid source_id: description: The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. type: string @@ -5934,10 +5791,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid size_site: description: The size in assets of the site the last task the template was executed against. type: integer @@ -5958,10 +5811,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid linked_task_count: description: The number of tasks derived from the template. type: integer @@ -5995,12 +5844,6 @@ components: format: int64 example: 5 - Explorer: - $ref: '#/components/schemas/Agent' - - ExplorerPatchedSettings: - $ref: '#/components/schemas/AgentPatchedSettings' - OrgOptions: type: object properties: @@ -6015,26 +5858,27 @@ components: format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" expiration_assets_stale: + description: Number of days before stale assets are expired, as a decimal string. type: string - format: number example: "365" expiration_assets_offline: + description: Number of days before offline assets are expired, as a decimal string. type: string - format: number example: "365" expiration_integration_attributes: + description: Number of days before integration attributes are expired, as a decimal string. type: string - format: number example: "365" expiration_scans: + description: Number of days before scan data is expired, as a decimal string. type: string - format: number example: "365" expiration_vulnerabilities: + description: Number of days before vulnerabilities are expired, as a decimal string. type: string - format: number example: "365" keep_latest_integration_attributes: + description: Whether to retain only the latest integration attribute values, as a boolean string ("true"/"false"). type: string example: "true" SiteOptions: @@ -6237,7 +6081,8 @@ components: type: string example: alive:true and os:windows - Search: + SearchQuery: + description: A request body wrapping a runZero search query string. type: object required: - search @@ -7370,10 +7215,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid created_at: type: integer format: int64 @@ -7386,10 +7227,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid download_token: type: string example: DT11226D9EEEA2B035D42569585900 @@ -7506,7 +7343,34 @@ components: example: credentials_name type: type: string - enum: [miradore_api_key_v1, aws_access_secret, crowdstrike_api_key, azure_client_secret, azure_username_password, censys_search_api_key, snmpv2_community, snmpv3_credential, vmware_username_password] + enum: + - aws_access_secret + - azure_client_secret + - azure_username_password + - censys_search_api_key + - crowdstrike_api_key + - custom_integration_credential + - gcp_service_account_key + - google_workspace_client_secret + - insightvm_username_password + - ldap_username_password + - mecm_db_connection_string + - meraki_api_key + - miradore_api_key_v1 + - nessus_access_secret + - netbox_api_key + - palo_alto_api_key + - qualys_username_password + - sentinelone_api_key + - shodan_api_key + - snmpv2_community + - snmpv3_credential + - tanium_api_token + - tenable_access_secret + - tenable_security_center_access_secret + - vmware_username_password + - wiz_client_secret + - x509_keypair description: The service the credentials are for. created_at: type: integer @@ -7544,7 +7408,8 @@ components: format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - APIKey: + OrganizationAPIKey: + description: An API key issued for an organization. type: object required: - id @@ -7720,10 +7585,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid name: type: string example: Hourly Scan @@ -7734,60 +7595,32 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid client_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid organization_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid agent_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid hosted_zone_id: description: | The ID of the Hosted Zone which executes the task. If the type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid site_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid cruncher_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid created_at: type: integer format: int64 @@ -7799,19 +7632,11 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid custom_integration_id: description: The ID of the custom integration source, if the last task executed with this template was an import of Asset Data. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid source_id: description: The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import. type: integer @@ -7843,10 +7668,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid recur: type: boolean example: false @@ -7869,10 +7690,6 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid Task: description: A task object @@ -8573,14 +8390,7 @@ components: ownerships: type: array items: - type: object - properties: - ownership_type_id: - type: string - example: "2318e078-4164-4e1b-92a5-11e353093f4b" - owner: - type: string - example: "it@runzero.com" + $ref: '#/components/schemas/AssetOwnership' AssetOwnershipsWithSearch: type: object @@ -8608,49 +8418,37 @@ components: type: object required: - id - - clientId - - createdAt - - createdById - - updatedAt + - client_id + - created_at + - created_by_id + - updated_at properties: id: description: The unique ID of the object type: string format: uuid example: "f6cfb91a-52ea-4a86-bf9a-5a891a26f52b" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid - clientId: + client_id: description: The unique ID of the runZero client/customer account that owns the object type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid - createdById: + created_by_id: description: The unique ID of the entity that created the object type: string format: uuid example: "f6cfb91a-52ea-4a86-bf9a-5a891a26f52b" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid - createdAt: + created_at: description: A timestamp indicating creation time of the object type: string format: date-time example: "2023-03-06T18:14:50.52Z" - updatedAt: + updated_at: description: A timestamp indicating last modified time of the object type: string format: date-time example: "2023-03-06T18:14:50.52Z" - destroyedAt: + destroyed_at: description: A timestamp indicating deletion time of the object type: string format: date-time @@ -8661,7 +8459,6 @@ components: properties: name: description: The unique name of the custom integration, without spaces. - pattern: '^\S+$' type: string example: my-custom-integration icon: @@ -8681,7 +8478,8 @@ components: - $ref: "#/components/schemas/BaseCustomIntegration" - $ref: "#/components/schemas/BaseResponse" - NewCustomIntegration: + CustomIntegrationCreate: + description: Request body used to register a new custom integration. required: - name allOf: @@ -8712,48 +8510,14 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid customIntegrationId: description: The unique ID of the registered custom integration which produced the asset data. Uniqueness is not checked/enforced. See /account/custom-integrations api. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid importTask: - title: ImportTask - description: Information which describes the task created when asset data is imported. - type: object - required: - - name - properties: - name: - type: string - maxLength: 100 - example: "my import task" - description: - type: string - maxLength: 1024 - example: "importing assets from custom integration A" - excludeUnknown: - description: Instructs the data ingestion process whether to skip assets which do not merge into an existing asset in the asset inventory - type: boolean - default: false - example: true - tags: - description: Arbitrary string tag values which are applied to the asset data import task created. - type: array - maxItems: 100 - items: - type: string - maxLength: 1024 - example: [ "tag1", "tag2" ] + $ref: '#/components/schemas/ImportTask' assetData: description: | A gzip (not .tar.gz) compressed file containing ImportAsset objects. The file data may be a JSON array of @@ -8777,52 +8541,13 @@ components: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - x-go-type: uuid.UUID - x-go-import: - name: uuid - path: github.com/gofrs/uuid networkInterfaces: title: NetworkInterfaces description: The asset's networking configuration. type: array maxItems: 256 items: - type: object - properties: - ipv4Addresses: - description: Represents IPV4 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. - type: array - maxItems: 256 - items: - type: string - format: ipv4 - ipv6Addresses: - description: Represents the IPV6 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. - type: array - maxItems: 100 - items: - type: string - format: ipv6 - macAddress: - description: | - Represents a MAC address in IEEE 802 MAC/EUI-48, or EUI-64 form in one of the following formats: - 01:23:45:67:89:AB - 01:23:45:67:89:ab:cd:ef - 01-23-45-67-89-ab - 01-23-45-67-89-ab-cd-ef - 0123.4567.89ab - 0123.4567.89ab.cdef - 0123 4567 89ab cdEF - type: string - maxLength: 23 - example: "01:23:45:67:89:0A" - pattern: "^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$|\ - ^([A-Fa-f0-9]{2}:){7}[A-Fa-f0-9]{2}$|\ - ^([A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2}$|\ - ^([A-Fa-f0-9]{2}-){7}[A-Fa-f0-9]{2}$|\ - ^([A-Fa-f0-9]{4}\\.){2}[A-Fa-f0-9]{4}$|\ - ^([A-Fa-f0-9]{4}\\.){3}[A-Fa-f0-9]{4}$|\ - ^([A-Fa-f0-9]{4} ){3}[A-Fa-f0-9]{4}$" + $ref: '#/components/schemas/NetworkInterface' hostnames: description: Represents hostnames the asset is assigned or reachable at. These can be fully-qualified hostnames with the domain name, or a short hostname. @@ -8884,7 +8609,7 @@ components: anyOf: - type: string maxLength: 1024 - AccessToken: + AccessToken: type: object properties: access_token: @@ -8894,14 +8619,15 @@ components: expires_in: type: integer - APIClient: + APIClientCredentials: + description: Newly-issued OAuth client credentials returned when creating an API client. type: object properties: api_client_id: type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" - api_client_secret: + api_client_secret: type: string ClientIDForm: @@ -8918,3 +8644,245 @@ components: type: string client_secret: type: string + + AssetPage: + description: A page of assets returned from a paginated export. + type: object + properties: + assets: + type: array + items: + $ref: '#/components/schemas/Asset' + next_key: + type: string + description: The key to use for the next page of results + + AssetExportResponse: + description: | + Response body for the asset export endpoint. When `page_size` is omitted the response is a bare array of assets; + when `page_size` is set the response is a paged `AssetPage` object. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Asset' + - $ref: '#/components/schemas/AssetPage' + + ServicePage: + description: A page of services returned from a paginated export. + type: object + properties: + services: + type: array + items: + $ref: '#/components/schemas/Service' + next_key: + type: string + description: The key to use for the next page of results + + ServiceExportResponse: + description: Response body for the service export endpoint. Bare array unless `page_size` is provided. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Service' + - $ref: '#/components/schemas/ServicePage' + + WirelessPage: + description: A page of wireless devices returned from a paginated export. + type: object + properties: + wireless: + type: array + items: + $ref: '#/components/schemas/Wireless' + next_key: + type: string + description: The key to use for the next page of results + + WirelessExportResponse: + description: Response body for the wireless export endpoint. Bare array unless `page_size` is provided. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Wireless' + - $ref: '#/components/schemas/WirelessPage' + + SoftwarePage: + description: A page of software inventory entries returned from a paginated export. + type: object + properties: + software: + type: array + items: + $ref: '#/components/schemas/Software' + next_key: + type: string + description: The key to use for the next page of results + + SoftwareExportResponse: + description: Response body for the software export endpoint. Bare array unless `page_size` is provided. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Software' + - $ref: '#/components/schemas/SoftwarePage' + + VulnerabilityPage: + description: A page of vulnerabilities returned from a paginated export. + type: object + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/Vulnerability' + next_key: + type: string + description: The key to use for the next page of results + + VulnerabilityExportResponse: + description: Response body for the vulnerability export endpoint. Bare array unless `page_size` is provided. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Vulnerability' + - $ref: '#/components/schemas/VulnerabilityPage' + + EventPage: + description: A page of events returned from a paginated export. + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/Event' + next_key: + type: string + description: The key to use for the next page of results + + EventExportResponse: + description: Response body for the event export endpoint. Bare array unless `page_size` is provided. + oneOf: + - type: array + items: + $ref: '#/components/schemas/Event' + - $ref: '#/components/schemas/EventPage' + + AssetMetric: + description: Asset metric summary for a single asset, keyed by asset ID in the parent map. + type: object + properties: + site_id: + type: string + format: uuid + metrics: + description: Free-form metric values keyed by metric name. + type: object + additionalProperties: true + + BulkAssetUpdateResult: + description: Result of a bulk asset update operation. + type: object + properties: + updated_asset_count: + type: integer + example: 10 + + FindingLink: + description: A title and URL pointing to additional finding context. + type: object + properties: + title: + type: string + url: + type: string + + FindingLinks: + description: Groups of related URLs that provide additional context for a finding. + type: object + properties: + cves: + description: URLs of relevant CVE records. + type: array + items: + $ref: '#/components/schemas/FindingLink' + rz_blog: + description: URLs of relevant runZero blog postings. + type: array + items: + $ref: '#/components/schemas/FindingLink' + urls: + description: Additional relevant URLs. + type: array + items: + $ref: '#/components/schemas/FindingLink' + + AssetOwnership: + description: A single ownership assignment on an asset. + type: object + properties: + ownership_type_id: + type: string + example: "2318e078-4164-4e1b-92a5-11e353093f4b" + owner: + type: string + example: "it@runzero.com" + + NetworkInterface: + description: A network interface attached to a custom-integration asset. + type: object + properties: + ipv4Addresses: + description: Represents IPV4 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. + type: array + maxItems: 256 + items: + type: string + format: ipv4 + ipv6Addresses: + description: Represents the IPV6 addresses. Addresses are ordered from most to least likely to uniquely identify the asset. + type: array + maxItems: 100 + items: + type: string + format: ipv6 + macAddress: + description: | + Represents a MAC address in IEEE 802 MAC/EUI-48, or EUI-64 form in one of the following formats: + 01:23:45:67:89:AB + 01:23:45:67:89:ab:cd:ef + 01-23-45-67-89-ab + 01-23-45-67-89-ab-cd-ef + 0123.4567.89ab + 0123.4567.89ab.cdef + 0123 4567 89ab cdEF + type: string + maxLength: 23 + example: "01:23:45:67:89:0A" + + ImportTask: + description: Information which describes the task created when asset data is imported. + type: object + required: + - name + properties: + name: + type: string + maxLength: 100 + example: "my import task" + description: + type: string + maxLength: 1024 + example: "importing assets from custom integration A" + excludeUnknown: + description: Instructs the data ingestion process whether to skip assets which do not merge into an existing asset in the asset inventory + type: boolean + default: false + example: true + tags: + description: Arbitrary string tag values which are applied to the asset data import task created. + type: array + maxItems: 100 + items: + type: string + maxLength: 1024 + example: [ "tag1", "tag2" ]